Issue
Using Ubuntu 14.02 and running the command cat /proc/meminfo, I get the following:
MemTotal: 1007796 kB
MemFree: 64248 kB
MemAvailable: 64876 kB
I'd like to know the exact difference between MemFree and MemAvailable. Also any hints as to how I could more efficiently use system resources would be appreciated. I have a new laptop on order, but for the moment, I'm developing on a machine with 1Gb of RAM.
Note: I was running two terminals and eclipse at the time of the command, so you can see how it's tough to multi-task.
Thanks in advance.
Solution
Rik van Riel's comments when adding MemAvailable to /proc/meminfo:
/proc/meminfo: MemAvailable: provide estimated available memory
Many load balancing and workload placing programs check /proc/meminfo to estimate how much free memory is available. They generally do this by adding up "free" and "cached", which was fine ten years ago, but is pretty much guaranteed to be wrong today.
It is wrong because Cached includes memory that is not freeable as page cache, for example shared memory segments, tmpfs, and ramfs, and it does not include reclaimable slab memory, which can take up a large fraction of system memory on mostly idle systems with lots of files.
Currently, the amount of memory that is available for a new workload, without pushing the system into swap, can be estimated from MemFree, Active(file), Inactive(file), and SReclaimable, as well as the "low" watermarks from /proc/zoneinfo.
However, this may change in the future, and user space really should not be expected to know kernel internals to come up with an estimate for the amount of free memory.
It is more convenient to provide such an estimate in /proc/meminfo. If things change in the future, we only have to change it in one place.
Answered By - The Beast Answer Checked By - Marie Seifert (WPSolving Admin)