So in my current app setting a certain process running inside a container runs another process. I need to set the nice value of the new process to be higher.
When ran on the OS I could just do
nice -n19 second_task
. How does this work in the context of the docker container?
It works exactly the same way. When you're inside docker OS, you can just
nice -n19 second_task
.Exactly the same restrictions apply as outside docker OS, so
nice
executable has to exists inside docker OS to be run, the same way thenice
executable has to exist for you to runnice
on your host OS. And user has to have appropriate limits (seeman limits.conf
) or be root.