Re: SQUID 2.3 and 512M of RAM

From: Chris Dillon <cdillon@dont-contact.us>
Date: Sun, 9 Jul 2000 14:05:46 -0500 (CDT)

On Sun, 9 Jul 2000, Mike Tancsa wrote:

> I cant seem to control the amount of RAM squid is using on my
> server. My config is below minus all the local ACLs. The box is a
> FreeBSD 4.x machine with 512M of RAM.
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
> 235 squid 2 0 477M 433M poll 469:08 5.57% 5.57% squid

It is using so much memory because you've got about 47GB of cache on
disk (10MB RAM per 1GB of cache on disk, which matches my calculations
elsewhere). Each cache object requires a fixed (more or less, it
seems to be fixed to me) amount of memory. The more objects, the more
memory used. Either increase system RAM, decrease cache_dir size and
therefore decrease number of objects, or increase average object size
so the cache is filled with fewer objects such as by using the LFUDA
replacement algorithm which favors all popular objects, including
large ones. The latter is probably not going to help as much as the
former two, but it helped me and does increase byte-hit ratio.
Increasing system RAM is of course the best solution (combined with
using LFUDA, IMHO). :-)

-- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net
   FreeBSD: The fastest and most stable server OS on the planet.
   For Intel x86 and Alpha architectures. ( http://www.freebsd.org )
Received on Sun Jul 09 2000 - 13:08:24 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:23 MST