[squid-users] Re: Help me About Squid

From: Adam Aube <[email protected]>
Date: Thu, 20 Jan 2005 08:46:52 -0500

Oliver Hookins wrote:

> Umar Draz wrote:

>> i have 512MB ram and 1100MB swap
>> now questions is this i have set 5GB /cache so what should be cache_mem

> If you check out the archives you will see that the rule of thumb for
> disk cache to memory cache is about 100:1 (if I remember correctly). So
> for a 5GB disk cache you should have 50MB of memory to handle it.

No, that's the rule of thumb for how much memory Squid will use to store
cache metadata, which is based purely on the size of the cache. The
cache_mem setting controls how much memory Squid will use to cache on-disk
objects in memory (which improves performance).

Generally the default for cache_mem does not need to be changed, because the
OS itself will use free memory to cache files. Items in Squid's cache that
are frequently or recently accessed will be included in this file cache.

If a memory shortage occurs, the OS can dump file cache to free up memory,
but memory used by Squid's cache_mem setting can only be recovered by
swapping out Squid, which will drastically hurt performance.

Adam
Received on Thu Jan 20 2005 - 06:47:09 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 07 2005 - 12:59:35 MST