]> git.ipfire.org Git - thirdparty/squid.git/commit - src/Transients.cc
Rock and shared memory caches fixes/improvements.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 24 Jun 2014 23:48:37 +0000 (17:48 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 24 Jun 2014 23:48:37 +0000 (17:48 -0600)
commit579b60e6eb80b629d8820e98f8bd4a5cb72f2350
tree517df4d3e641a59f9e1bc3109918b93318c9e97c
parent4f07726a691f32fd23656afad820821a03aacb1f
parente3ab28c046c7926b91f636ace623bae8c5563618
Rock and shared memory caches fixes/improvements.

* Bug fixes:

Avoid "FATAL: Squid has attempted to read data from memory that is not
present" crashes. Improve related code.

Lifted 16777216 slot limit from rock cache_dirs and shared memory caches.
Caches larger than 256GB (assuming default 16KB cache_dir slot-size) require
this fix to use disk space beyond 256GB.  Also fixed rock disk space waste
warning.

Restored Squid ability to cache (in memory) when no disk caches are configured
which was lost during r12662 "Bug 3686: cache_dir max-size default fails" but
other bugs hid this problem.

Allow HITs on entries backed by a shared memory cache only.

Avoid store_client.cc "entry->swap_filen > -1 || entry->swappingOut()" asserts.

Make sure Squid dumps core and not just promises one when memory management
goes wrong.

* Significant RAM usage reduction:

Significantly reduced Large Rock (and slightly shared memory) RAM requirements
by not allocating 40 (and 12) bytes of unused RAM per cache slot.

Stop wasting 96 RAM bytes per slot for high-offset slots in large shared
caches with more than 16777216 slots. For example, a StoreMap for a 1TB shared
cache with default 16KB slot sizes (67108864 slots) occupied about 6.5GB of
RAM. After this change, the same information is stored in about 2.0GB because
unused anchors are not stored.

* Other improvements:

Document counter-intuitive round-robin cache_dir selection; decrease its bias.

Report IpcIo file name with errors and warnings to inform admin which
cache_dir needs troubleshooting or tuning.
src/tests/stub_store.cc