Help: Squid Cache @ 100% causes CPU to run 100%

From: Rudy Komsic <rudyk@dont-contact.us>
Date: Fri, 24 Mar 2000 18:48:25 -0500

Hello,

I am running Squid 2.4 Devel 2 under FreeBSD 3.4 and have found a
major problem when the Disk Cache fills up. When it is full, Squid
shoots up to 100% and does not drop. What is happening is that it
looks like Squid can not remove the stale files quick enough
eventhough I only get about 400-500 requests per minute.

I have never seen Squid drop down to my 90% low mark limit which
should be removing about 200 MB of data from the cache. Is there
anyone who knows how to fix this?

My kernel, and most of the squid config is like the Bakeoff system
with DiskD enabled (only way to get it stable) and what happens is
that the system gets nailed up at 100% usage. I added the gre PATCH
to support WCCP protocol.

Here is my TOP info.

last pid: 1208; load averages: 1.01, 0.91, 0.71 up 0+20:34:46
01:10:01
31 processes: 2 running, 29 sleeping
CPU states: 38.1% user, 0.0% nice, 55.6% system, 6.2% interrupt,
0.0% idle
Mem: 44M Active, 52M Inact, 20M Wired, 6076K Cache, 8350K Buf, 928K
Free
Swap: 384M Total, 384M Free

  PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU
COMMAND
  302 noone 105 0 38908K 36736K RUN 115:20 98.24% 98.24% squid
 1205 noone 28 0 1576K 836K RUN 0:00 0.00% 0.00% top

                                                                      
         
It looks like the System is running hard but I do not see anything
related to Disk running at full speed to remove files at all...

here is the general stats that are shown.
Squid Object Cache: Version 2.4.DEVEL2

Start Time: Thu, 23 Mar 2000 09:36:18 GMT
Current Time: Fri, 24 Mar 2000 06:12:33 GMT

Connection information for squid:
        Number of clients accessing cache: 155
        Number of HTTP requests received: 533200
        Number of ICP messages received: 0
        Number of ICP messages sent: 0
        Number of queued ICP replies: 0
        Request failure ratio: 0.00%
        HTTP requests per minute: 431.3
        ICP messages per minute: 0.0
        Select loop called: 28709008 times, 2.584 ms avg
Cache information for squid:
        Request Hit Ratios: 5min: 21.7%, 60min: 30.2%
        Byte Hit Ratios: 5min: 13.6%, 60min: 18.8%
        Request Memory Hit Ratios: 5min: 2.2%, 60min: 4.2%
        Request Disk Hit Ratios: 5min: 41.4%, 60min: 51.4%
        Storage Swap size: 1992277 KB
        Storage Mem size: 8208 KB
        Storage LRU Expiration Age: 0.00 days
        Mean Object Size: 9.54 KB
        Requests given to unlinkd: 0
Median Service Times (seconds) 5 min 60 min:
        HTTP Requests (All): 0.10281 0.11465
        Cache Misses: 0.15048 0.19742
        Cache Hits: 0.00286 0.01387
        Near Hits: 0.17711 0.15048
        Not-Modified Replies: 0.00091 0.00562
        DNS Lookups: 0.00190 0.00779
        ICP Queries: 0.00000 0.00000
Resource usage for squid:
        UP Time: 74175.418 seconds
        CPU Time: 5750.303 seconds
        CPU Usage: 7.75%
        CPU Usage, 5 minute avg: 96.18%
        CPU Usage, 60 minute avg: 37.93%
        Maximum Resident Size: 36808 KB
        Page faults with physical i/o: 6
Memory accounted for:
        Total accounted: 24015 KB
File descriptor usage for squid:
        Maximum number of file descriptors: 1064
        Largest file desc currently in use: 137
        Number of file desc currently in use: 121
        Files queued for open: 0
        Available number of file descriptors: 943
        Reserved number of file descriptors: 100
        Store Disk files open: 0
Internal Data Structures:
        208865 StoreEntries
          1201 StoreEntries with MemObjects
          1186 Hot Object Cache Items
        211066 Filemap bits set
        208837 on-disk objects

----------------------------------------------------------------------
----------
Here is my current memory usage

Current memory usage:

Pool Obj Size Allocated In Use Idle Allocations Saved Hit Rate
 (bytes) (#) (KB) high (KB) high (hrs) impact (%total) (#) (KB) high
(KB) portion (%alloc) (#) (KB) high (KB) (%number) (%volume)
(%number)
2K Buffer 2048 3 6 32 3.76 0 3 6 32 100 0 0 0 0 0 0
4K Buffer 4096 4 16 100 3.62 0 4 16 100 100 0 0 0 0 0 0
8K Buffer 8192 5 40 240 13.52 0 5 40 240 100 0 0 0 0 0 0
Client Socket Buffer 4096 3 12 200 5.42 0 3 12 200 100 0 0 0 0 0 0
acl 48 1 1 1 20.65 0 1 1 1 100 0 0 0 0 0 0
aclCheck_t 200 1 1 1 20.64 0 1 1 1 100 0 0 0 0 0 0
acl_access 16 4 1 1 20.65 0 4 1 1 100 0 0 0 0 0 0
acl_ip_data 16 1 1 1 20.65 0 1 1 1 100 0 0 0 0 0 0
acl_list 12 4 1 1 20.65 0 4 1 1 100 0 0 0 0 0 0
ConnStateData 140 48 7 42 2.90 0 48 7 42 100 0 0 0 0 0 0
Disk I/O Buffer 8192 0 0 8 20.65 0 0 0 8 -1 0 0 0 0 0 0
ErrorState 76 0 0 1 15.54 0 0 0 1 -1 0 0 0 0 0 0
FwdState 36 7 1 2 5.42 0 7 1 2 100 0 0 0 0 0 0
FwdServer 12 7 1 1 5.42 0 7 1 1 100 0 0 0 0 0 0
HttpStateData 40 18 1 3 5.40 0 18 1 3 100 0 0 0 0 0 0
HttpReply 104 1173 120 147 7.14 0 1173 120 147 100 0 0 0 0 0 0
HttpHeaderEntry 20 9599 188 233 7.14 1 9599 188 233 100 0 0 0 0 0 0
HttpHdrCc 12 66 1 2 12.26 0 66 1 2 100 0 0 0 0 0 0
HttpHdrRangeSpec 8 0 0 2 1.37 0 0 0 2 -1 0 0 0 0 0 0
HttpHdrRange 12 0 0 1 11.20 0 0 0 1 -1 0 0 0 0 0 0
HttpHdrContRange 12 0 0 1 4.12 0 0 0 1 -1 0 0 0 0 0 0
ip_pending 12 0 0 1 19.38 0 0 0 1 -1 0 0 0 0 0 0
ipcache_entry 60 920 54 56 8.24 0 920 54 56 100 0 0 0 0 0 0
MemObject 120 1173 138 170 7.14 1 1173 138 170 100 0 0 0 0 0 0
request_t 1160 8 10 67 5.41 0 8 10 67 100 0 0 0 0 0 0
Store Mem Buffer 4096 2032 8128 8364 7.52 34 2032 8128 8364 100 0 0 0
0 0 0
StoreEntry 56 208820 11420 11439 0.29 48 208820 11420 11439 100 0 0 0
0 0 0
store_client 52 8 1 5 5.42 0 8 1 5 100 0 0 0 0 0 0
wordlist 8 9 1 1 20.65 0 9 1 1 100 0 0 0 0 0 0
ClientInfo 236 155 36 36 3.89 0 155 36 36 100 0 0 0 0 0 0
MD5 digest 16 208820 3263 3269 0.29 14 208820 3263 3269 100 0 0 0 0 0
0
storeIOState 60 3 1 2 3.83 0 3 1 2 100 0 0 0 0 0 0
Short Strings 36 11224 395 483 7.14 2 11224 395 483 100 0 0 0 0 0 0
Medium Strings 128 209 27 85 15.18 0 209 27 85 100 0 0 0 0 0 0
Long Strings 512 6 3 27 3.44 0 6 3 27 100 0 0 0 0 0 0
event 32 6 1 1 6.72 0 6 1 1 100 0 0 0 0 0 0
idns_query 560 0 0 3 18.26 0 0 0 3 -1 0 0 0 0 0 0
Total - 444337 23861 24158 0.44 100 444337 23861 24158 100 0 0 0 0 0
0

Cumulative allocated volume: 34.59 GB
Current overhead: 8538 bytes (0.035%)
Idle pool limit: 0.00 MB

String Pool Impact
 (%strings) (%volume)
Short Strings 98 93
Medium Strings 2 6
Long Strings 0 1
Other Strings 0 0

----------------------------------------------------------------------
---------

HELP!
Received on Fri Mar 24 2000 - 16:50:21 MST

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