Re: [squid-users] cache_dir and file system performance

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Tue, 13 Jun 2006 20:56:34 +0200

tis 2006-06-13 klockan 19:55 +0300 skrev genco yilmaz:
> There is a formula in squid-cache.org page to calculate the number
> of first and second level directories. How does this decision differs
> or let me say, when we have reiserfs file system on cache_dir, do we
> add any factor to this formula? You know reiserfs doesnt have linear
> search algorithm and its performance is different when large amount of
> files exist in a directory.

The default size of L2 is believed to be quite suitable for reiserfs as
well. It's not only about search time but also a background job which
scans the L2 directories one at a time looking for inconsistencies.

> I am asking this question because I have seen a squid installation
> which has 3GB of cache_dir having the following configuration:
> cache_dir aufs /var/spool/squid 3072 60 312
>
> Isn't this too large for a 3GB of cache_dir which is a reiserfs file
> system.

Way too large.

60 * 312 * 312 * 13KB / 2 = 74148MB.

> I will test performance difference when I decrease the first
> level number of directories but before that I would like to get your
> opinions. If you have any ideas, I will be glad to hear them.

Number of L1 directories doesn't make any difference on performance as
long as it's sufficiently large. The only impact of the number of L1
directories is the number of filesystem inodes wasted on creating lots
of unused directories.

Regards
Henrik

Received on Tue Jun 13 2006 - 12:56:40 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Jul 01 2006 - 12:00:01 MDT