]> git.ipfire.org Git - thirdparty/squid.git/commit - src/Transients.cc
Lifted 16777216 slot limit from rock cache_dirs and shared memory caches.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 6 Apr 2014 21:02:18 +0000 (15:02 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 6 Apr 2014 21:02:18 +0000 (15:02 -0600)
commit36c84e199a995f639a720362195bda49368c6a53
tree68076967e9303692a4aad6c36a9494fc2741cebd
parent82ed74dc176195b515e07187351531151ffb9e8d
Lifted 16777216 slot limit from rock cache_dirs and shared memory caches.
Also fixed rock disk space waste warning.

Rock store and shared memory cache code used entry and slot limit as if
the two were the same. In large caches, the number of entry slots may exceed
the number of entries supported by Squid (16777216 entries per store). This
is especially likely with large caches storing large entries (many slots
per entry with maximum number of entries) or large caches using small slot
sizes.

AFAICT, the bug led to the "tail" of cache storage being unused and cache
entries being purged even though there was still space to store them. Also,
Squid was allocating smaller shared memory tables (and temporary cache index
build tables) than actually needed for the configured cache sizes.

Note that this change does not remove the per-store 16777216 entry limit.

The old [small] rock warning about wasted disk space assumed that a cache
entry occupies exactly one slot. The updated warnings do not.

Also fixed and simplified db scanning condition during cache index build.
src/MemStore.cc
src/MemStore.h
src/Transients.cc
src/Transients.h
src/fs/rock/RockRebuild.cc
src/fs/rock/RockRebuild.h
src/fs/rock/RockSwapDir.cc
src/fs/rock/RockSwapDir.h
src/ipc/StoreMap.cc
src/ipc/StoreMap.h
src/tests/stub_MemStore.cc