[squid-dev] [PATCH Bug 4534 and N-bit fixes for CacheDigest

Amos Jeffries squid3 at treenet.co.nz
Sun Jul 10 10:08:23 UTC 2016


On 10/07/2016 1:37 a.m., Amos Jeffries wrote:
> This patch converts the CacheDigest members and method parameters to use
> explicitly sized data types more appropriate for what details they hold.
> 
> * 64-bit Digest capacity (entry count)
> * 32-bit Mask Size (byte count)
> *  8-bit Bit count per entry
> 
> Due to various store_digest.cc code still relying on masks not exceeding
> 2^31-1 worth of memory space we have to still assert that bitCount
> calculation does not exceed that value.
> 

Additional to this, to fully fix the bug 4534 issue we are going to have
to decide if it is reasonable to have extremely large Cache Digest masks
(several tens of GB or memory).

The caches the bug appears on are all several TB of size (by space). But
even more importantly they are spread over more than 5 cache_dir. So the
2^25-ish limit on entries per cache_dir is not keeping the total
Squid-wide object count within a 32-bit value.

Amos



More information about the squid-dev mailing list