monit reports different RAM loads

Discussion in 'ISPConfig 3 Priority Support' started by bobpit, Jan 29, 2014.

  1. bobpit

    bobpit Member

    From the monit screen:
    SYSTEM memory: 18.1% [189964 kB]
    php5-fpm memory: 49.0% [514512 kB]

    [email protected]:~# free
                 total       used       free     shared    buffers     cached
    Mem:       1048576     351148     697428          0          0     157568
    -/+ buffers/cache:     [B]193580[/B]     854996
    Swap:      1048576      10140    1038436
    I understand that monit [SYSTEM memory] is total memory used. This is in par with the "free" command reporting 193580 KB used.

    The php5-fpm memory: 49.0% [514512 kB] must be wrong. How can it be greater than the total memory used? It must have something to do with calculating wrong the memory used by each process of php.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont think that monit mans total memory with system memory. In my opinion, system memory is the ram used by the Linux kernel while applications like php-fpm belong to the userland and not the kernel.
  3. bobpit

    bobpit Member

    Then how do you explain the result of the free command:
    -/+ buffers/cache:     [B]193580[/B]     854996
    The 193580 is the TOTAL memory used by OS + applications, am I correct? Which is almost the same like the monit SYSTEM memory: 18.1% [189964 kB]. This can't be a coinsidence.
  4. bobpit

    bobpit Member

    Here is a pic of monit. System memory is 33,8% (354.920 mb) and php5-fpm ram is 122% (1.279.608 mb). Where 100% corresponds to 1 GB RAM.

    MUNIN reports for RAM:
    apps : 295 mb
    slab_cache : 73 mb

    From what I understand apps + slab_cache is the ram used by apps and kernel. This totals 295 + 73 = 368 mb, very close to the 354.920 mb reported by monit.

    Now what could be this 122% (1.279.608 mb) ram used by php5-fpm only?

    Attached Files:

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    When you want to know in detail which memory is used on your system, the query the kernel directly:

    cat /proc/meminfo
  6. bobpit

    bobpit Member

    [email protected]:~# cat /proc/meminfo 
    MemTotal:        1048576 kB
    MemFree:          547836 kB
    Cached:           139772 kB
    Active:           243436 kB
    Inactive:         182496 kB
    Active(anon):     135760 kB
    Inactive(anon):   150400 kB
    Active(file):     107676 kB
    Inactive(file):    32096 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:       1048576 kB
    SwapFree:         987668 kB
    Dirty:                72 kB
    Writeback:             0 kB
    AnonPages:        286160 kB
    Shmem:             38832 kB
    Slab:              74780 kB
    SReclaimable:      13680 kB
    SUnreclaim:        61100 kB
    I don't see how this can help interpret the 122% (1.279.608 mb) ram used by php5-fpm only.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the ram that your server really uses, I showed you that so that you see that there is not THE ram usage. Applications can use ram and they can just reserve ram but not use it etc. so there are a lot of options. You should write the munin and monit developers or read the sourcecode of thes eapps if you want to know which values are used and summed up in detail by these two applications for the different values that they show.

Share This Page