I know that non-root users can renice a process up, but not renice a process priority down.

$ nice yes >/dev/null & p=$!
$ renice 15 -p $p 
8414: old priority 10, new priority 15
$ renice 12 -p $p
renice: 8414: setpriority: Permission denied
$ kill $p

I understand that as a non-root user I should not have the ability to (re)nice a process into negative nice territory, or that root may have started a process on my behalf at a higher nice level.

The question is for what logical reason can a non-root user not renice their own processed downward, even if just no further down to the original priority in which it was instatiated?


If root users are able to reprioritize another user's process because it's using too much resources, a user should not be able to circumvent that and change it back.

  • Should we not consider nice values [-20,-1] to be system priorities vs. the user 'space' [0,19] I get what you're saying but I'm of the recent persuasion that user processes should be able to re-prioritize themselves or their children...at least from a base priority set by root? – Jé Queue Dec 28 '09 at 17:07
  • Yes but the root user may realize the base priority was too high and reprioritize all of a certain users processes ( renice -u user... ). I've seen my school's sysadmin do something similar to our processes when he was running batch jobs so it would finish faster. – John T Dec 28 '09 at 17:38

renice modifies program niceness - higher number means lower priority.

I guess the reason is that the starting niceness isn't probably not remembered - only the current niceness value. So there's no good way of determining if a user can renice a program to higher priority. (This is a guess... Maybe someone can verify it? )


Because then programs would have an incentive to prioritize themselves at the expense of the entire system.

  • Not necessarily. For instance, user renice could not drop below 0. – Jé Queue Dec 28 '09 at 17:02
  • ...which would still give the process a higher priority than all those other processes running at 20. – njd Feb 9 '10 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.