Linux memory usage & squid2

From: Apiset Tananchai <aet@dont-contact.us>
Date: Tue, 29 Dec 1998 15:31:43 +0700 (ICT)

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
Received on Tue Dec 29 1998 - 01:04:53 MST

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