[squid-users] No memory left, buffers eats all ram. Is any solution?

From: Tomasz <admin@dont-contact.us>
Date: Sun, 6 Apr 2008 12:34:16 +0200

Hello,

I have sever with 8GB memory
ps aux shows that squid is using max 3467800.

w3cache ~ # ps aux | grep squid | head -n2
root 643 0.0 0.0 36660 3372 ? Ss Apr05
0:00 /usr/sbin/squid -DYC
squid 645 9.6 41.3 3467800 3375072 ? Sl Apr05 122:02 (squid) -DYC

cachemgr.cgi shows:
Memory usage for squid via mallinfo():
        Total space in arena: -778704 KB
        Ordinary blocks: -799114 KB 16341 blks
        Small blocks: 0 KB 0 blks
        Holding blocks: 11384 KB 6 blks
        Free Small blocks: 0 KB
        Free Ordinary blocks: 20409 KB
        Total in use: -787730 KB 103%
        Total free: 20409 KB -2%
        Total size: -767320 KB
Memory accounted for:
        Total accounted: 3032558 KB
        memPoolAlloc calls: 1445474910
        memPoolFree calls: 1426587092

I have also a lot of disk space on cache_disks:
w3cache ~ # cat /etc/squid/squid.conf | grep cache_dir | grep -v "^#"
cache_dir aufs /var/cache/squid/dysk1 30000 16 256
cache_dir aufs /var/cache/squid/dysk2 30000 16 256
cache_dir coss /dev/sdd1 30000 block-size=2048 overwrite-percent=40
max-size=1048576 membufs=30
cache_dir coss /dev/sde1 30000 block-size=2048 overwrite-percent=40
max-size=1048576 membufs=30
(In cache.log i seen that standard 10mb membfus was too small)

Is in that configuration 4-5GB of ram may be used for cache etc?
Is it normal?

I have also huge amount of ram used for cache_mem:
w3cache ~ # cat /etc/squid/squid.conf | grep cache_mem | grep -v "^#"
cache_mem 2048 MB

Problem is that squid is using max 4gb of ram, and other ~4gb are used for
buffers etc..,and then there is no memory left - swap grows up, so squid
response time grows up too :/

Why there is so much buffers?
w3cache ~ # free
             total used free shared buffers cached
Mem: 8155824 8108788 47036 0 2687584 1048768
-/+ buffers/cache: 4372436 3783388
Swap: 996008 167864 828144

Regards,

-- 
Tomasz
Received on Sun Apr 06 2008 - 04:34:48 MDT

This archive was generated by hypermail 2.2.0 : Thu May 01 2008 - 12:00:04 MDT