RE: confused with memory usage, sar, top, free, vmstat
- From: "Stainforth, Matthew (SD/DS)" <Matthew.Stainforth@xxxxxx>
- Date: Wed, 17 Mar 2010 10:02:18 -0300
Yes, extra memory will be used in buffers and cache, and that memory can be reclaimed if needed.
No matter how much extra memory you have, the kernel will page out some infrequently accessed memory pages to swap space. There are debates over whether that is good. You can control the behavior to some extent using /proc/sys/vm/swappiness.
Here is a link that might be helpful:
http://kerneltrap.org/node/3000
-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-
bounces@xxxxxxxxxx] On Behalf Of ESGLinux
Sent: Wednesday, March 17, 2010 9:29 AM
To: General Red Hat Linux discussion list
Subject: Re: confused with memory usage, sar, top, free, vmstat
Hi Matthew, thanks for your answer.
so, when this tools say that the memused is 3,4G this is true but with
the
detail that the amount allocated in buffers y cache are avaliable to
use,
isnt it?
one finally doubt is about swap, Why I have an 8% of swap if I really
have a
lot of free mem?
Well, with this I think I can tell my boss that we don´t need to buy
more
mem ;-)
Greetings,
ESG
2010/3/17 Stainforth, Matthew (SD/DS) <Matthew.Stainforth@xxxxxx>
Is is fine. The output of sar, free, top, and vmstat are allagreeing that
you have about 3.4GB mem used (~82%) with about 750MB free.cached
The kbbuffers and kbcached from sar agrees with buffers (.48 GB) and
(.56 GB) from free. The buff and cached from vmstat also agrees.that
Now if you look at the -/+ buffers/cache line from free, you will see
you really only have 2.36GB used and 1.78GB free if you don't countbuffers
and cache. 2.36GB + .48GB + .56GB = 3.4GB used.could
So you have about a gig of memory tied up in buffers and cache that
be freed if needed by the system.for
Further, you only have 40MB (8%) of swap used. If you were starved
memory this would be higher and your cache and buffers would belower.
but
-----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
problemswhen I
try to analize with different tools I´m not sure if I having
kbswpfreewith
it
If I run sar -r:
...
04:50:01 kbmemfree kbmemused %memused kbbuffers kbcached
599232kbswpused %swpused kbswpcad
09:05:01 748036 3401232 81,97 448672
5608563768868 327664 8,00 40456
09:10:01 749596 3399672 81,93 480028
5597403768868 327664 8,00 40456
09:15:01 749020 3400248 81,95 481144
5593323768868 327664 8,00 40456
09:20:01 749516 3399752 81,94 481812
5592163768868 327664 8,00 40456
09:25:01 749676 3399592 81,93 481928
us3768868 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
2sy id
wa
0 0 327664 741412 481444 566200 1 1 10 56 0 2
11 96
1
0 0 327664 741412 481452 566192 0 0 0 24 1017 880
00 99
1
0 0 327664 741428 481460 566184 0 0 0 60 1012 812
00 99
1
0 0 327664 741428 481460 566184 0 0 0 0 1008 835
00 100
0
2 1 327664 741428 481464 566180 0 0 0 12 1020 859
0.02,0 100
0
top -b -d 1 -n 1
top - 09:37:02 up 141 days, 20:15, 1 user, load average: 0.00,
zombie0.03
Tasks: 115 total, 1 running, 114 sleeping, 0 stopped, 0
cachedCpu(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
real
I have read that linux try to allocate all the RAM memory, so the
thefree
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
request@xxxxxxxxxx?subject=unsubscribecommands 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-
--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
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
- References:
- confused with memory usage, sar, top, free, vmstat
- From: ESGLinux
- RE: confused with memory usage, sar, top, free, vmstat
- From: Stainforth, Matthew (SD/DS)
- Re: confused with memory usage, sar, top, free, vmstat
- From: ESGLinux
- confused with memory usage, sar, top, free, vmstat
- Prev by Date: Re: Downloading RHEL 5.3
- Next by Date: RE: can a 32 bit process use more than 2GB?
- Previous by thread: Re: confused with memory usage, sar, top, free, vmstat
- Next by thread: Re: confused with memory usage, sar, top, free, vmstat
- Index(es):
Relevant Pages
|