Re: [squid-users] huge page faults

From: Joe Cooper <joe@dont-contact.us>
Date: Fri, 05 Apr 2002 10:02:47 -0600

Henrik Nordstrom wrote:
> Hermann Strassner wrote:
>
>>Hello!
>>
>>
>>>I will soon go and kill that statement from the Squid FAQ. It is meant
>>>as an indication that cache_mem is not the memory limit of Squid, but
>>>many people misread it to think that Squid will use 3 to 4 times
>>>cache_mem.
>>
>>Yes. This leads to misunderstanding.
>
>
> Squid squid.conf comment is now rewritten to read
>
> cache_mem
>
> NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
> IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
> USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
> THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
>
> 'cache_mem' specifies the ideal amount of memory to be used
> for:
> * In-Transit objects
> * Hot Objects
> * Negative-Cached objects
>
> [...]
>
>
> Joe: What is your current rule-of-thumb on how to size the memory of a
> Squid system? You have more experience than me on this, and I'd like to
> add a note to the FAQ on this in addition to the existing extensive
> discussion on why it uses all this amount of memory..

I'm a bit more generous with memory than necessary, because our ISP
workloads are pretty spiky, but these are the systems as we ship them:

10GB cache_dir (1xIDE) == 256 MB RAM
20GB cache_dir (2xIDE) == 512 MB RAM
24GB cache_dir (SCSI) == 1 GB RAM
45GB cache_dir (SCSI) == 2 GB RAM

So, to put that into a rough formula:

    10 MB RAM per GB in cache_dir
  + cache_mem (24 or 48 MB for IDE and SCSI respectively)
  * 2
  = A good amount of memory

So if I've got 10GB of disk specified for cache_dir I'd spec:

   100 MB, a generous object index guesstimate
  + 24 MB, for cache_mem
  * 2
-----
   248 MB

For accelerators I spec much more, usually. Minimum 2GB unless the
client knows they'll never have a workload larger than 512MB. Also
these cache_dirs are probably somewhat bigger than they need to be for
the workloads the boxes can sustain...clients like to get their moneys
worth, and hate to see half a disk unused. So I try to balance the
smallest disks we can get from suppliers with enough memory to support
extra cache_dir space.

-- 
Joe Cooper <joe@swelltech.com>
http://www.swelltech.com
Web Caching Appliances and Support
Received on Fri Apr 05 2002 - 09:05:20 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:07:22 MST