Re: [squid-users] High CPU

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 28 Dec 2001 03:34:10 +0100

On Friday 28 December 2001 00.15, philip.wolfe@centrelink.gov.au wrote:

> Sorry for my ignorance, but how do you dump the poll table using 'truss'?

No idea. Reading the man page is probably a good bet. I use Linux and there
the command is strace and uses different options than truss.

> I've tried a few options, but I don't really know what I'm looking for.
> Also, I'm using the following process ID:
>
> ps -ef |grep squid
> nobody 13818 13815 97 15:19:42 pts/0 1100:40 squid -NsY
>
> Is this the correct ID to use?

This is the process ID of Squid. Can also be found in logs/squid.pid

Now back to the previous recommendations, slightly expanded:

0. Figure out how to trace the details of poll() on your OS.

1. Start by getting a dump of the filedescriptor table using cachemgr

2. Get a detailed trace of poll() system calls, showing which filedescriptors
are indicated as ready etc..

3. Then try to figure out if there if there is a single filedescriptor
continously polled. Then look into the filedescriptor table from cachemgr
what this filedescriptor is used for.

4. Use lsof to verify that the filedescriptor usage matches what is reported
by cachemgr.

5. Look in more detail on what system calls are performed on this
filedescriptor, if any.

6. If the system call trace do not provide any hint, issue "squid -k debug;
sleep 1; squid -k debug", then see cache.log if there is any hint on what is
going on with this filedescriptor.

Related question: Have you by any chance compiled Squid with
--enable-time-hack?

-- 
MARA Systems AB, Giving you basic free Squid support
Customized solutions, packaged solutions and priority support
available on request
Received on Thu Dec 27 2001 - 19:57:19 MST

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