-
Type: Question
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 4.4.4
-
Component/s: Diagnostics
-
None
-
Fully Compatible
-
v4.4, v4.2, v4.0
-
Security 2021-03-22
When analyzing low memory / out of memory situations, currently a manual calculation for available memory is needed. As the Linux page cache will attempt to consume all available memory, the MemFree statistic alone cannot be used to perform this analysis.
Redhat 7 and later include a MemAvailable counter in /proc/meminfo https://www.kernel.org/doc/Documentation/filesystems/proc.txt
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.
While a close approximation of MemAvailable can be made from simply summing MemFree + Cached + Buffers. I've found MemAvailable to be slightly more pessimistic and would be really helpful in providing a single metric for memory analysis.