Open nilstoedtmann opened 8 years ago
In the recent version 3.3.1 of supervisord on Ubuntu 14.04 prefixing my program with nice didn't work ??
This would be a really valuable feature, and supervisord is the right place to do it.
In the recent version 3.3.1 of supervisord on Ubuntu 14.04 prefixing my program with nice didn't work ??
Same for me with supervisord 4.2.0.
It definitely works to do that; we do it in Zulip. Maybe you didn't supervisorctl reread; supervisorctl update
before restarting your service? It's an easy mistake to make.
I'd still really love to have this be a native feature of supervisord
; it seems like the kind of thing that'd be simple to implement and be a big convenience win.
Would the maintainers accept a patch to add it?
I need this too 😁
:wave:
Yes, that would be nice)
Although it's possible to run a command with a higher priority by prefixing it with nice -n -5
.
It's funny that nice -5
doesn't work, making niceness +5.
Is there a reason for this not being implemented for eight years?
I'd like to have an optional setting
nice=
in the[program:x]
section that would start a program with a certain niceness value. It would be an integer between -20 (high CPU priority) and 19 (low CPU prio), default being 0.It is already simple to de-prioritise supervised processes, just prefix the command with
nice -n $NICENESS
with positive value. But giving a non-root program a higher CPU priority (aka assigning a negative niceness value) currently requires a nasty sudo command that renders several other supervisor settings (e.g. user, environment) useless.Google for more info about niceness and CPU priority.