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

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


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