hno [Wed, 3 May 2000 01:53:52 +0000 (01:53 +0000)]
hno squid-2.3.STABLE1.no_cache_full_acl_check.patch
Squid-2.3.STABLE1: Make no_cache a full-blown aclNBCheck
no_cache was a fast ACL check, which serverely limits which acl types
that can be reliably used. This patch extends it to a full blown
aclNBCheck which allows all of the ACL types to be used like in
http_access.
hno [Wed, 3 May 2000 01:43:30 +0000 (01:43 +0000)]
hno squid-2.3.DEVEL2.cache_swap_log_name-2.patch
Squid-2.3.DEVEL2: cache_swap_log name based on cache_dir name
%s can now be used in cache_swap_log to build a log file name based on
the cache_dir name instead of numbering the files according to their
corresponding cache_dir location in squid.conf. This is very useful if
you'd like to be able to add or remove cache directories while using
cache_swap_log to have the index files stored outside the cache
directories.
hno [Wed, 3 May 2000 01:40:12 +0000 (01:40 +0000)]
hno squid-2.2.STABLE4.aio_cond_segfault-2.patch
Squid-2.2.STABLE4: Async-IO segfaults if AIO_PROPER_MUTEX isn't set
Async-IO on Linux segfaults in condition variables if given high load
and AIO_PROPER_MUTEX isn't set. This was seen on a SMP Alpha Linux
2.2.10-ac12 box. I knew there was a reason why I made the
AIO_PROPER_MUTEX code a long time ago..
[an incorrect version of this simple patch was already committed]
hno [Wed, 3 May 2000 01:35:23 +0000 (01:35 +0000)]
hno squid-2.2.STABLE5.log_ip_on_direct.patch with additions
Squid-2.2.STABLE5: Log destination IP on DIRECT
This patch logs the destination IP as part of the hierarchy tag in
access.log when going direct. This has been requested by a number of
people from accounting reasons, and logging the hostname is mostly
redundant as it is part of the URL as well.
Additions: Can be rewerted to the old behaviour by turning log_ip_on_direct off
hno [Wed, 3 May 2000 01:21:59 +0000 (01:21 +0000)]
hno squid-2.3.DEVEL2.stat_ufs_fs.patch
Squid-2.3.DEVEL2: Show usable filesystem space in cachemgr, not raw
Change cachemgr Store Directory Stats to show space available to Squid
rather than raw filesystem space (some space are available to root only)
Also extend the support for this on Linux.
hno [Wed, 3 May 2000 00:55:10 +0000 (00:55 +0000)]
hno squid-2.2.STABLE2.delay_pools_initial_level_overflow.patch
Squid-2.2.STABLE2: delay pools, large initial level
It was a bit to easy to get a integer overflow when using delay pools for
limiting daily download. Changes the initial calculation to use floating
point math, allowing a initial pool size of up to 2^31-1.
allow-miss cache peer option to disable the use of "only-if-cached" on
requests to siblings. This can be useful in some peering arrangements
where icp_hit_stale is enabled.
hno [Wed, 3 May 2000 00:49:26 +0000 (00:49 +0000)]
hno squid-2.2.STABLE2.to_large_objects-2.patch
Squid-2.2.STABLE2: Don't swap out objects > maximum_object_size
Don't start swapping out objects with a known size larger than
maximum_object_size. Previously Squid would swap out these objects and
mark it as private once maximum_object_size was hit.
This is an attempt to fix the dynamic ICP timeout selection when one is
peering with remote parents and have some close-by siblings with a much
lower ICP rtt. This is done by preferring to calculate the ICP timeout
based on parents only (based on siblings if there is no alive parents)
New squid.conf directive: nonhierachical_direct. This controls if
requests Squid classifies as non-hierarchical (matches
hierarchy_stoplist or non-cachable request type) should go direct if
possible, or if parents should be used on such requests. Also improved
parent selection for never_direct to try to selects all available parents
to increase the likelyhood that there is at least one alive parent where
the request can be forwarded.
DW:
- storeSwapout() has a recently-added bug that causes huge amounts
of memory to get tied up for some pending requests. Observed what
seemed to be a "Range" request where store_client->copy_offset
was larger than MemObject->inmem_hi. That is, the server side
didn't yet get the data that the client wants. In this case, the
whole object was being stored in memory.
The cause was the recent change so that more objects can be
cached in memory, rather than always freeing up to the lowest
reader offset.
The fix (hack?) is to check the case when lowest offset is larger
than inmem_hi. It also requires changing storeLowestMemReaderOffset
so that the initial "low_offset" is inmem_hi+1.
DW:
- Disabling a mysterious block at the beginning of httpRequestFree
that causes incomplete transfers to be logged with status code
"000." There seems to be no bad side effects from taking it out.
DW:
- Fix possible memory access bug. Before the change we would always
copy 4096 bytes from 'headers' to 'buf'. Not only was it wasteful,
but it accessed uninitialized memory.
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.