Re: Unsure about the current state of maximum_object_size

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 05 Jun 2013 12:38:32 +1200

On 5/06/2013 3:00 a.m., Eliezer Croitoru wrote:
> I am not sure if this is how it suppose to be or not.
> in the squid.conf I am using:
> #objects size
> maximum_object_size_in_memory 20 MB
> maximum_object_size 256 MB
> cache_dir aufs /usr/local/squid/var/cache/squid 40000 16 256
>
> when the above is used I see a lot of low hit rates on large objects
> such as a nice 22 MB file.

What do you mean by "lof of low hit rates"?
   you see a hit rate but it is slow? or you see no HITs at all?

With the above, the >20MB objects are only stored in cache_mem, they are
not stored on disk. So will only HIT if the memory space for hot objects
can fit them for the entire time between first fetch and current fetch.
If the mem space ever needs to push them out to disk they will be
dropped instead.

> I then added the max-size=256000000 to the cache_dir and it seems to
> make the big difference.
> I am uncertain what we decided about it??
> if there is a must on the need of max-size=x bytes we should consider
> adding it to the default cache_dir directive and as a must.

There is not. When max-size= is missing it gets set to
maximum_object_size or the cache_dir total size, whichever is smaller.

The first configuration limited disk to 20MB objects, when you added a
much larger max-size= parameter you increased that up to about 256MB,
allowing large (22MB) objects to be moved from memory cache to disk
cache for longer storage time and better overall HIT rate.

>
> I myself thing it's good to know what is the max size of the cache_dir
> size.
> what do you think it should be tuned by? max_onbject_size pr max-size?

If you want one size for all cache_dir use max_object_size, if you want
specific max for any given cache_dir set its max-size= to that value.

maximum_object_size_in_memory acts like a max-size= parameter on cache_mem.

The CacheMgr report could do with some more details in this area. Its
currently only dumping the capacity, used, free parameters IIRC.

Amos
Received on Wed Jun 05 2013 - 00:38:41 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 05 2013 - 12:00:30 MDT