Feature #9537
configurable nice value (explicitly on service and exec calls)
| Status: | Accepted | Start date: | 09/16/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | service | |||
| Target version: | - | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | ||||
| Votes: | 0 |
Description
We would like to be able to set the nice value on puppetd, but we don’t want everything NICEd that is started by puppet.
When searching for this i found this almost identical request from 2010 on http://markmail.org/message/2xscb6v6l7pi6zqn:
The requestor, Trevor, said he was about to add this as a request here, but did not have his account data. It seems though he never did, as i could not find the request in here.
So i will just copy and paste it here.
quote:
“So, some of us would like to be able to set the nice value on puppetd. However, we don’t want all of our services (and some of our execs) re-niced.
Would it be feasible/practical to have the ability to set the nice value explicitly on Service and Exec calls? "
This is what we are also interested in.
History
Updated by James Turnbull 7 months ago
- Category set to service
- Status changed from Unreviewed to Needs Decision
- Assignee set to Nigel Kersten
Updated by Nigel Kersten 5 months ago
- Status changed from Needs Decision to Needs More Information
I can see why you’d want to add a priority for Execs, but can you explain the reasoning around Services more?
Is it just that you want to nice puppet, and want to be able to undo the nice level on whatever command gets executed in managing that service?
Why is this not true of Packages or any of the other resource types that use executable commands underneath?
Updated by Oliver Hookins 4 months ago
From what I can see, every process started by Puppet will inherit the niceness value Puppet had at the time. Since we want to run production services and have Puppet’s CPU intensive periods not affect those services too much we run Puppet niced to low priority. Unfortunately if Puppet is also responsible for starting some of those processes they end up being run with low priority as well.
The work around (which we have not yet implemented) would be to check for such processes and renice them after the Puppet run (or during the next one) but it should be possible to set a default niceness for all spawned processes that are part of an Exec or Service so that they aren’t limited to just what they inherit from Puppet.
Packages and other processes I suspect aren’t too much of a big deal since we don’t want them interfering with production services either.
Updated by Daniel Pittman 4 months ago
- Status changed from Needs More Information to Accepted
- Assignee deleted (
Nigel Kersten)