Red Hat Bugzilla – Bug 454297
squid chokes with cache_mem higher than ~ 2gb
Last modified: 2014-11-09 17:31:12 EST
Description of problem:
set cache_mem to 3276M in squid.conf
memory usage grows until eventually squid restarts with error.
set cache_mem to 2076M and all OK.
ProLiant DL380 G5
4 x 3Ghz process
Version-Release number of selected component (if applicable):
Steps to Reproduce:
2008/07/07 09:18:05| parseHttpRequest: Requestheader contains NULL characters
2008/07/07 09:18:05| parseHttpRequest: Unsupported method '^CC^ZA^B'
2008/07/07 09:18:05| clientReadRequest: FD 46 (188.8.131.52:29113) Invalid Request
FATAL: xcalloc: Unable to allocate 1 blocks of 4108 bytes!
Squid Cache (Version 2.6.STABLE20): Terminated abnormally.
CPU Usage: 427.570 seconds = 214.965 user + 212.605 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 9
Memory usage for squid via mallinfo():
total space in arena: -1067676 KB
Ordinary blocks: -1067678 KB 55 blks
Small blocks: 0 KB 0 blks
Holding blocks: 3460 KB 4 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 1 KB
Total in use: -1064218 KB 100%
Total free: 1 KB 0%
2008/07/07 09:18:20| storeDirWriteCleanLogs: Starting...
How large processes do the i686 PAE kernel support? (normal processes, not processes making use of PAE extensions)
I suspect you simply hit the max process size that the 32-bit kernel & OS can support. 64-bit OS (x86_64) recommended if your CPU can support it as it removes these limitations, but also adds a little bit on the memory requirements..
cache_mem is in-process memory cache and adds to the process size, in addition to the cache index and any other memory usage by Squid.
The negative numbers in the memory report is due to glibc mallinfo() being broken and not capable of reporting correct values for processes above 2GB in size.
Cache_mem is in-process memory as wrote Henrik in comment #1. The process size is limited up to 2 GB despite PAE. Therefore you can't adjust memory above 2 GB (practically less as this limitation).
Well, I see the recommendation to use 64-bit OS as logical and very good solution. I suppose that 4 x 3Ghz processor is hungry to swallow 64-bit OS.
Due to these reasons I'm going to close the bug.