Dear squidder,

I'm currently having performance problem with squid on my Linux 2.0.37p4
(with filedescriptor.patch.linux.v8.04) system. The hardware is PII-400,
512MB Ram, 7x4GB UWscsi (6 for cache), 2xAHA2940UW SCSI Host Adapter,
ASUS-P2B-LS motherboard. It is a dedicate squid server running
squid-2.0.PATCH2.

I recently upgrade this server from Linux 2.0.36pre5 to 2.0.37pre4 and
notice that after running for a while (~1hr) Linux start swapping too
much, see below: 

[root@proxy1 kernel]# free
             total       used       free     shared    buffers     cached
Mem:        515808     508124       7684      26340      73364      95324
-/+ buffers/cache:     339436     176372
Swap:       257000     238112      18888

and from cachemgr.cgi:

Memory usage for squid via mallinfo():
        Total space in arena:  294640 KB
        Ordinary blocks:       175476 KB 1355927 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:          4564 KB      6 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:  119164 KB
        Total in use:          180040 KB 61%
        Total free:            119164 KB 40%
Memory accounted for:
        Total accounted:       145384 KB

If I'm not wrong,
Mem used = squid + cached + buffers + shared + other processes
         = 294640 + 95324 + 73364 + 26340 + ~20000
         = ~509668 (~mem used)

I've no idea why Linux swap that much. Do you have any suggestion? I think
before linux start swapping it should try to reduce cache or buffer size
to some number (is it configurable?). I never see this behavior with
2.0.36p5 so I think MM policy is change between these versions.

Your suggestion is greatly appreciate.

Regards,
--
aet

Reply via email to