Re: client/server memory used incorrect
Bill WIlson <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.gkrellm |
|---|---|
| Message-ID | <[email protected]> |
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. 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. > 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. Bill _______________________________________________ Gkrellm mailing list [email protected] http://lists.jutley.org/cgi-bin/mailman/listinfo/gkrellm