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.

Cloudlinux memory usage

Discussion in 'CloudLinux' started by NixTree, Jun 7, 2012.

  1. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello,

    I would like to know in what interval CL collect and show the memory usage of users. To make my question more clear, if I display the resource usage of a user using " lveinfo -u <user>" command, it will show the status for variuos intervals!For eg:


    From To aCPU mCPU lCPU aEP mEP lEP aMem mMem lMem MemF MepF
    06-07 06:05 06-07 06:10 0 3 12 1 4 50 3.0G 3.1G 4.0G 0 0

    As you can see above, the memory limit if 4GB and the average usage is "3GB"!!! From stats the maximum entry process is 4 and there aren't any usages for this domains other than the web usage ( no cron, etc ). the virtual memory used is ~120MB by each of the PHP processes; so the maximum memory usage can be 120*4 for this user- then how come it is 3GB? Or the 3GB in the output is the sum of the total usage between 06-07 06:05 06-07 06:10 ( 5 mins ).

    Any thoughts!

    Thank you,
    Nibin.
     
  2. iseletsk

    iseletsk Well-Known Member

    Joined:
    Mar 3, 2010
    Messages:
    163
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Princeton, New Jersey, United States
    This is for 10 minutes. We query data once a second, but store the data in in 1 minute intervals for the last 15 minutes, 15 minutes intervals for last 24 hours, and 1 hour intervals for the past 2 months.

    If you are using MPM Worker -- apache memory size might be accounted toward that limit as well.
     
  3. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello Igor,

    Thanks for your reply! I know there is a small misconception among the people how CL deals with memory! If you can explain this, it will clear things more better :)

    So you mean the 3GB usage is the total usage of that account for 10 minutes?

    Also,

    From To aCPU mCPU lCPU aEP mEP lEP aMem mMem lMem MemF MepF
    06-09 00:35 06-09 00:40 0 7 12 1 4 50 1.1G 1.3G 2.0G 0 0
    06-09 00:40 06-09 00:45 0 6 12 0 3 50 840.2M 1.2G 2.0G 0 0
    06-09 00:44 06-09 00:45 1 3 12 1 2 50 1.1G 1.1G 2.0G 0 0

    # date
    Sat Jun 9 00:46:11 EST 2012

    As you can see, the last 15 minutes log doesn't show in 1 min interval; but the last 5 min log shows a 1 min interval!

    Please would you clarify this?

    By the way, we use Litespeed.

    Thank you,
    Nibin.
     
  4. bejbi

    bejbi Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Czestochowa, Poland
    cPanel Access Level:
    DataCenter Provider
    When I read this reply I was confused. So CL shows NOT the usage of memory, but sum of memory in last 10 minutes ... It is very, very, very bad news ...

    Is it possible to show memory usage in shorter interval ? I mean i.e. 1 minute ... It will be more accurate to "momentary memory usage" than 10 minutes. 10 minutes - this should be only for statistics ... but not for blocking user for memory usage ...
     
  5. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello,

    Anybody from CL or cPanel can clarify this...because it will reveal lot of misleading concepts!

    Thank you.
     
  6. iseletsk

    iseletsk Well-Known Member

    Joined:
    Mar 3, 2010
    Messages:
    163
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Princeton, New Jersey, United States
    The memory being accounted for is virtual memory -- memory allocated by processes. When you run top, you can see it in "VIRT" column.
    What do we limit: The way linux works, processes try to allocate memory, in chunks -- usually in kilobytes, sometimes in megabytes. Creating of a new process also allocates memory (usually in the size of the starting process). Now if current allocated memory + amount of memory being allocated > limit, CloudLinux will prevent that new memory from being allocated, instead increasing memory fault. This is why you would never see memory being very close to the limit. It increases in chunks -- and just fails when it tries to go over. The limits are real time.


    Now, while limits are real time, statistics collects memory information once a second -- so while it is accurate on average, it is not going to record all the peaks.
    Now you can get statistical info for any period of time, last 10 minutes, last minute, last 5 days -- it is really up to you.
    You might need to use lveinfo for that.

    We don't use statistical info to enforce limits, we use it to provide you with information on what happened in the past.
    lvetop will show you real time memory usage
     
Loading...

Share This Page