Search squid archive

Re: small objects memory caching issue ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/12/10 09:25, vincent.blondel@xxxxxx wrote:

After some memory upgrade to 4GB RAM, I am trying to optimize my squid caches to maintain as most as little objects in memory without storing them on disk. Big objects are not kept in memory but stored on disk.

these are my config parameters ...

cache_mem 600 MB
memory_replacement_policy heap GDSF
maximum_object_size_in_memory 16 KB
cache_replacement_policy heap LFUDA
minimum_object_size 16 KB
maximum_object_size  100 KB
cache_swap_low 95
cache_swap_high 95

acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

The above lines are no longer recommended. Dynamic content can be and is emitted with suitable headers for caching.

Instead of this we recommend a new refresh_pattern added directly above the "." pattern one:
  refresh_pattern -i (/cgi-bin/|\?) 0 0% 0

cache allow all

I notice not all small objects are kept in memory but we are well speaking about objects ...

* not containing ? in the query
* smaller than 16KB
* containing some explicit 'Content-Length' http header
* not containing any 'pragma no-cache' header

so my questions are ...

Is 'squidclient mgr:vm_objects |egrep 'GET|POST'' really the command to get all objects in memory (or is there another command) and is this command real-time (or do we have to expect some delay ) ??

Yes it is. It is real-time as of the point at which squid started processing that cachemgr request.

Is the instruction 'cache' applicable for all kind of caching (memory and disk) or this only for disabling disk caching ??

Yes this is a global control on cached objects.

minimum_object_size and maximum_object_size are also global limits.

By specifying "minimum_object_size 16KB" you are preventing caching of those objects smaller.

Since you have Squid 2.7 you have the min-size parameter available on your cache_dir which prevents known smaller objects being stored there.

I recommend a COSS directory for overflow of small objects from the RAM cache. COSS is optimized for small object storage with disk-backing a section of memory. The example COSS configs have all the settings you need to play with for splitting by object size regardless of whether you use COSS.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.9
  Beta testers wanted for 3.2.0.3


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux