Re: [squid-users] investigate squid eating 100% CPU

From: Youssef Ghorbal <djo_at_pasteur.fr>
Date: Tue, 26 Mar 2013 18:04:28 +0100

On Mar 26, 2013, at 1:33 PM, Alexandre Chappaz <alexandrechappaz_at_gmail.com> wrote:

> Hi,
>
> you can activate the full debug
> launch
> squid -k debug
> with the service running, and check what comes in the cache.log.

I'll give it a try.
How to stop debug by the way ? just squid -k debug again ?

>
> squid -k parse will audit your config file. Look for WARNING in the
> output of this command.

This command does not retrun any warning.

> the cachemanager can be usefull to see the actual activity of your squid :
>
> squidclient localhost mgr:5min
>
> gives you the last 5 min stats. (see if the n° of req/s is coherent
> with what you expect )

Here after the output of the mgr:5min
It show that we are around 168 req/s
for a cpu usage around 99%
I don't think that 160 req/s is such a big number that can explain full CPU time.

sample_start_time = 1364316830.58546 (Tue, 26 Mar 2013 16:53:50 GMT)
sample_end_time = 1364317130.157822 (Tue, 26 Mar 2013 16:58:50 GMT)
client_http.requests = 168.400939/sec
client_http.hits = 20.203314/sec
client_http.errors = 0.013329/sec
client_http.kbytes_in = 479.431347/sec
client_http.kbytes_out = 4713.703475/sec
client_http.all_median_svc_time = 0.150482 seconds
client_http.miss_median_svc_time = 0.167753 seconds
client_http.nm_median_svc_time = 0.030657 seconds
client_http.nh_median_svc_time = 0.097357 seconds
client_http.hit_median_svc_time = 0.074090 seconds
server.all.requests = 148.814088/sec
server.all.errors = 0.000000/sec
server.all.kbytes_in = 4349.643949/sec
server.all.kbytes_out = 466.209055/sec
server.http.requests = 132.799387/sec
server.http.errors = 0.000000/sec
server.http.kbytes_in = 2908.297586/sec
server.http.kbytes_out = 339.334374/sec
server.ftp.requests = 0.013329/sec
server.ftp.errors = 0.000000/sec
server.ftp.kbytes_in = 4.145295/sec
server.ftp.kbytes_out = 0.003332/sec
server.other.requests = 16.001371/sec
server.other.errors = 0.000000/sec
server.other.kbytes_in = 1437.204400/sec
server.other.kbytes_out = 126.868017/sec
icp.pkts_sent = 0.000000/sec
icp.pkts_recv = 0.000000/sec
icp.queries_sent = 0.000000/sec
icp.replies_sent = 0.000000/sec
icp.queries_recv = 0.000000/sec
icp.replies_recv = 0.000000/sec
icp.replies_queued = 0.000000/sec
icp.query_timeouts = 0.000000/sec
icp.kbytes_sent = 0.000000/sec
icp.kbytes_recv = 0.000000/sec
icp.q_kbytes_sent = 0.000000/sec
icp.r_kbytes_sent = 0.000000/sec
icp.q_kbytes_recv = 0.000000/sec
icp.r_kbytes_recv = 0.000000/sec
icp.query_median_svc_time = 0.000000 seconds
icp.reply_median_svc_time = 0.000000 seconds
dns.median_svc_time = 0.058152 seconds
unlink.requests = 0.000000/sec
page_faults = 0.000000/sec
select_loops = 85.811603/sec
select_fds = 0.000000/sec
average_select_fd_period = 0.000000/fd
median_select_fds = 0.000000
swap.outs = 0.000000/sec
swap.ins = 0.000000/sec
swap.files_cleaned = 0.000000/sec
aborted_requests = 2.335894/sec
syscalls.disk.opens = 0.000000/sec
syscalls.disk.closes = 0.000000/sec
syscalls.disk.reads = 0.000000/sec
syscalls.disk.writes = 0.000000/sec
syscalls.disk.seeks = 0.000000/sec
syscalls.disk.unlinks = 0.000000/sec
syscalls.sock.accepts = 81.882903/sec
syscalls.sock.sockets = 68.897201/sec
syscalls.sock.connects = 65.285063/sec
syscalls.sock.binds = 68.897201/sec
syscalls.sock.closes = 131.846369/sec
syscalls.sock.reads = 982.381577/sec
syscalls.sock.writes = 1513.369196/sec
syscalls.sock.recvfroms = 57.544291/sec
syscalls.sock.sendtos = 34.428607/sec
cpu_time = 299.780455 seconds
wall_time = 300.099276 seconds
cpu_usage = 99.893761%
Received on Tue Mar 26 2013 - 17:04:36 MDT

This archive was generated by hypermail 2.2.0 : Tue Mar 26 2013 - 12:00:05 MDT