LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   renice (positive or negative) (https://www.linuxquestions.org/questions/linux-newbie-8/renice-positive-or-negative-839192/)

tincboy 10-20-2010 12:55 AM

renice (positive or negative)
 
I'm using this command to lower a process CPU usage:
renice -5 pid
But today I doubt if it decrease the CPU usage or increase it.
Please explain a little more about it.

thanks

neonsignal 10-20-2010 01:05 AM

Smaller values will mean that the process gets more favorable scheduling, so '-5' is likely to increase the CPU allocation to that process.

druuna 10-20-2010 01:06 AM

Hi,

As stated in the man page:

Quote:

Users other than the super-user may only alter the priority of processes
they own, and can only monotonically increase their ``nice value'' within
the range 0 to PRIO_MAX (20). (This prevents overriding administrative
fiats.) The super-user may alter the priority of any process and set the
priority to any value in the range PRIO_MIN (-20) to PRIO_MAX. Useful
priorities are: 20 (the affected processes will run only when nothing
else in the system wants to), 0 (the ``base'' scheduling priority), any-
thing negative (to make things go very fast)
.
In short + (plus) -> process runs slower and - (minus) -> process runs faster

Hope this helps.

prayag_pjs 10-20-2010 01:09 AM

Hi,

Remember process with a lower nice numbers run faster


All times are GMT -5. The time now is 10:03 AM.