LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-20-2010, 01:55 AM   #1
tincboy
Member
 
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.

thanks
 
Old 10-20-2010, 02:05 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
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, 02:06 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

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

Rep: Reputation: 147Reputation: 147
Hi,

Remember process with a lower nice numbers run faster
 
  


Reply


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 01:37 PM
Converting Photo Negative to Positive measekite Linux - Software 2 03-23-2009 11:57 AM
Renice a process yenonn Linux - General 2 10-03-2005 08:59 PM
printing negative value as positive hubabuba Programming 5 05-03-2005 01:41 PM
Nice and Renice KnightAzul Linux - General 1 09-17-2003 12:59 PM


All times are GMT -5. The time now is 06:32 AM.

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