computing drop-able caches

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

 



Hi,

My colleague Khalid and I are working on a patch which will provide a /proc file to output the size of the drop-able page cache. One way to implement this is to use the current drop_caches /proc routine, but instead of actually droping the caches just add
up the amount.

Here's a quote Khalid,

"Currently there is no way to figure out the droppable pagecache size
from the meminfo output. The MemFree size can shrink during normal
system operation, when some of the memory pages get cached and is
reflected in "Cached" field. Similarly for file operations some of
the buffer memory gets cached and it is reflected in "Buffers" field.
The kernel automatically reclaims all this cached & buffered memory,
when it is needed elsewhere on the system. The only way to manually
reclaim this memory is by writing 1 to /proc/sys/vm/drop_caches. "

So my impression is that the drop-able cache is spread over two fields in meminfo.

Alright, the question is does this info live someplace else that we don't know about? Or someplace in the kernel where it could be
added to meminfo trivially ?

The point of the whole exercise is to get a better idea of free memory for our employer. Does it make sense to do this for computing free memory?

Any comments welcome..

Daniel

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]