Re: [squid-users] Recommendable value of cache_mem?

From: Jakob Curdes <jc@dont-contact.us>
Date: Tue, 26 Sep 2006 18:05:22 +0200

Monty Ree schrieb:

> Hello....
>
> I have 4G RAM squid..
> What is the recommendable value of this variable?
>
> cache_mem

From the FAQ :

"How much memory do I need in my Squid server?

As a rule of thumb on Squid uses approximately 10 MB of RAM per GB of
the total of all cache_dirs (more on 64 bit servers such as Alpha), plus
your cache_mem setting and about an additional 10-20MB. It is
recommended to have at least twice this amount of physical RAM available
on your Squid server. For a more detailed discussion on Squid's memory
usage see the sections above.

The recommended extra RAM besides what is used by Squid is used by the
operating system to improve disk I/O performance and by other
applications or services running on the server. This will be true even
of a server which runs Squid as the only tcp service, since there is a
minimum level of memory needed for process management, logging, and
other OS level routines.

If you have a low memory server, and a large disk, then you will not
necessarily be able to use all the disk space, since as the cache fills
the memory available will be insufficient, forcing Squid to swap out
memory and affecting performance. A very large cache_dir total and
insufficient physical RAM + Swap could cause Squid to stop functioning
completely. The solution for larger caches is to get more physical RAM;
allocating more to Squid via cache_mem will not help."

> cache_swap_low
> cache_swap_high
>
This has nothing to do with memory; these are the values that control
when your disk is purged and how much of the content will be thrown
away. Please read the comments in the sample config file carefully. The
defaults are reasonable; for a large cache you can use smaller numbers
(there is no point in leaving 2 GB or more of your disk unused).

Yours,
JC
Received on Tue Sep 26 2006 - 10:03:16 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Oct 01 2006 - 12:00:04 MDT