[clug] Memory Leak In cAosity

Sam Couter sam at couter.dropbear.id.au
Wed Aug 10 11:28:10 GMT 2005


Steve Walsh <steve at nerdvana.org.au> wrote:
> I have absolutely no objection to it using all the ram, but when it's using
> 90% Ram just sitting there, with 2 small domains and only basic services
> installed (MySQL, PHP4, Apache, Exim, SpamAssassin, some Perl and SNMP
> stuff), I don't want to know what it will be like when it's at full capacity
> with the estimated 300 domains it'll get shortly...

It's likely to be somewhere slightly closer to 100%, but who cares? It's
working as it's supposed to. If used *swap* climbs high, then you've got
insufficient memory for the demand. Run "vmstat 1" and watch the "si"
(swap in) and "so" (swap out) columns to see if the swap is just dormant
pages (again, that's how it's supposed to work, the kernel has figured
those pages are better used for caches) or if it's being hammered.

> sc8-pr-web2.sourceforge.net averages 40% memory usage (it spikes to 90% when
> the rsync cron runs, but otherwise floats around 40%), and our current
> webservers float between 13% (Mandrake9 2.4.21 on a P3 550/256Mb) to 46%
> (Gentoo 2.6.12 on a P4 2.4Ghz/512Mb).

You can make that number smaller if you like. Write a program to
allocate a largish chunk of memory, write some stuff into it, then exit.
The kernel will flush and drop cached pages to satisfy the allocations,
then when the program exist it'll mark those pages as free. Bingo, free
memory! Run it all the time and you'll always have free memory! Of
course, you'll be flushing and dropping caches, which kinda defeats the
purpose of having them, but whatever.
-- 
Sam "Eddie" Couter  |  mailto:sam at couter.dropbear.id.au
Debian Developer    |  mailto:eddie at debian.org
                    |  jabber:sam at teknohaus.dyndns.org
OpenPGP fingerprint:  A46B 9BB5 3148 7BEA 1F05  5BD5 8530 03AE DE89 C75C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20050810/cf5b04e8/attachment.bin


More information about the linux mailing list