How to find out a process's proportional use of system-wide Committed_AS memory on Linux?
4
votes
2
answers
183
views
On Linux, it's possible to [disable overcommitting memory](https://unix.stackexchange.com/questions/797835/disabling-overcommitting-memory-seems-to-cause-allocs-to-fail-too-early-what-co/797836#797836) which makes it behave like Windows, in that
malloc()
will fail once all physical memory is used up. As explained [in this insightful and good answer](https://unix.stackexchange.com/a/797888/104885) , in that mode, the Committed_AS
memory statistic shown in /proc/meminfo
becomes the relevant value for used up memory, rather than any of the other metrics like calculating it based on MemFree
and so on.
**Here's my question:** So when running that mode, how do I find out a process's proportional use of system-wide Committed_AS
total value on Linux? Is there an easy way to do so?
**As for more background info**, I've been using this mode now for some days. It's useful for example to test out how software I work on would behave on Windows when hitting the memory limit.
However I ran into the practical issue when I run out of memory, it's hard to find the biggest offenders. It seems to be the case that no common system monitor tool shows how much a process actually committed in terms of memory, since in my understanding the usual resident memory, shared memory, and so on only apply to memory *actually written into* (which I think is smaller than committed memory).
Hence, it becomes difficult to judge which program actually committed the most memory and may be worth terminating when I run out. Seeing the committed memory might also help identifying programs that accidentally use fork()
in situations where they perhaps should be using vfork()
.
Asked by E. K.
(153 rep)
Jul 16, 2025, 08:15 AM
Last activity: Jul 17, 2025, 06:33 PM
Last activity: Jul 17, 2025, 06:33 PM