Linux – the difference between MemFree and MemAvailable in /proc/meminfo

linux

You might see something like this if you cat /proc/meminfo:

MemTotal:        8078760 kB
MemFree:          629012 kB
MemAvailable:    1175568 kB
Buffers:          126184 kB
Cached:          2988512 kB
SwapCached:       261320 kB
Active:          4867796 kB
Inactive:        2119244 kB
Active(anon):    4465072 kB
Inactive(anon):  1895064 kB
Active(file):     402724 kB
Inactive(file):   224180 kB
Unevictable:       12068 kB
Mlocked:           12068 kB
SwapTotal:      16582652 kB
SwapFree:       13724816 kB
Dirty:               252 kB
Writeback:             0 kB
AnonPages:       3848816 kB
...

What's the difference between MemFree and MemAvailable?

Best Answer

TL;DR:

MemFree: The amount of physical RAM, in kilobytes, left unused by the system.

MemAvailable: An estimate of how much memory is available for starting new applications, without swapping. Calculated from MemFree, SReclaimable, the size of the file LRU lists, and the low watermarks in each zone. The estimate takes into account that the system needs some page cache to function well, and that not all reclaimable slab will be reclaimable, due to items being in use. The impact of those factors will vary from system to system.

The full answer is here:

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