Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

SOLVED Process Manager Priority Values

Discussion in 'General Discussion' started by swbrains, May 9, 2018.

  1. swbrains

    swbrains Well-Known Member

    Joined:
    Sep 13, 2006
    Messages:
    91
    Likes Received:
    7
    Trophy Points:
    158
    The documents for Process Manager say this about the Priority value:

    Priority A number between -20 and 20 that describes how much time the system uses to work on the process. -20 is the least CPU intensive, while 20 is the most CPU intensive.

    Is this correct? When my Perl script sets its priority to 19, the Process Manager shows 19 in the Priority column. But if, according to the docs, I want to make my script low-priority, I should set my script to -19. If I do that, it shows 0 in the Priority column in Process Manager. In fact, if I set my script to *any* negative priority value, it shows up in Process Manager as 0 priority.

    From a discussion about this on StackOverflow, I was told that Process Manager won't let me set my script's priority to a negative number because that would actually be *raising* it's priority, which the script doesn't have permission to do, but it can lower itself, so setting a positive value like 19 works, and Process Manager shows that it has indeed set its priority to 19.

    It was suggested to me that the cPanel docs are reversed, so I wanted to ask if this is the case or why I'm seeing what I'm seeing with Process Manager and its reported priority values based on my script settings.

    Thanks for any light you can shed on this...
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,214
    Likes Received:
    1,757
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @swbrains,

    It looks like this is a flaw in our Documentation. I've opened internal case DOC-10761 with our Documentation Team to update this document to reflect that lower priority values correspond to more CPU usage.

    Thank you.
     
  3. swbrains

    swbrains Well-Known Member

    Joined:
    Sep 13, 2006
    Messages:
    91
    Likes Received:
    7
    Trophy Points:
    158
    Thanks for clarifying!
     
    cPanelMichael likes this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,214
    Likes Received:
    1,757
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. swbrains

    swbrains Well-Known Member

    Joined:
    Sep 13, 2006
    Messages:
    91
    Likes Received:
    7
    Trophy Points:
    158
    Thanks!
     
    cPanelMichael likes this.
Loading...

Share This Page