Re: [squid-users] different size cache_dir usage question

From: Brian <hiryuu@dont-contact.us>
Date: Mon, 08 Jul 2002 01:00:21 -0400

On Sunday 07 July 2002 06:57 pm, Brian wrote:
> On Sunday 07 July 2002 05:30 pm, Henrik Nordstrom wrote:
> > On Sunday 07 July 2002 21.47, Brian wrote:
> > > Squid fills the directories based on space remaining (total - in
> > > use) instead of percentage. I assume that's to avoid floating
> > > point math, but it is kind of annoying with different sized
> > > directories.
>
> This looks reasonably correct. I'll let you know how it goes.
>
> -- Brian

Note that, due to the limited resolution with 32-bit math, this patch may
not always select the true lowest percentage. Switching to (double) math
would correct the problem, but at a slightly higher performance cost.

Still, it's acceptably close without floating point.

Store Directory #0 (aufs): /var/squid1
FS Block Size 4096 Bytes
First level subdirectories: 4
Second level subdirectories: 256
Maximum Size: 6656000 KB
Current Size: 1178912 KB
Percent Used: 17.71%
Filemap bits in use: 15127 of 16384 (92%)
Filesystem Space in use: 1218688/8594504 KB (14%)
Filesystem Inodes in use: 0/-1 (0%)
Flags:

Store Directory #1 (aufs): /var/squid2
FS Block Size 4096 Bytes
First level subdirectories: 4
Second level subdirectories: 256
Maximum Size: 13312000 KB
Current Size: 2361356 KB
Percent Used: 17.74%
Filemap bits in use: 29260 of 32768 (89%)
Filesystem Space in use: 2413900/17967556 KB (13%)
Filesystem Inodes in use: 0/-1 (0%)
Flags: SELECTED
Received on Sun Jul 07 2002 - 23:00:22 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:11 MST