Re: Squid2.1 Patch2 memory problem on Linux redhat 5.2

From: David J Woolley <djw@dont-contact.us>
Date: Fri, 8 Jan 1999 14:20:37 +0000

>
> I've just installed Squid2.1 PATCH2 on a Redhat Linux 5.2 and
> everything was installed ok. It is running now for about 8 hours and
> my problem is the memory available or free has dropped from
> 94 mb to 2.2 mb as of this moment and I think is still dropping.
> This is according to the "top" program.

This is normal. The time to worry is when the size of squid, as
shown by ps -m, on Linux, keeps increasing. Linux tries to maintain
a certain amount of free memory (the initial value depends on the
physical memory, but you can modify it using the proc filesystem).
If it goes below the target, it starts discarding read only pages,
swapping out dirty pages, etc.

Note that squid itself will increase in size until it reaches 2 to 3
times the memory size figure, so you could well have 60M of squid
data, and 43M of files cached outside of squid.

> Here is the output of my top program after it has been running for * hrs.
>
> Mem: 127716K av, 125408K used, 2308K free, 27588K shrd, 43164K buff
> Swap: 104384K av, 68K used, 104316K free 34076K cache
>

The fact that you only have a token amount of swap space used
indicates that the system is still quite comfortable with its memory
useage.

These are the (default) controlling parameters for a 32M machine:

saracen:/proc/sys/vm# cat freepages
88 132 176

i.e start rejecting memory requests at 332k free, start freeing pages
at 512k free and don't worry if there is more than 704k. So the
target free space for a 128M system may well be 2048k to 2832k, which
is quite consistent with what you are seeing.

Other systems have different policies, e.g. SCO 3.2v4.2 allocates
buffer space at load time and requires enough swap space to cover all
physical memory, even if never used. (3.2v5.0.x is more dynamic, but
not, I think, as dynamic as Linux.)

-- 
David Woolley - Office: David Woolley <djw@bts.co.uk>
BTS             Home: <david@djwhome.demon.co.uk>
Wallington      TQ 2887 6421
England         51  21' 44" N,  00  09' 01" W (WGS 84)
Received on Fri Jan 08 1999 - 08:18:14 MST

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