[squid-users] What would be the maximum ufs\aufs cache_dir objects?
Amos Jeffries
squid3 at treenet.co.nz
Fri Jul 14 16:47:07 UTC 2017
On 15/07/17 00:37, Eliezer Croitoru wrote:
> What would be the maximum ufs\aufs cache_dir objects? > Let say I have unlimited disk space and inodes and RAM, what would be the
> maximum objects I can store on a single ufs\aufs cache_dir?
One UFS cache_dir can hold a maximum of (2^27)-1 safely.
Technically it does not need the -1, but the old C code uses a mess of
signed and unsigned types to store the has ID value. Some (not all)
people hit assertions when the cache reaches that boundary.
> It's very easy to test but first I want to understand what might be the
> limit?
The index hash entries are stored as a 32-bit bitmask (sfileno) - with 5
bits for cache_dir ID and 27 bits for hash of the file details.
> I am asking since the structure is top level dirs and sub level dirs, so if
> I want to get the maximum object capacity (assuming each one would use
> 0.5kb)?
The L1/L2 separation is to cope with old filesystems that had limited
number of files in a directory.
Apparently, that limitation is no longer relevant with the current
generation of filesystems.
Amos
More information about the squid-users
mailing list