I have a pretty busy GNU/Linux server that I think needs more RAM. I know that the free
command doesn't show the amount of RAM that is used.
So I was stumbling upon Commited_As
in /proc/meminfo
. It currently shows 57972 kB which isn't much. Is this the amount of RAM that the processes use "right now" or is this an estimate of how many additional RAM it would take to never run out of memory with this load?
Yeah, Committed_AS is the field to look for. What Robert said, it is a 99.99% guarantee that the system will not OOM if all the memory requests are granted and allocated by that kernel at that particular instant.
From kernel source.
It is declared as a struct in source and is used in the function _vm_enough_memory() to see whether a process can grow in memory or not.
To cut short, it is a pretty good parameter to watch for memory issues.
Committed_As is an estimate of how much RAM you would need to make a 99.99% guarantee that there never is OOM.
That said I'm not sure how accurate this is or if I'd bet the farm on it. On my current server it's almost twice my active + inactive memory usage while on another server i have it shows 61mb while the server has about a gig in active. Kinda raises my suspicions about this number...
http://www.redhat.com/advice/tips/meminfo.html