Roger 'Rocky' Vetterberg wrote:
Chris Robertson wrote:
Roger 'Rocky' Vetterberg wrote:
Hi list.
[snip]
I have tried to configure them according to what I read in
documentation and FAQ's, but I run into heavy swapping, "Unable to
allocate" errors or just bad performance. It seems I'm having
problems finding a good balance between performance and stability.
Have you read through the genuine Squid FAQ section on memory
(http://wiki.squid-cache.org/SquidFaq/SquidMemory)? It's probably a
good place to start.
Yes, several times. It explains in great detail what certain errors
mean and how to see how much memory is used for what, but does not
give much help when it comes to calculating what values to use.
http://wiki.squid-cache.org/SquidFaq/SquidMemory#head-09818ad4cb8a1dfea1f51688c41bdf4b79a69991
And I quote:
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.
So if you have 512 MB of RAM, use 256 explicitly for Squid. Using the
default of 8MB for cache_mem, this gives you the freedom to use up to
around 23GB of cache_dir space ((256 - 8 - 20)/10MB * 1GB). Tweak to fit.
Chris