Re: [squid-users] Squid slowness over time ...

From: Justin Hennessy <jhennessy@dont-contact.us>
Date: Fri, 21 Jun 2002 12:19:20 +0930

Thanks for that Joe, I will be out to get the book today. *grin*

Below is the current memory usage of my dedicated squid server:

Mem: 61800K av, 60012K used, 1788K free, 12K shrd,
1724K buff
Swap: 152576K av, 46056K used, 106520K free
16944K cached

From what you were saying the swap is too big.

I have just found out that there is only 64M of memory in this machine.
This is probably the problem.

Having said that though I just wanted to know what the process was for
identifying problems on a Linux system (as I am fairly new to server
admin on this platform).

>>> Joe Cooper <joe@swelltech.com> 21/06/2002 11:59:11 am >>>
Checking memory usage is a general Unix skill. You'll want to grab a
good Unix system administration book, before getting yourself too
deeply
into any specific applications for your Unix server (a good start is
Essential System Administration by Frisch).

But in this case, try the manpage for top:

man top

Your primary concern is whether Squid has partially swapped out due to

its size. For an example, the memory section on my workstation looks
like this at the moment:

Mem: 385028K av, 352000K used, 33028K free, 0K shrd, 24824K buff
Swap: 535096K av, 145856K used, 389240K free 143476K cached

Here I have 33MB of free memory, 145MB in Swap, and 24MB + 143MB used
for buffer/cache. It is safe to think of buffer/cache as being 'free'

as it is always available for the OS to use without requiring anything

to be swapped out. So my total available memory at this moment is
about
200MB out of 384MB.

On a dedicated Squid box, if you see /any/ swap usage over about 15MB
you have a problem (like not enough memory). If the box is a shared
machine that does multiple tasks, then swap usage may or may not be a
problem (but probably is). In my example case, this is a desktop
machine where there are lots of idle processes that just sit and rarely

are called upon to do anything (print server, test webserver, lots idle

shells, etc.) and so they get swapped out. Squid, if it ever gets even

partly swapped out, it will severely impact performance since it has to

be swapped back in before it can answer a request.

This is all pretty simplified, but ought to at least allow you to look

at your memory usage well enough to know if that is your problem (it
probably is...the problem of not enough memory for Squid is so common
that it has a gigantic section in the FAQ, and we still get memory
questions several times a week).

It is possible to make top tell you how much of a given process is
swapped out, by using the add field option of top. I'll leave the
discovery of how to use that gem as an exercise for the reader.

Justin Hennessy wrote:
> Marc,
>
> I am running RedHat 7.2.
>
> I am not confident to assess the memory usage. I have cachemgr up
and
> running but am not really familiar with how to use the information.
>
> I have had a look in the cache file but I am not really sure that I
am
> looking for.
>
> Justin

-- 
Joe Cooper <joe@swelltech.com>
Web caching appliances and support.
http://www.swelltech.com 
Received on Thu Jun 20 2002 - 20:51:33 MDT

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