[NTLUG:Discuss] True memory usage
David I S Mandala
davidm at them.com
Wed Oct 19 23:09:33 CDT 2005
Hmm, is that true? I would have thought the better number would be
cached + free = total memory potentially avalible.
I understood that the cached memory is the disk cache and that Linux
uses most all free memory to speed up the disk, but that when necessary
it will relinquish it back for application use before the swap memory is
used.
Cheers,
David
Chris Cox wrote:
> Robert Thompson wrote:
>>Hello,
>>
>> I am trying to figure out the best way to get the 'true' memory usage
>>for a machine. When I do a free I think I'm supposed to look at the
>>'used' section under the -/+ buffers/cache line:
>>
>>$ free
>> total used free shared buffers
>>cached
>>Mem: 904832 895972 8860 0 18060
>>565936
>>-/+ buffers/cache: 311976 592856
>>Swap: 755044 164 754880
>>
>> So the above means I am using 311M of memory?
>>
>> When I attempt to add up the memory from doing a ps aux and adding the
>>RSS (resident set size) I get something different (larger than total
>>memory):
>
> It can be complicated. Do you need a VERY exact number? I would think
> the value in free would work fine (or /proc/meminfo). ps can be
> misleading since threaded applications will show up multiple times with
> the same RSS (or even SZ) size. There can be other things shared as
> well.
>
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
--
David Mandala <davidm at them dot com>
www.them.com/~davidm Public Key id: 45B2D952
Murphy TX, 75094 214.774-2569 H 972.693.4007 C
More information about the Discuss
mailing list