different memory estimates

Brian J. Tarricone brian at tarricone.org
Mon Jun 29 06:17:51 CEST 2009


On 2009/06/28 14:38, Liviu Andronic wrote:
> Hello,
>
> On Sun, Jun 28, 2009 at 10:54 PM, Brian J. Tarricone<brian at tarricone.org>  wrote:
>> Hmm, that's a little odd. Try looking at /proc/meminfo.  You'll have to do
>> some math to subtract out buffers and cache from the used memory figure, but
>>
> I did the math. At the moment when I opened /proc/meminfo, taskmanager
> reported 304 MB and systemload 312 MB. The proc file reported this:
> MemTotal:       482784 kB
> MemFree:         11408 kB
> Buffers:          7932 kB
> Cached:         151776 kB
>
> (482784-7932-151776)/1024=315 MB
>
> Unless I'm wrong in math, I would suspect systemload is more accurate.

Hmm, seems to me that systemload is pretty inaccurate too.  See (line 98):

http://svn.xfce.org/index.cgi/goodies/xfce4-systemload-plugin/trunk/panel-plugin/memswap.c?view=markup

It looks like it just considers Cached and ignores Buffers -- which is 
odd for your particular example since that should give you an ~8MB 
difference from reality, and yet you only see a ~3MB difference.  Then 
we have taskmanager which appears to do the right thing (line 135):

http://svn.xfce.org/index.cgi/goodies/xfce4-taskmanager/trunk/src/functions.c?view=markup

... so, I'm not sure why taskmanager is less accurate for you.  Perhaps 
just time delay of measurements in your case.

	-brian



More information about the Xfce mailing list