Committed_AS in /proc/meminfo
Hi geeks,
I am some clarification in statistics of Committed_AS. As per different docs, it is "The amount of memory presently allocated on the system. The committed memory is a sum of all of the memory which has been allocated by processes, even if it has not been "used" by them as of yet." OR The total amount of memory required in the worse case scenario right now if all the applications actually used what they asked for at startup! Below is out of meminfo Code:
[cacti@dxb-sns1 ~]$ cat /proc/meminfo Quote:
used Memory in system is 4144 MB but Committed_AS 1138 MB. How Committed_AS can be less then actual used RAM ? |
See https://www.kernel.org/doc/Documenta...stems/proc.txt for docs on Committed_AS.
On my system the values you mentioned are not reversed. Also, if you look at the Buffers value in your meminfo output it is less than Committed_AS. You might want to ask on the Kernel users mailing list. If you do I'd be curious about the answer. |
As that document says, this (optional) kernel feature tracks how much memory processes have asked for, as a means of assuring that they will actually be able to get it.
Physical memory resources are allocated on-demand: when you actually "touch" a page, a physical page-frame is allocated. When that page needs to be swapped out, a swap-frame is allocated. And so on. Absent this control mechanism, it would therefore be possible for processes to malloc(), say, 1 gigabyte of memory, only to discover (the hard way ...) that physical resources have been overcommitted such that the request can never actually be satisfied. A separate control allows you to regulate how much memory an application is allowed to ask for. Incidentally, this is very useful for "busy web/AJAX servers," especially if those servers use widely-variable amounts of RAM to service the requests that they will receive. It can be used to prevent memory overcommit and subsequent system crashes. Properly used, it can prevent the server from attempting to get into a situation where successful completion of all requests cannot be guaranteed. Because it operates at a level higher than that of any application (i.e. "the kernel"), it can enforce system stability in a way that application-level controls cannot. It also makes the kernel specifically aware of what is going on ... both in terms of "actual resource demand" and "commitments of those resources" (application behavior). |
Was there any resolution to this in the past years? I am observing Committed_AS being smaller than used memory (as reported by free, or the difference between MemTotal and MemAvailable) on a set of CentOS 7 servers. Things just don't add up.
|
Quote:
|
All times are GMT -5. The time now is 11:10 AM. |