Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-54770

Add /proc/meminfo MemAvailable to FTDC

    • 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.

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            kevin.arhelger@mongodb.com Kevin Arhelger
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: