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.

Question about the mCPU limit.

Discussion in 'CloudLinux' started by vixon, Mar 14, 2012.

  1. vixon

    vixon Active Member

    Joined:
    Sep 23, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Estonia
    cPanel Access Level:
    Root Administrator
    Hello,

    Could anybody explain please how exactly mCPU limit acts when some php scripts hit the limit? Does this php process get killed or it just continues working consuming the maximum allowed CPU and dies when php limits get reached (max_execution_time etc) ?


    --
    Kind regards
     
  2. iseletsk

    iseletsk Well-Known Member

    Joined:
    Mar 3, 2010
    Messages:
    163
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Princeton, New Jersey, United States
    Few points:
    1. it is not per process, but for all the process for the LVE (account)
    2. Nothing gets killed when account reaches the limit, but things might be a bit slower.

    Think about CPU limit in a way to CPU slice. If you have 10% of CPU limit, it means that within a second -- you can use CPU for no more then 1/10 of that time (0.1 second). Once scripts in LVE use up that time, they go to sleep until next second. Then they get another 0.1 second., etc...

    The actual interval is not a second, but much much smaller. Yet, the idea is the same. Once LVE uses up its "time quote", processes inside LVE just sleep until the next time slice. From outside it appears that they are "slow", when they are forced to sleep like that.
     
  3. vixon

    vixon Active Member

    Joined:
    Sep 23, 2009
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Estonia
    cPanel Access Level:
    Root Administrator
    So, the second answer was correct "..continues working consuming the maximum allowed CPU and dies when php limits get reached (max_execution_time etc)". Before the CloudLinux installation the scripts were doing their jobs till the end, but now the system is slowing them down and they get "expired" due to php limits.

    Thanks!
     
  4. iseletsk

    iseletsk Well-Known Member

    Joined:
    Mar 3, 2010
    Messages:
    163
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Princeton, New Jersey, United States
    Sounds correct/reasonable.
     
Loading...

Share This Page