Re: [squid-users] Continuously growing SWAP

From: Henrik Nordstrom <hno@dont-contact.us>
Date: 20 Jan 2003 21:41:16 +0100

mån 2003-01-20 klockan 18.11 skrev Ron Vachiyer:

> I fully understand this. And, I have tried running squid for several weeks
> at 8MB and 16MB of cache_mem with the same effect. I believe it may have to
> do perhaps with a leak in the wccp.o module or delay pools, however I don't
> have the knowledge to test these theories.
>
> No matter how much RAM I put in the machine, I will have swap growth. The
> "FREE" RAM drops down to about 7-8 MB, and will move back up to about 10Mb
> and add a few megs to the paged RAM. The machine yo-yos between 6 and 10Mb
> of free RAM, and as it goes back up, so does the swap.

What OS are you using?

And what does memory monitoring tools report as

- Memory in use
- Memory in use for caching/buffers

And how does these compare to

- RSS of Squid
- Total space in arena, as reported by Squid cachemgr
- Total accounted for, as reported by Squid cachemgr (if -1, see the
total in the memory utilization page instead.. or patch your squid)

Plotting the memory usage parameters with rrdtool/mrtg is recommended to
get a good understanding of where/when memory is being consumed.

  * Amount of swap used (OS)
  * Amount of cache/buffers used (OS)
  * Total space in arena (Squid)
  * Total accounted for (Squid)
  * Total free (Squid)

Note: amount of Free ram as reported by the OS is mostly irrelevant..
there should only be a handful of MB if your OS is doing it's job
correcly once the server has been used for a while.. what is not in use
by applications+kernel should be in use for cache/buffers.

IF you see that the "Total space in arena" is fairly static then your OS
is quite likely playing games on you and large pushing applications out
to swap when there is disk I/O even if there is plenty of memory. Could
also be a OS related memory leak. Fix your OS.

If you find that "Total space in arena" and "Total Free" is growing a
lot then there is a quite likely problem with your malloc package.

If you find that the difference between "Total space in arena" and
"Total accounted for" is growing a lot then there is quite likely a
memory leak in Squid. None known at this time however..

If "Total space in arena" grows first and then "Total Free" takes a
sudden jump then there is a request related temporary memory leak in
Squid. If "Total accounted for" grew at the same time then further hints
can be found from the "Memory utilization" page of cachemgr (look for
pools which have been much larger than they are now)

Regards
Henrik

-- 
Henrik Nordstrom <hno@squid-cache.org>
MARA Systems AB, Sweden
Received on Mon Jan 20 2003 - 13:41:22 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:12:44 MST