Re: client/server memory used incorrect

Rio <[email protected]>
Newsgroups gmane.comp.gnome.apps.gkrellm
Message-ID <[email protected]>
On Monday 18 June 2007 20:37, Bill WIlson wrote:
> On Mon, 18 Jun 2007 19:28:50 -0400
> Rio <[email protected]> wrote:
> 
> > got this and tried it. it is accurate for the top part of free. thank you. 
my 
> > interest however is the amount of real memory used by programs and data 
space 
> > without caches and other things using memory that can be released. my 
concern 
> > is the memory that cannot be released which i assume is the second line.. 
eg:
> > 
> > free -m
> >              total       used       free     shared    buffers     cached
> > Mem:         11962      10847       1114          0       1334       1410
> > -/+ buffers/cache:       8102       3859
> > Swap:         3812          2       3809
> > 
> > 
> > here i see we use 8102M of ram that is not releasable unless a program is 
> > killed etc... i assume that is what that position reports...  my concern 
with 
> > the remote memory report was that it was off quite a bit... in this 
example 
> > 
> > my memory meter shows 5579M used.
> 
> The difference between the 8102 and 5579 should be the slab memory that
> Jindrich has said.  Do a "cat /proc/meminfo" and see if the Slab line amount
> accounts for the difference.
> 

yes it does almost exactly to the byte.

> The Slab data appeared sometime in the 2.6 kernel line and is not broken out
> in the 2.2 or 2.4 kernels.  Before Slab, gkrellm agreed with the free 
command
> +- buffers/cache line and currently the free command still only accounts for
> buffered and cached and does is not including the slab.  So, I could be 
wrong,
> but I don't think the slab is a  subset of cached or buffers which should 
make
> gkrellm's number a bit more useful for an estimate of actual used memory.
> 

hmm so then i have been believing we are using more ram than we are.. cool.

> > when i use the ur and fr as mentioned below, it is accurate with the top 
line 
> > but does not tell me how much actual memory is being used by virtual 
> > servers/programs/ etc. as it includes cache which is variable. what i am 
> > looking for is something to report to me the hard amount of memory used by 
> > the system that cannot change unless applications change it or get killed. 
i 
> > dont care about caches or buffers or anything else that is variable and 
> > addable to 'used' memory when needed by applications. my care is with what 
> > memory is being used that represents the true health of the system.
> 
> Looking at the cached, buffered and slab is really the only way to get an 
idea
> of the "hard" memory.  If you walked through each process and added
> up its "used" memory you are still dealing with cached and slab components.
> Given the data reported by the kernel, I don't think you can get any better
> than an "estimate" like this.
> 
> > or am i looking for the impossible? :)
> 
> It's the way the kernel reports its stats.  The free is the memory left 
unused
> by the system and what is used is broken down into other categories.  The
> assumption is that when you subtract buffers, cache, and slab you are left
> with a close approximation of what is actually being used (or can't be 
freed). 
> There just isn't any other hard total memory used stat reported by the 
kernel.

shame they make things so complicated.. its nice, i'm sure, to break it up 
like they do into various components, but i think somewhere they lost sight 
of the fact that some people really want to see exactly what is used without 
all their other compartments in the way.

if this is the case then, the new machine we just built and runs nothing 
explains a lot. free showed usage of 225mb ram while the remote gkrellm 
reported 56mb used :) that is where i first noticed the differences. so in 
this case there was nothing running to use ram so it got packaged into 
buffer/cache/slab to make us think it is using more :)


thank you for the education and the ability to use the raw reports as well!

ever since i discovered gkrellm several years ago, it has literally 
revolutionized how i monitor systems. now i only need a single dual monitor 
desktop to watch everything. i keep the gkrellm monitors on the left monitor 
while the right one has a single firefox with a few tabs running cacti and 
nagios.  clean and simple. monitoring 10 host servers and a gazillion virtual 
servers at once has never been more simple. 


> 
> Bill
> _______________________________________________
> Gkrellm mailing list
> [email protected]
> http://lists.jutley.org/cgi-bin/mailman/listinfo/gkrellm
> 
_______________________________________________
Gkrellm mailing list
[email protected]
http://lists.jutley.org/cgi-bin/mailman/listinfo/gkrellm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.