I'm trying to find a reasonable representation of "available" memory. "Free" memory isn't very accurate, as Linux is good at putting otherwise unused RAM to good use if it's otherwise idle.
Can someone help me decipher the relationship of the various values in file /proc/meminfo ??
Given /proc/meminfo (at the bottom of this note), I would expect, at a minimum, that:
MemTotal = MemFree + MemShared + Active + Inact_dirty + Inact_clean
Given these numbers, 2059580 = 29180+192+10120+1679168+14
2168 + ( 198752 )
So about 10% ( 198752 ) remains unaccounted for. Is that the kernel? Not obvious, since some of the documentation I have read defines MemTotal as, "Total usable ram (i.e. physical ram minus a few reserved bits and the kernel binary code)". Other docs are more casual in their wording and don't indicate that the kernel is excluded.
Further, the wording of some of the documentation (and the sheer force of arithmetic) implies that Caches and Buffers are subsets of the active and inactive pages, but is is far from clear.
I'd like to a) understand how these various statistics knit together and b-and-more-importantly) gather a metric that indicates the amount of "memory available", which I suppose means "available to become active" and therefore assigned to the working set of a process. I've read several writeups on memory management, but "Cached The amount of physical RAM, in kilobytes, used as cache memory" is pretty useless.
I'm looking for education as much as answers - good references are gold. (The one's I've read are sloppy or presume the answers I am seeking)
Thanks,
John
MemTotal: 2059580
MemFree: 29180
MemShared: 192
Buffers: 53016
Cached: 1778248
SwapCached: 0
Active: 10120
Inact_dirty: 1679168
Inact_clean: 142168
Inact_target: 64
HighTotal: 1179632
HighFree: 25996
LowTotal: 879948
LowFree: 3184
SwapTotal: 1048552
SwapFree: 1048552
NrSwapPages: 262138
Start Free Trial