LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-22-2016, 05:59 AM   #1
LinuxLover
Member
 
Registered: Feb 2004
Distribution: Centos 7 x86_64 , Rocky Linux 8 (aarch64)
Posts: 196

Rep: Reputation: 32
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 ?
 
Old 12-26-2016, 11:49 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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.
 
1 members found this post helpful.
Old 12-28-2016, 08:25 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,640
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
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).

Last edited by sundialsvcs; 12-28-2016 at 08:26 AM.
 
Old 11-29-2018, 09:35 AM   #4
drhpc
LQ Newbie
 
Registered: Mar 2018
Posts: 10

Rep: Reputation: Disabled
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.
 
Old 10-17-2023, 07:03 PM   #5
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by drhpc View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/proc/meminfo VS /proc/kcore Fill Linux - Newbie 2 08-04-2011 04:13 AM
/proc/meminfo vkmgeek Linux - General 6 03-20-2008 12:12 AM
/proc/meminfo hiding some memory? elpy Linux - Hardware 3 07-28-2007 10:26 AM
/proc/meminfo gives wrong info jr8rdt Linux - Hardware 2 12-07-2006 06:37 PM
Define fields in /proc/meminfo ilnli Linux - General 1 05-17-2005 01:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration