Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-20-2010, 12:55 AM   #1
Registered: Apr 2010
Posts: 36

Rep: Reputation: 0
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.

Old 10-20-2010, 01:05 AM   #2
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Stretch (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Smaller values will mean that the process gets more favorable scheduling, so '-5' is likely to increase the CPU allocation to that process.
Old 10-20-2010, 01:06 AM   #3
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392

As stated in the man page:

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.
Old 10-20-2010, 01:09 AM   #4
Senior Member
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,145
Blog Entries: 4

Rep: Reputation: 147Reputation: 147

Remember process with a lower nice numbers run faster


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please list all the positive and negative things about GNOME and KDE ayush.27 Linux - General 9 09-09-2010 12:37 PM
Converting Photo Negative to Positive measekite Linux - Software 2 03-23-2009 10:57 AM
Renice a process yenonn Linux - General 2 10-03-2005 07:59 PM
printing negative value as positive hubabuba Programming 5 05-03-2005 12:41 PM
Nice and Renice KnightAzul Linux - General 1 09-17-2003 11:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration