[Techtalk] memory used on ubuntu server

Anne Wainwright anotheranne at fables.co.za
Sat Feb 11 21:01:02 UTC 2012


Hi, Daniel,

Thanks, the murky water clears ....

On Wed, Feb 08, 2012 at 06:53:12PM -0800, Daniel Pittman wrote:
> On Tue, Feb 7, 2012 at 11:24, Anne Wainwright <anotheranne at fables.co.za> wrote:
> > On Mon, Feb 06, 2012 at 08:56:20PM -0600, Gayathri Swaminathan wrote:
> >> On Mon, Feb 6, 2012 at 2:20 PM, Anne Wainwright <anotheranne at fables.co.za> wrote:
> >>
> >> > Daily inspection of this message caused me to think that all was well.
> >> > On the contrary. The percentage in question is of the RAM plus swap plus
> >> > buffer as investigation with 'free' revealed. It was not the percentage
> >> > of the installed RAM as I imagined.
> >>
> >> When it comes to verifying actual memory usage, I often trust vmstat
> >> command more than free. The man page is vivid but here are the highlights:
> >
> > Thanks for expounding on the merits of vmstat which has given me an
> > interesting half hour !
> >
> > For one off-list respondant, 'free' to me meant unused RAM. So I am off
> > to the local computer emporium to buy some more. I don't know if there
> > is any general rule but on normal running with no real loads I like
> > 50% headroom although that is not based on any real analysis.
> 
> You didn't actually mention which part of the output of `free` you
> were looking at, and to save you the expense of buying more and more
> memory:
> 
> The bit you care about is the intersection of the "free" column and
> the "-/+ buffers/cache" line.
> 
> That tells you how much memory is being used on your server that isn't
> just a copy of data that is also stored on disk - kept in RAM for
> performance.
> 
> Linux will fill up almost every free bit of memory with disk cache,
> but unlike some other operating systems it doesn't report that as
> "free" by default.
ok, I have learnt something there.

> 
> As an example, from my server:
> 
> daniel at ki:~$ free -m
>              total       used       free     shared    buffers     cached
> Mem:          8006       7955         50          0         95       6476
> -/+ buffers/cache:       1383       6622
> Swap:         8191          7       8184
> 
> 50MB "free", but about 6.5GB of disk cache ... so it has more than
> enough memory free at the moment.
 
using 'free' with the -t switch to display a total

anne at jason:~ ssh$ free -mt
             total       used       free     shared    buffers       cached
Mem:           244        234         10          0         89         51
-/+ buffers/cache:         93        151
Swap:          729         25        703
Total:         974        259        714


I have a more perilous situation not having 8GB memory as you do.

With 10MB Mem and 151MB of (ram)disk cache, I see it shows a fair
%age 'free' of the installed 256MB of ram

The 'Total' column mystifies me as it shows the total of 'Mem' and
'Swap' and does not include the 'buffers/cache'

Why is the swap included in the 'free' total, surely the swap is memory
of last resort and what any one is interested in (apart from knowing
that they have more than enough swap) is surely that they have
sufficient headroom in their installed ram? Maybe I am missing
something. What is Swap used for other than an emergency, surely we do
not expect to use this as a matter of course for normal programme
execution?

We are not on the same scale of hardware but it does look as if I have
no need to increase the amount of ram for present duties

bestest
Anne

> 
> Daniel
> -- 
> ♲ Made with 100 percent post-consumer electrons
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk


More information about the Techtalk mailing list