SReclaimable should not be included in system memory usage

Issue #71 resolved
Michael Schürig
created an issue

Say I have a check for my system like this

check system myserver
  if memory > 10 GB for 5 cycles
    then alert

Then monit complains if the limit is exceeded due to filesystem memory usage. This is not very helpful; I want the filesystem to use all memory for caching unless it is otherwise needed. What I want to monitor is the amount of memory used by processes. Monit ought to keep these two kinds of memory usage apart.

Comments (10)

  1. Tildeslash repo owner

    Monit subtracts the buffer/cache from the system memory usage ... for example on Linux it takes the system memory informations from /proc/meminfo and computes the usage as: (MemTotal - MemFree - Buffers - Cached). Similarly on other platforms.

    What platform is it related to?

  2. Tildeslash repo owner

    Please can you post output from /proc/meminfo?

    Was Monit installed from the official source code or precompiled binary or using some 3rd party package? (possibly with some modifications)

    Monit always subtracts Cached as you can see in src/process/sysdep_LINUX.c => if there are no 3rd party modifications of memory usage formula, your kernel most probably presents memory usage in some unexpected format ... which kernel version it is?

  3. Michael Schürig reporter
    • changed status to open

    I've tracked down the cause for the memory consumption. It was the kernel's Slab allocation. I think monit should subtract SReclaimable from the consumed memory.

    Sorry for the mess.

  4. Log in to comment