wessels [Thu, 9 Mar 2000 11:50:13 +0000 (11:50 +0000)]
DW:
- storeMaintainSwapSpace was breaking out of the scan loop if the
current space was below the HIGH water mark, but the event is
rescheduled at a small interval when space is near the high water
mark. Changed the check to use the low water mark instead.
wessels [Mon, 6 Mar 2000 23:24:56 +0000 (23:24 +0000)]
DW:
- We're passing -1 swapfile number to storeDirDiskFull becuse the
swapfile number got reset earlier. Need to pass the 'bad' swapfile
number instead..
wessels [Tue, 1 Feb 2000 12:52:15 +0000 (12:52 +0000)]
DW:
- This fixes an ugly and probably old bug with hot objects. Previously,
storeSwapOut was too aggressive in freeing lower parts of in-memory
objects. It would free up to how ever much was sent to the client,
or how much had been saved to disk, whichever was lower. When the
object response is complete, it is saved in memory only if mem->inmem_lo
was equal to zero. Thus, many objects which could potentially be
held in memory wouldn't be, because the lower part had been freed
in storeSwapOut.
This change doesn't free the lower part until the hi-lo gap is
at least DISK_PAGE_SIZE (8192 bytes). This means that in-memory
hot objects should mostly be 8kb or less. This change makes a
very significant improvement in memory hit ratio.
wessels [Tue, 1 Feb 2000 12:45:33 +0000 (12:45 +0000)]
DW:
- Changed validation process to scan 500 (instead of 50) objects
per call. This should be fine because validation does not much
more than set the ENTRY_VALIDATED flag for each object.
wessels [Tue, 1 Feb 2000 12:43:02 +0000 (12:43 +0000)]
DW:
- Changed storeGetMemSpace so that it doesn't immediately exit
if the store is in rebuilding phase. Purging memory objects
should be a "light" activity, so there should be no performance
penalty. If we don't purge memory objects during the rebuild
phase, then memory usage grows without bounds until rebuilding
is complete. At high workloads this can cause malloc to fail.
wessels [Fri, 14 Jan 2000 15:37:03 +0000 (15:37 +0000)]
DW:
- Bug fix with Config.onoff.enable_purge flag. The PURGE method is
kind of dangerous. It would be allowed by default for most access
control configurations because its not mentioned specifically.
Thus, we don't allow any PURGE requests unless the PURGE method
is mentioned in the access list configuration. Before the fix we
set the enable flag, but it never got cleared upon a reconfigure.
Also users complain that defining an ACL that is never used in
an access list shouldn't trip this flag. With the fix, the PURGE
method must be referenced in the 'http_access' list, and we make
sure to clear the flag on reconfigure.
wessels [Tue, 11 Jan 2000 13:02:54 +0000 (13:02 +0000)]
DW:
- Changed swap_file_number assignments to use the new
storeSwapFileNumberSet function.
- Also show scanned/removed/high_size stats in storedir cachemgr
output.
wessels [Tue, 11 Jan 2000 13:01:08 +0000 (13:01 +0000)]
DW:
- New storeDirSelectSwapDir function selects SwapDirs on round-robin
basis. SwapDirs that are full are skipped.
- Changed storeDirWriteCleanLogs to use the new SwapDir-attached
LRU lists.
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)