RE: confused with memory usage, sar, top, free, vmstat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is is fine.  The output of sar, free, top, and vmstat are all agreeing that you have about 3.4GB mem used (~82%) with about 750MB free.  

The kbbuffers and kbcached from sar agrees with buffers (.48 GB) and cached (.56 GB) from free.  The buff and cached from vmstat also agrees.  

Now if you look at the -/+ buffers/cache line from free, you will see that you really only have 2.36GB used and 1.78GB free if you don't count buffers and cache.  2.36GB + .48GB + .56GB = 3.4GB used.

So you have about a gig of memory tied up in buffers and cache that could be freed if needed by the system.

Further, you only have 40MB (8%) of swap used.  If you were starved for memory this would be higher and your cache and buffers would be lower.  

> -----Original Message-----
> From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-
> bounces@xxxxxxxxxx] On Behalf Of ESGLinux
> Sent: Wednesday, March 17, 2010 5:44 AM
> To: General Red Hat Linux discussion list
> Subject: confused with memory usage, sar, top, free, vmstat
> 
> Hi all,
> 
> I have a server that I think is having problems with memory usage but
> when I
> try to analize with different tools I´m not sure if I having problems
> with
> it
> 
> If I run sar -r:
> ...
> 04:50:01    kbmemfree kbmemused  %memused kbbuffers  kbcached kbswpfree
> kbswpused  %swpused  kbswpcad
> 09:05:01       748036   3401232             81,97    448672    599232
> 3768868    327664      8,00     40456
> 09:10:01       749596   3399672            81,93    480028    560856
> 3768868    327664      8,00     40456
> 09:15:01       749020   3400248            81,95    481144    559740
> 3768868    327664      8,00     40456
> 09:20:01       749516   3399752            81,94    481812    559332
> 3768868    327664      8,00     40456
> 09:25:01       749676   3399592            81,93    481928    559216
> 3768868    327664      8,00     40456
> ...
> 
> free
>                       total       used       free           shared
>  buffers     cached
> Mem:       4149268    3407624     741644          0     481084
> 566300
> -/+ buffers/cache:    2360240    1789028
> Swap:      4096532     327664    3768868
> 
> vmstat 1
> procs -----------memory---------- ---swap-- -----io---- --system--
> ----cpu----
>  r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us
> sy id
> wa
>  0  0 327664 741412 481444 566200    1    1    10    56    0     2  2
> 1 96
>  1
>  0  0 327664 741412 481452 566192    0    0     0    24 1017   880  1
> 0 99
>  1
>  0  0 327664 741428 481460 566184    0    0     0    60 1012   812  0
> 0 99
>  1
>  0  0 327664 741428 481460 566184    0    0     0     0 1008   835  0
> 0 100
>  0
>  2  1 327664 741428 481464 566180    0    0     0    12 1020   859  0
> 0 100
>  0
> 
> top -b -d 1 -n 1
> top - 09:37:02 up 141 days, 20:15,  1 user,  load average: 0.00, 0.02,
> 0.03
> Tasks: 115 total,   1 running, 114 sleeping,   0 stopped,   0 zombie
> Cpu(s):  1.6% us,  0.6% sy,  0.2% ni, 96.4% id,  1.2% wa,  0.0% hi,
> 0.0% si
> Mem:   4149268k total,  3408280k used,   740988k free,   481752k
> buffers
> Swap:  4096532k total,   327664k used,  3768868k free,   566152k cached
> 
> I have read that linux try to allocate all the RAM memory, so the real
> free
> memory is the free + buffers/cache, is it true? if so, the %memused
> shown by
> sar -r is not true?
> 
> Can anybody give a light to understand this (docs, tools...)? with the
> commands I have post do you think that I´m having problems with the
> memory
> or can I be calm?
> 
> Thanks in advance
> 
> ESG
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux