[Techtalk] memory used on ubuntu server

Anne Wainwright anotheranne at fables.co.za
Tue Feb 7 19:24:30 UTC 2012


Hi,

On Mon, Feb 06, 2012 at 08:56:20PM -0600, Gayathri Swaminathan wrote:
> Hiya Anne,
> 
> 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.

The linux swap partition, opposed to the Win swapfile as it used
to becalled, may be more efficient, but old habits die hard and better
to have plenty of headroom. Operating with barely any I am sure explains
why my little 800MHz demon has suddenly got a chill with my imposing
extra duties on it.

bestest
Anne
> 
> <snip>
> [wombat at athena vms]$ vmstat 5 5
> procs -----------memory---------- ---swap-- -----io---- --system--
> -----cpu-----
>  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id
> wa st
>  1  3      0 171108  17164 2330504    0    0  6528  6321  886 1259  7  5 44
> 44  0
>  1  3      0 168444  17160 2329144    0    0 20892 26430 1155 1933  1  4 13
> 82  0
>  0  3      0 197052  17156 2301160    0    0 24147 25630 1288 2122  2  5  9
> 83  0
>  0  3      0 194664  17136 2303020    0    0 27137 20673 2043 2803  3  5 12
> 80  0
>  0  4      0 203036  17140 2293928    0    0 24962 22437 1645 2099  2  5 16
> 78  0
> </snip>
> 
> Under,
> procs: you see "r"  for running processes, "b" for background or sleeping
> processes
> Memory: has swpd - Virtual memory usage, free - actual Idle memory, buff -
> memory used as buffers, cache - total used in cache
> swap: has si - memory swapped in from the disk and so - memory swapped to
> the disk
> io: has bi - blocks read from disk and bo - blocks written to the disk
> system: has in - number of interrupts and cs - number of context switches
> cpu: has us - time spent on user activities, sy - time spent by kernel, id
> - idle time, wa - io waits
> 
> It takes a few tries to read those numbers and interpret them. Also it's
> advisable you run this during "peak" windows of system usage ( possibly
> cron a job to append output to a file).
> 
> Lately I have gotten lazy to just run "sar" on my hosts and review sar data
> using kSar to catch something out of the ordinary...
> 
> -- 
> Gayathri Swaminathan
> gpgkey: 3EFB3D39
> Volunteer, FDP
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk


More information about the Techtalk mailing list