Difference between MemFree and MemAvailable

Using Ubuntu 14.02 and running cat / proc / meminfo, I get this:

MemTotal:        1007796 kB
MemFree:           64248 kB
MemAvailable:      64876 kB

      

I would like to know the exact difference between MemFree and MemAvailable. Any hints as to how I can make better use of system resources would also be appreciated. I have a new laptop on order, but at the moment I am developing a machine with 1 GB of RAM.

Note. I was running two terminals and eclipse during command, so you can see how difficult it is to multitask.

Thanks in advance.

+3


source to share


1 answer


/ proc / meminfo: provide an approximate available memory

Many load balancing and workload placement programs check / proc / meminfo to estimate free memory. They usually do this by adding "free" and "cached", which was good ten years ago, but today it is likely wrong.

This is incorrect because Cached includes memory that is not available as page cache, such as shared memory segments, tmpfs, and ramfs, and does not include the fixable memory slab, which can take up a large proportion of system memory mostly on unallocated systems. with many files.

Currently, the amount of memory available for a new workload without forcing the system to boot into the system can be estimated by MemFree, Active (file), Inactive (file), and SReclaimable, as well as "low" watermarks from / Proc / ZoneInfo.

However, this may change in the future, and user space should really not be aware that the inner core can give an estimate of the amount of free memory.

It is more convenient to present this estimate in / proc / meminfo. If something changes in the future, we only need to change it in one place.



Source: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773

+5


source







All Articles