[Preston] Excessive memory usage

Mike Williams mike.williams at globalgraphics.com
Fri Jan 7 11:01:28 GMT 2005


Hi,

On 5 Jan 2005 at 7:49, Tarball wrote:

> I have a file server running a few services (samba, nfs, sshd) but no X, 
> everything is done from the console. However, even when the only thing I have 
> done is boot the machine it seems to consume nearly all memory.
> 
> I know Linux uses a much memory a possible to cache stuff but this is straight 
> after booting so nothing has had chance to be cached, also if you look at the 
> output of 'free' you can see that there is only 10MB of stuff cached.
> 
> 100MB of used memory seems excessive for a machine not running X (my desktop 
> machine is using about 30MB of RAM after I reboot but before I start X.  This 
> machine also runs SSHD, nfs, samba)
> 
> The system is a Dual Celeron 566, 128MB RAM, 256MB Swap, about 500GB disk 
> space.

[snip]

> {chaos} /home/jrt% free
>              total       used       free     shared    buffers     cached
> Mem:        126740     124820       1920          0      10364      10104
> -/+ buffers/cache:     104352      22388
> Swap:       248996          0     248996

This is normal - you have 104352KB allocated for executables and their 
heap and stack, 10364KB allocated by the system for buffering (i.e. IO 
streams of various types, and 10104Kb of cached data, which includes 
things like files that have been accessed before and Linux thinks might 
be again.

One key parts of any OS is managing memory usage for performance - 
Unices in general try to load as much in to physical memory as possible 
but wont run down buffer and cache allocation when running more 
programs before starting to move application data to swap as 
performance is usually better by swapping out infrequently used parts 
of executables and keeping buffered and cached file/stream reasonably 
high.

Don't worry until the swap file starts to thrash, and you will know 
when that starts to happen ;-)

TTFN

/Mike
-- 
OK, I'm weird!  But I'm saving up to become eccentric.





More information about the Preston mailing list