[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: meminfo?





Shimon Panfil wrote:

> Hi folks,
> I see a considerable difference between total used memory reported by
> top and the sum of total sizes of processes. 
> In particular (gtop):Sum of total sizes 92624K
> 			memory used:203948K 
> 
> Can anybody explain this?

Yes. Linux is very efficient in it's use of memory and doesn't let free 
memory be wasted. If you have unused free memory Linux will use it for 
caching and buffers to make things like disk access faster. These 
buffers will be released automaticaly when the memory is needed.

This means that to get the actual *available* memory on the system (as 
opposed to free memory) you'll have to add the free memory together with 
the buffers/cache memory.

The special file /proc/sys/vm/buffercache can be used to control how 
much buffer memory is used and when to allocate and free it.

-- 
Gilad Ben-Yossef <gilad@benyossef.com>
http://benyossef.com :: +972(54)756701
"Anything that can go wrong, will go wrong, while interrupts are disabled. "
	-- Murphey's law of kernel programing.


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il