[clug] Help: Memory Evaporating!
sam at couter.dropbear.id.au
Tue Dec 21 11:20:01 GMT 2004
Alex Satrapa <grail at goldweb.com.au> wrote:
> What has me flummoxed is that the memory doesn't all return to the
> 'free' pile (heap?) until several seconds after the web server has been
> killed (I obviously wasn't patient enough before posting to the list,
> sorry) - but there is no process visible that holds that memory before
> or after I stop the Apache server.
So what makes you think the memory is missing? Unless the memory gnomes
in your machine are shifting hardware around, it's still there.
The 'free' command shows a bunch of different allocations for memory -
the allocation labelled 'free' means memory you've paid for but aren't
using! That number is usually large immediately after boot, or after a
large process exits. During the machine's stable working life, that
number should be small and filled with efficient cached goodness.
The allocations labelled 'buffers' and 'cached' are filesystem caches
and other stuff I'm unsure about - during normal operation, memory moves
from 'free' to 'buffers' (or 'cached'?) as more files are read and
cached. The cache will drop (and be written to disk if necessary) if
programs want to allocate heap memory.
The allocation labelled 'shared' is, perhaps obviously, System V IPC
shared memory. Not shared library shared memory.
So if 'free' is jumping up and down, you're running programs that are
allocating a whole bunch of memory, then freeing it. Or running Perl
programs. It'd probably be more efficient to use a long-running program
(daemon) to do the work you want to do.
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
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20041221/6e6faf45/attachment.bin
More information about the linux