[squid-users] leaking memory in squid 3.4.8 and 3.4.7.

Steve Hill steve at opendium.com
Tue Sep 30 14:27:32 UTC 2014


On 29.09.14 13:39, Eliezer Croitoru wrote:
> Hey Steve,
>
> Can you share the basic cache manager requests statistics and the up
> time for the service?
> (mgr:info)

This is with 8 workers and was restarted this morning, about 6 hours 
ago.  As you can see, it's using about 5GB at the moment - as mentioned, 
there is no caching enabled for this configuration so there doesn't seem 
much reason for it to grow so large.

Squid Object Cache: Version 3.4.6
Build Info:
Start Time:	Tue, 30 Sep 2014 08:33:01 GMT
Current Time:	Tue, 30 Sep 2014 14:14:28 GMT
Connection information for squid:
	Number of clients accessing cache:	2545
	Number of HTTP requests received:	926815
	Number of ICP messages received:	0
	Number of ICP messages sent:	0
	Number of queued ICP replies:	0
	Number of HTCP messages received:	0
	Number of HTCP messages sent:	0
	Request failure ratio:	 0.00
	Average HTTP requests per minute since start:	2714.3
	Average ICP messages per minute since start:	0.0
	Select loop called: 33693001 times, 5.219 ms avg
Cache information for squid:
	Hits as % of all requests:	5min: 0.0%, 60min: 0.0%
	Hits as % of bytes sent:	5min: 3.5%, 60min: 4.4%
	Memory hits as % of hit requests:	5min: 0.0%, 60min: 0.0%
	Disk hits as % of hit requests:	5min: 0.0%, 60min: 0.0%
	Storage Swap size:	0 KB
	Storage Swap capacity:	 0.0% used,  0.0% free
	Storage Mem size:	2168 KB
	Storage Mem capacity:	 0.0% used,  0.0% free
	Mean Object Size:	0.00 KB
	Requests given to unlinkd:	0
Median Service Times (seconds)  5 min    60 min:
	HTTP Requests (All):   0.06557  0.06988
	Cache Misses:          0.06629  0.07171
	Cache Hits:            0.00000  0.00000
	Near Hits:             0.00000  0.00000
	Not-Modified Replies:  0.00000  0.00000
	DNS Lookups:           0.00012  0.00000
	ICP Queries:           0.00000  0.00000
Resource usage for squid:
	UP Time:	20487.255 seconds
	CPU Time:	3177.711 seconds
	CPU Usage:	15.51%
	CPU Usage, 5 minute avg:	11.44%
	CPU Usage, 60 minute avg:	12.40%
	Maximum Resident Size: 19930960 KB
	Page faults with physical i/o: 6
Memory usage for squid via mallinfo():
	Total space in arena:  5014812 KB
	Ordinary blocks:       5004965 KB   2620 blks
	Small blocks:               0 KB      0 blks
	Holding blocks:         82080 KB     48 blks
	Free Small blocks:          0 KB
	Free Ordinary blocks:    9847 KB
	Total in use:            9847 KB 0%
	Total free:              9847 KB 0%
	Total size:            5096892 KB
Memory accounted for:
	Total accounted:       447132 KB   9%
	memPool accounted:     447132 KB   9%
	memPool unaccounted:   4649760 KB  91%
	memPoolAlloc calls: 528851610
	memPoolFree calls:  531832922
File descriptor usage for squid:
	Maximum number of file descriptors:   131072
	Largest file desc currently in use:    209
	Number of file desc currently in use:  754
	Files queued for open:                   0
	Available number of file descriptors: 130318
	Reserved number of file descriptors:   800
	Store Disk files open:                   0
Internal Data Structures:
	   510 StoreEntries
	   510 StoreEntries with MemObjects
	   408 Hot Object Cache Items
	     0 on-disk objects


For comparison, almost all of the http (but none of the https) requests 
that go through the proxy above are then sent through a second proxy 
which does do some caching, but no fancy stuff like ICAP or ssl bumping 
- the caching proxy has been running for 18 days and has a far smaller 
process size (again, 8 workers):

Squid Object Cache: Version 3.4.6
Build Info:
Start Time:	Fri, 12 Sep 2014 08:48:50 GMT
Current Time:	Tue, 30 Sep 2014 14:18:35 GMT
Connection information for squid:
	Number of clients accessing cache:	1
	Number of HTTP requests received:	19496669
	Number of ICP messages received:	0
	Number of ICP messages sent:	0
	Number of queued ICP replies:	0
	Number of HTCP messages received:	0
	Number of HTCP messages sent:	0
	Request failure ratio:	 0.00
	Average HTTP requests per minute since start:	742.7
	Average ICP messages per minute since start:	0.0
	Select loop called: 763795228 times, 2.062 ms avg
Cache information for squid:
	Hits as % of all requests:	5min: 13.1%, 60min: 12.8%
	Hits as % of bytes sent:	5min: 7.0%, 60min: 4.7%
	Memory hits as % of hit requests:	5min: 0.0%, 60min: 0.0%
	Disk hits as % of hit requests:	5min: 16.4%, 60min: 11.9%
	Storage Swap size:	3773012 KB
	Storage Swap capacity:	90.0% used, 10.0% free
	Storage Mem size:	262144 KB
	Storage Mem capacity:	100.0% used,  0.0% free
	Mean Object Size:	28.55 KB
	Requests given to unlinkd:	3198063
Median Service Times (seconds)  5 min    60 min:
	HTTP Requests (All):   0.02899  0.03241
	Cache Misses:          0.03066  0.03241
	Cache Hits:            0.00405  0.00091
	Near Hits:             0.03066  0.03427
	Not-Modified Replies:  0.00000  0.00000
	DNS Lookups:           0.00000  0.00000
	ICP Queries:           0.00000  0.00000
Resource usage for squid:
	UP Time:	1574985.354 seconds
	CPU Time:	32733.608 seconds
	CPU Usage:	2.08%
	CPU Usage, 5 minute avg:	3.80%
	CPU Usage, 60 minute avg:	3.54%
	Maximum Resident Size: 1025200 KB
	Page faults with physical i/o: 289968
Memory usage for squid via mallinfo():
	Total space in arena:   49616 KB
	Ordinary blocks:        38418 KB  15268 blks
	Small blocks:               0 KB      0 blks
	Holding blocks:         10520 KB      7 blks
	Free Small blocks:          0 KB
	Free Ordinary blocks:   11198 KB
	Total in use:           11198 KB 19%
	Total free:             11198 KB 19%
	Total size:             60136 KB
Memory accounted for:
	Total accounted:        27128 KB  45%
	memPool accounted:      27128 KB  45%
	memPool unaccounted:    33008 KB  55%
	memPoolAlloc calls: 5279809700
	memPoolFree calls:  5314670336
File descriptor usage for squid:
	Maximum number of file descriptors:   16384
	Largest file desc currently in use:     67
	Number of file desc currently in use:   50
	Files queued for open:                   0
	Available number of file descriptors: 16334
	Reserved number of file descriptors:   100
	Store Disk files open:                   0
Internal Data Structures:
	132586 StoreEntries
	   444 StoreEntries with MemObjects
	  8192 Hot Object Cache Items
	132142 on-disk objects



As a separate note: I'm not sure why the memory footprint of the caching 
squid is so low - with cache_mem set to 256MB (100% used, apparently) 
and 8 workers I would expect it to be much more.  Something else for me 
to investigate when I've got time. :)

-- 
  - Steve Hill
    Technical Director
    Opendium Limited     http://www.opendium.com

Direct contacts:
    Instant messager: xmpp:steve at opendium.com
    Email:            steve at opendium.com
    Phone:            sip:steve at opendium.com

Sales / enquiries contacts:
    Email:            sales at opendium.com
    Phone:            +44-844-9791439 / sip:sales at opendium.com

Support contacts:
    Email:            support at opendium.com
    Phone:            +44-844-4844916 / sip:support at opendium.com


More information about the squid-users mailing list