The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Memory usage apparently higher than expected

Discussion in 'General Discussion' started by shadowone, Jul 11, 2016.

  1. shadowone

    shadowone Member

    Joined:
    Feb 25, 2015
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello,
    I know that this is a very old thread, but i have the same issue of understanding the "Memory Used" System Information in cpanel nowadays.
    On centos 6 the above explains a lot to me, but now on centos 7 servers i am confused again:

    Code:
    # cpanel
    Memory Used    56.55% (9,191,032 of 16,252,132)
    
    # free
      total  used  free  shared  buff/cache  available
    Mem:  16252132  3535108  722616  1400968  11994408  10804056
    Swap:  10485756  157680  10328076
    
    # top
    KiB Mem : 16252132 total,  215900 free,  4097960 used, 11938272 buff/cache
    KiB Swap: 10485756 total, 10327244 free,  158512 used. 10241320 avail Mem
    
    # htop
    5.45G/15.5G
    Can anyone explain where this number (9,191,032) came from?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    As of cPanel version 11.50, the memory usage information you see in Web Host Manager now comes from the "/proc/meminfo" file instead of the "free" command:

    Fixed case 189013: Correct memory usage % on all Linux versions.

    Thank you.
     
  3. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    Hello, I had to open this post as it pointed to where cPanel is grabbing the memory information.

    On our 32GB cPanel server, free -m shows 24GB of available RAM, while cPanel reports only 10% is available.

    Running cat /proc/meminfo yields: MemAvailable: 26GB, MemFree: 1GB, yet our SWAP is 4GB in size even though there appears to be plenty of memory.

    MemTotal: 32667880 kB
    MemFree: 1372040 kB
    MemAvailable: 26649868 kB
    Buffers: 0 kB
    Cached: 1685240 kB
    SwapCached: 365548 kB
    Active: 4001156 kB
    Inactive: 1652532 kB
    Active(anon): 2984124 kB
    Inactive(anon): 1088784 kB
    Active(file): 1017032 kB
    Inactive(file): 563748 kB
    Unevictable: 0 kB
    Mlocked: 0 kB
    SwapTotal: 7812092 kB
    SwapFree: 3575112 kB
    Dirty: 2080 kB
    Writeback: 0 kB
    AnonPages: 3609480 kB
    Mapped: 140136 kB
    Shmem: 104412 kB
    Slab: 25229836 kB
    SReclaimable: 24034920 kB
    SUnreclaim: 1194916 kB
    KernelStack: 8096 kB
    PageTables: 53232 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 24146032 kB
    Committed_AS: 6612956 kB
    VmallocTotal: 34359738367 kB
    VmallocUsed: 362612 kB
    VmallocChunk: 34342256804 kB
    HardwareCorrupted: 0 kB
    AnonHugePages: 1169408 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    HugePages_Surp: 0
    Hugepagesize: 2048 kB
    DirectMap4k: 146916 kB
    DirectMap2M: 9181184 kB
    DirectMap1G: 26214400 kB
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you post a screenshot of what you see in the WHM interface? The "Available" memory should not display as a percentage, but instead should match closely to the "MemAvailable" value in the /proc/meminfo file.

    Thank you.
     
  5. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    The SWAP is being used up after few days, reaching 3-5GB of SWAP usage and rising up, so there must be a memory consumption or the Kernel is not releasing the cached memory.

    Our setup is CentOS 7.2 64bit, CloudLinux 7, Apache with MemCache Module memory caching (which I'm suspecting the culprit here)

    This is WHM:
    [​IMG]

    This is cat /proc/meminfo:

    Code:
    cat /proc/meminfo
    MemTotal:  32667880 kB
    MemFree:  1064456 kB
    MemAvailable:  25222012 kB
    Buffers:  0 kB
    Cached:  3673240 kB
    SwapCached:  884440 kB
    Active:  5921456 kB
    Inactive:  2832144 kB
    Active(anon):  4067692 kB
    Inactive(anon):  1478636 kB
    Active(file):  1853764 kB
    Inactive(file):  1353508 kB
    Unevictable:  0 kB
    Mlocked:  0 kB
    SwapTotal:  7812092 kB
    SwapFree:  4857204 kB
    Dirty:  244 kB
    Writeback:  0 kB
    AnonPages:  4529416 kB
    Mapped:  158512 kB
    Shmem:  465952 kB
    Slab:  22377568 kB
    SReclaimable:  21288156 kB
    SUnreclaim:  1089412 kB
    KernelStack:  9328 kB
    PageTables:  37664 kB
    NFS_Unstable:  0 kB
    Bounce:  0 kB
    WritebackTmp:  0 kB
    CommitLimit:  24146032 kB
    Committed_AS:  6939664 kB
    VmallocTotal:  34359738367 kB
    VmallocUsed:  378860 kB
    VmallocChunk:  34342245588 kB
    HardwareCorrupted:  0 kB
    AnonHugePages:  2568192 kB
    HugePages_Total:  0
    HugePages_Free:  0
    HugePages_Rsvd:  0
    HugePages_Surp:  0
    Hugepagesize:  2048 kB
    DirectMap4k:  146916 kB
    DirectMap2M:  9181184 kB
    DirectMap1G:  26214400 kB
    
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    rpvw likes this.
Loading...

Share This Page