Re: [squid-users] problem with loaded server

From: Marcus Kool <marcus.kool_at_urlfilterdb.com>
Date: Sat, 07 Apr 2012 19:33:44 -0300

On 04/07/2012 04:37 PM, Mustafa Raji wrote:
> hi
> i have server which i think it's overloaded
> i checked the TIME_WAIT TCP connection status it's normal and below the limits of the os, and file descriptor is set for high value and no warning in cache.log about the file descriptor, so i think it's memory issue or disk bottleneck, the cache contain 6 hard disk for cache, with 12 cache_dir aufs directory, with 115 GB for each partition my Ram is 26 GB, calculating that for each 1 cached GB i need 32 MB, so this amount of ram is not enough, of course with 2024 cache_mem, as a solution to the problem i disabled four partition, and reduce cache_mem to 1024, the server works find but with low memory in the peak hours it reaches to 400 MB , but no browsing suffering from my client, the problem could be considered a disk bottleneck and when i disabled 4 partition the problem goes ? of i can consider it as a memory issue, i realy can't check page fault in the cachemgr because i don't have the right to install it in working server, of course additionally
> cache.log file show me so many invalid request, does the number of these invalid request slowing the performance of the box,
> when i disabled my cache directory i put # sign after my cache_dir directives, does that mean i cant make these partition back to work, because of fresh object in that partition not exist, and what squid will do if it caches objects in the working cache directory and the same object is exist in the disabled partition, does that effect the performance of squid if partition enabled a gain, i hope i was clear in my explanation,
> also i have test squid box, i have two squid installed in the /usr/local/ directory when i start one of them it does not take the squid.conf that exist in it's etc directory so, i must start it with the -f option to force it with the configuration file, what is the cause of these problem please
> thank you with my best regards

http://wiki.squid-cache.org/SquidFaq/SquidMemory:
64-bit Squid needs 14 MB memory index per 1 GB disk cache

Squid has best performance with one cache dir per disk, so you should reduce the number of cache directories from 12 to 6.

The system needs RAM for OS, file system buffers, other processes and network buffers.
Let's reserve 2 GB for that.

Memory cache is much faster than disk cache, but the disk cache is larger.
I suggest to set cache_mem to 8 GB and the total disk cache to 690 GB (6*115) which requires 690*14=9.6 GB in-memory index.

Squid will than at least claim 17.6 GB memory. This is a good starting point for finetuning.
You can probably add more disk cache and/or more memory cache.

If you run 2 squid proxies, they should have separate disks for their disk cache and one cache dir per disk.
For 2 equally configured Squid proxies you could use this:
cache_mem 6 GB and total disk cache 345 GB (3*115) which requires 4.8 GB in-memory index.
Each Squid will than at least claim 10.8 GB memory.

Marcus
Received on Sat Apr 07 2012 - 22:33:50 MDT

This archive was generated by hypermail 2.2.0 : Sun Apr 08 2012 - 12:00:02 MDT