adrian [Wed, 3 May 2000 23:15:38 +0000 (23:15 +0000)]
MODIO_1 commit. This change (including documentation) implements a more
modular storage directory system, which leaves object replacement and IO
up to the storage modules.
There is a lot of repeated code in the FS modules and some tidying up
is in the pipeline.
The documentation for this new API is in doc/Programming-Guide/prog-guide.sgml .
hno [Wed, 3 May 2000 03:35:24 +0000 (03:35 +0000)]
hno squid-2.3.STABLE1.strict_authenticate_ip_ttl.patch [variant there of]
Squid-2.3.STABLE1: strict authenticate_ip_ttl option
Changed authenticate_ip_ttl to have an strict option, enforcing that
the user comes from one IP address only.
Changes from the patch: Added another squid.conf directive for enabling
this rather than overloading the authenticate_ip_ttl option with negative
values..
hno [Wed, 3 May 2000 03:21:05 +0000 (03:21 +0000)]
hno squid-2.3.STABLE1.http_reply_null_character.patch
Squid-2.3.STABLE1: Handle NULL characters in the server reply headers
Squid failed to detect the end of the servers HTTP headers if the server
wrongly responds with headers containing a NULL character. This could
cause abnormal amount of used cache_mem during the request. (the server
in question was mp3 streaming, virtuallu unlimited in size)
hno [Wed, 3 May 2000 02:58:29 +0000 (02:58 +0000)]
hno squid-2.3.DEVEL3.squid.conf_template_update-4.patch
Squid-2.3.DEVEL3: Major update of squid.conf template generation
A major update on how squid.conf is generated from cf.data.pre and
some related changes.
* Default lines are generated from the compiled default settings (less
duplication in cf.data.pre)
* Non-enabled functions gets a note telling that the directive isn't enabled
and what configure option (or defined) that is required to enable it.
hno [Wed, 3 May 2000 02:41:22 +0000 (02:41 +0000)]
hno squid-2.3.DEVEL3.ftp_all_messages.patch
Squid-2.3.DEVEL3: Show FTP server messages
Show all FTP server messages in generated error pages or top level
directory listing. Main purpose is to make sure all information is
available when a login is denied due to to many users or a closed
mirror.
hno [Wed, 3 May 2000 02:31:44 +0000 (02:31 +0000)]
hno squid-2.3.DEVEL3.round_robin_clear_counter.patch
Squid-2.3.DEVEL3: Reset "round-robin" counters every 5 minutes
Reset "round-robin" peer selection counters every 5 minutes to speed up
recovery when a dead peer has come on line again ("round-robin" is
implemented by "least-frequently-used", which without this patch gets
stronly biased to the previously dead peer).
hno [Wed, 3 May 2000 02:18:21 +0000 (02:18 +0000)]
hno squid-2.3.DEVEL2.ipcache_reload.patch
Squid-2.3.DEVEL2: Purge ipcache on reload/PURGE
Purge negatively cached ipcache entries on reload to allow end users to
quickly purge sporious errors, and have the PURGE method also purge
ipcache to allow the cache administrator to manually purge important
entries on DNS updates.
hno [Wed, 3 May 2000 02:07:37 +0000 (02:07 +0000)]
hno squid-2.3.DEVEL2.rebuild_release.patch
Squid-2.3.DEVEL2: Release unused store entries during rebuild
Squid locked all "released" store entries in memory during the rebuild
procedure, even such entries not needed in the "LateRelease" procedure.
Also, during a dirty rebuild a lot of store entries got locked up which
never was queued for "LateRelease", causing a huge memory leak.
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.