wessels [Tue, 11 Jan 2000 12:32:56 +0000 (12:32 +0000)]
DW:
- Changed global double-linked LRU list to a bunch of LRU lists,
one for each SwapDir. This allows us to choose which SwapDir
cache replacement should occur on.
- Previously the LRU list links where maintained by storeHashInsert and
storeHashDelete. Now they happen in the new storeSwapFileNumberSet
function. So entries are added and removed from the list only when
their swap file numbers are set/cleared.
- Changed storeMaintainSwapSpace so that it removes objects in
a round-robin manner. This should keep the number of unlink
requests approximately constant across all SwapDir's.
- Also changed the calculation of 'max_remove' in storeMaintainSwapSpace.
Now we remove up to the 5 minute average client request rate, with
a minimum of 10.
- This new replacement code keeps the disk usage right at the
high water mark. Files are agressively removed whenever the
high water mark is reached. No files are removed if the usage
is below the high water mark. The only purpose for the low water
mark now is to calculate the time until the next event.
- Removed the case when we stop opening swapout files because the LRU
age gets too low.
- new_StoreEntry now initializes e->swap_file_number to -1.
-
wessels [Tue, 11 Jan 2000 12:00:29 +0000 (12:00 +0000)]
DW:
- Three new functions
- storeSwapFileNumberSet sets or clears swap_file_number and the
filemap bit for a StoreEntry. Replaces much repeated code.
- storeDirLRUAdd and storeDirLRUAddTail manage the per-SwapDir
LRU double-linked lists for cache replacement.
wessels [Tue, 11 Jan 2000 11:57:15 +0000 (11:57 +0000)]
DW:
- Fixed off-by-one bug in comparison when 'suggestion' exceeds
fm->max_n_files.
- Changed file_map_allocate so that it no longer sets the
available bitmap before returning. Now its the job of the
other end to set the bitmap. "allocate" is probably no longer
a good descriptive name.
wessels [Thu, 6 Jan 2000 06:32:17 +0000 (06:32 +0000)]
DW
- User-Agent is taken from HTTP request headers. It seems silly
to make it a special case in aclCheck_t and aclCreateChecklist.
Now acl.c just gets it from request->headers when needed.
wessels [Wed, 5 Jan 2000 13:25:42 +0000 (13:25 +0000)]
This alternate storeDirSelectSwapDir() function is optimized for
DISKD. It selects the cache_dir with the fewest outstanding messages
and then uses free space as the tie-breaker.
wessels [Tue, 4 Jan 2000 02:37:47 +0000 (02:37 +0000)]
- added storeClientCallback function which replaces a lot of
replicated code with a single call.
- fixed storeClientCopy2 which became severly broken from the
merge with 2.3 branch.
- reworked the way 'sc->flags.disk_io_pending' is used. Now
its only set a cleared in the read/write handlers.
wessels [Tue, 4 Jan 2000 02:33:14 +0000 (02:33 +0000)]
Removed 'mem' as a local variable in storeSwapMetaBuild because
its only used in an assertion. If we disable assertions with NODEBUG
then we get 'unused variable' warnings from the compiler.
wessels [Tue, 4 Jan 2000 02:32:33 +0000 (02:32 +0000)]
Removed 'entry' as a local variable in peerGetSomeNeighborReplies because
its only used in an assertion. If we disable assertions with NODEBUG
then we get 'unused variable' warnings from the compiler.
wessels [Sun, 12 Dec 1999 00:58:31 +0000 (00:58 +0000)]
bug fix: mtype parameter varies in size between different platforms.
Digital Unix uses 'mtyp_t' typedef, so we'll try the same. If not
found, the default is long.
wessels [Sat, 11 Dec 1999 22:57:42 +0000 (22:57 +0000)]
Some changes to store hash_table buckets to improve performance.
The default is changed from 50 objects/bucket to 20. Rewrote
storeKeyHashBuckets() and removed the 64K bucket limit. Users
report this change makes a very big difference.
wessels [Sat, 11 Dec 1999 01:11:02 +0000 (01:11 +0000)]
Added a feature so Squid runs a "squid_start" program just before
forking the child process in daemon mode. The "squid_start" script
must be in the same directory as the squid executable. I'm sure that
will change, however, when people complain.
wessels [Fri, 25 Jun 1999 04:53:43 +0000 (04:53 +0000)]
From: Henrik Nordstrom <hno@hem.passagen.se>
What this patch does is to discard the pumpMethod() function, and
instead use the fact that the request has a request entity
(content-length present).
clientCheckContentLength() is extended accordingly to have rules for
methods with requires (PUT/POST) / should not (GET/HEAD) have a request
entity.
wessels [Fri, 25 Jun 1999 03:12:22 +0000 (03:12 +0000)]
Don't clobbert ctrl.message when the PASS command fails.
It looks like we moved the server response to "cwd_message" after
PASS so that it could be displayed in a directory listing, but
if PASS fails it wiped out important information for the user
(such as alternate FTP sites)
wessels [Thu, 27 May 1999 09:26:10 +0000 (09:26 +0000)]
FreeBSD's pthreads breaks dup2(). This means we can't use dup2()
to try to find SQUID_MAXFD in configure. To get around the bug,
we make a temporary LDFLAGS string and remove -pthread.
wessels [Wed, 26 May 1999 11:01:05 +0000 (11:01 +0000)]
Some fixes for swapping out objects that are in STORE_OK state. Need
to make sure that we really write all the data and queue the
swapout file for closing.
DO NOT allow swapout of non-special objects during store rebuilding
phase. This greatly speeds up the rebuild process and prevents
large memory consumption from objects that want to be deleted but
must wait until validation completes.
wessels [Wed, 26 May 1999 10:58:52 +0000 (10:58 +0000)]
Another while loop in storeCleanup() event so that we do at least
50 entries per call, instead of just one hash bucket which might
only have a handful of objects.
wessels [Wed, 26 May 1999 10:57:46 +0000 (10:57 +0000)]
Buffer the StoreEntry when building a mime icon object.
Also set the ENTRY_SPECIAL flag before calling storeComplete so
that it gets swapped out with the new no-swapout-during-rebuild
scheme.
wessels [Wed, 26 May 1999 09:08:12 +0000 (09:08 +0000)]
Two storeSwapOut() changes:
1) with new store-FS scheme, we don't get write callbacks. This means
we were getting some objects "stuck" because we had, say 32K in memory,
but only wrote 8K in storeSwapOut() and there was no signal to make
us write another block. Now we write as many blocks as we can,
instead of just one.
2) Re-fixed the case where storeSwapOut() gets called because the
store_status has changed to STORE_OK, but there is no data to swap
out. Now close the swapout file, as done at the end of storeSwapOut().