LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Committed_AS in /proc/meminfo (https://www.linuxquestions.org/questions/linux-server-73/committed_as-in-proc-meminfo-4175595916/)

LinuxLover 12-22-2016 05:59 AM

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
MemTotal:      16329948 kB
MemFree:          339580 kB
Buffers:          559356 kB
Cached:        11187300 kB
SwapCached:        1480 kB
Active:          7750748 kB
Inactive:        6444332 kB
Active(anon):    1910308 kB
Inactive(anon):  538124 kB
Active(file):    5840440 kB
Inactive(file):  5906208 kB
Unevictable:          0 kB
Mlocked:              0 kB
SwapTotal:      33554428 kB
SwapFree:      33536700 kB
Dirty:                96 kB
Writeback:            0 kB
AnonPages:      2447088 kB
Mapped:            16684 kB
Shmem:                8 kB
Slab:            1632916 kB
SReclaimable:    1554712 kB
SUnreclaim:        78204 kB
KernelStack:        3696 kB
PageTables:        8004 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    41719400 kB
Committed_AS:    1138972 kB
VmallocTotal:  34359738367 kB
VmallocUsed:      317856 kB
VmallocChunk:  34359406044 kB
HardwareCorrupted:    0 kB
AnonHugePages:    964608 kB
HugePages_Total:      0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:      2048 kB
DirectMap4k:        8560 kB
DirectMap2M:    16766976 kB

below is free -m

Quote:

[cacti@dxb-sns1 ~]$ free -m
total used free shared buffers cached
Mem: 15947 15616 330 0 546 10925
-/+ buffers/cache: 4144 11802
Swap: 32767 17 32750

used Memory in system is 4144 MB but Committed_AS 1138 MB.

How Committed_AS can be less then actual used RAM ?

sag47 12-26-2016 11:49 PM

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.

sundialsvcs 12-28-2016 08:25 AM

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).

drhpc 11-29-2018 09:35 AM

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.

sag47 10-17-2023 07:03 PM

Quote:

Originally Posted by drhpc (Post 5931558)
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.

free reports usage of application memory plus memory in use by disk caching (not application memory). Refer to available memory in your free command output and reference that with Committed_AS.


All times are GMT -5. The time now is 11:10 AM.