I've tried setting up a ramfs directory (ie a ram disk) on /mnt/ram as a
small cache store, in addition to my usual /var/spool/squid directory on my
hd.

I've used the following entry in squid.conf:

cache_dir ufs /mnt/ram 24 16 256
cache_dir ufs /var/spool/squid 200 16 256

Here is the output:

2003/08/23 10:31:12| Max Swap size: 229376 KB
2003/08/23 10:31:12| Rebuilding storage in /mnt/ram (CLEAN)
2003/08/23 10:31:12| Rebuilding storage in /var/spool/squid (CLEAN)
2003/08/23 10:31:12| Using Least Load store dir selection
2003/08/23 10:31:12| Set Current Directory to /var/spool/squid

As you can see, it uses /var/spool/squid as the cache.  When I do df, it
only reports that 4% of the ram disk is in use.  I've tried using
store_dir_select_algorithm round-robin, but get the same result.

I use mirrordir to periodically keep a copy of the cache on the hd.

Is there some way that I can get squid to preferentially use the ram disk to
improve performance (or is the whole idea a waste of time)?



Reply via email to