On Fri, 23 Sep 2011 11:58:09 +0200 (CEST), Fred B wrote:
Hi,

Actually i use squid with workers and diskd

workers 2
if ${process_number} = 1
cache_dir diskd /cache1 130000 128 512
else
cache_dir diskd /cache2 130000 128 512
endif

But i lost cache performance because the caches are not shared
How to use (test) the new feature RockStore with
squid-3.2.0.12-20110923-r11343 (compilation, squid.conf) ?

Thanks

rock is just another cache_dir type. With this one you need to set max-size to something reasonable in the KB range.
Make sure you run squid -z to create the directory properly first.

There are a couple of quirks which you may need to work around:
* a full restart is needed to change dirs, reconfigure wont work (yet). * there seems to be a bug in -z where dirs hidden inside if statements are not always built. So put them outside the "if" for the -z setup step to be safe. After that it seems fine for the run operations.


From the docs which will get published next release:
"
        The rock store type:

            cache_dir rock Directory-Name Mbytes <max-size=bytes>

        The Rock Store type is a database-style storage. All cached
entries are stored in a "database" file, using fixed-size slots,
        one entry per slot. The database size is specified in MB. The
        slot size is specified in bytes using the max-size option. See
        below for more info on the max-size option.

        swap-timeout=msec: Squid will not start writing a miss to or
        reading a hit from disk if it estimates that the swap operation
        will take more than the specified number of milliseconds. By
        default and when set to zero, disables the disk I/O time limit
        enforcement. Ignored when using blocking I/O module because
        blocking synchronous I/O does not allow Squid to estimate the
        expected swap wait time.
"

On the whole rock fills the niche where COSS was used previously. So objects over something like 128KB would be best kept in diskd or AUFS dirs. If you like you could experiment with a set of rock dirs using min-size/max-size to split the files into bands for efficient space usage. We are interested in things like that to figure out what working practices should be advised.

Amos

Reply via email to