[squid-users] Re: Help me About Squid

From: Ric Lonsdale <bikerric@dont-contact.us>
Date: Mon, 21 Feb 2005 21:00:37 -0000

From: "Adam Aube" <aaube01@baker.edu>
Sent: Thursday, January 20, 2005 1:46 PM
Subject: [squid-users] Re: Help me About Squid

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

Following the thread above, I have 4Gb RAM, 11Gb for the cache and 5Gb for
swap.
I've set cache_mem to 2Gb as I too thought that the higher this field was
set to, the better the performance would be, as Squid would be able to store
more in memory, therfore requiring less retrievals from the disk.
Users are complaining about internet speed and I have been blaming WAN
bandwidth from their location up to the Squid servers and also the ISP link.
I'm now a bit worried that I've misinterpreted previous mailings on sizing
of cache_mem.
Can you clarify, as my swap is currently using 1Gb as well as all the RAM.
If I set it to 8Mb, are you saying that Squid will use the rest of my 4Gb
RAM as it sees fit?
If so why have this setting? I'm missing the point here I'm sure, so please
advise.

Thanks,
Ric
Received on Mon Feb 21 2005 - 13:59:50 MST

This archive was generated by hypermail pre-2.1.9 : Tue Mar 01 2005 - 12:00:02 MST