Activity Monitor %nice

Joined
Jul 23, 2004
Messages
3,169
Reaction score
164
Points
63
Location
North NJ
Your Mac's Specs
i dont have no mac's
can someone give me a better description of %nice which is found in activity monitor for my cpu usage. i was wondering what exactly it can do for me in terminal by using the 'man nice' command in terms of maximizing folding using inCrease.

could this give inCrease more priority in cpu time? or even other programs someone might be running like FCP or Adobe CS2 apps.?

this is what 'man nice' gives you in Terminal:
NICE(1) BSD General Commands Manual NICE(1)

NAME
nice -- execute a utility with an altered scheduling priority

SYNOPSIS
nice [-n increment] utility [argument ...]

DESCRIPTION
nice runs utility at an altered scheduling priority. If an increment is
given, it is used; otherwise an increment of 10 is assumed. The super-
user can run utilities with priorities higher than normal by using a neg-
ative increment. The priority can be adjusted over a range of -20 (the
highest) to 20 (the lowest).

Available options:

-n increment
A positive or negative decimal integer used to modify the system
scheduling priority of utility.

DIAGNOSTICS
The nice utility shall exit with one of the following values:
:

TIA
-chris
 
Joined
Aug 27, 2005
Messages
2,406
Reaction score
210
Points
63
Location
Fayetteville, AR
Your Mac's Specs
15" Powerbook G4 • 24" iMac • iPhone 3Gs
That's exactly what it's for.

If you were to be applying an effect in FCP and it was taking a long time, the CPU's priority is bouncing around running all of the other processes. Using the renice command you can get 100% of the processor's attention on FCP and the effect will be rendered a lot faster. This is the UNIX command that the program "Cunning Fox" takes advantage of.
 
OP
coach_z
Joined
Jul 23, 2004
Messages
3,169
Reaction score
164
Points
63
Location
North NJ
Your Mac's Specs
i dont have no mac's
interesting and awesome! thanks for the reply.

now for questions:
whow do you set this up?

if set on a high priority how effectively will the computer run other processes?for example i am running iTunes and safari while folding at a very high priority.

how do i revert back to normal priority?

anyway to damage or completely mess up the system?

-chris
 
Joined
Aug 27, 2005
Messages
2,406
Reaction score
210
Points
63
Location
Fayetteville, AR
Your Mac's Specs
15" Powerbook G4 • 24" iMac • iPhone 3Gs
I believe (and I'm really not positive) that the renice command will only keep user-specified priority as long as the shell that executed it stays open. i.e. Close Terminal and priority control is handed back over to the OS. If this is true, I don't see how it could cause any harm as you could simply close the shell and be done with it...

You should usually stay away from the "nice" command however, I neglected to mention that in my first post. It's not so much of an *action* as it is a *value* (like pid). You really are looking to use the "renice" command which has the ability (if you're logged in as super user) to lower the priority of other PIDs. (This is where the command name comes from, one process being "nice" to another and giving it it's resources ;) ) Priority is listed in numerical order from 0-39. The higher the number, the less CPU time it's getting...like golf. :) You're not so much raising one program's CPU time as much as lowering all of the other PIDs CPU time. Get it? So basically, if you were wanting more of your processor to be working on folding then you would type in Terminal:

top (to get the PID of the program you don't need running at full priority)

renice "type priority number here" "type PID here"

That would make that PID go down in priority to whatever nice # you put it at. Make sense? :)

It's a neat command once you get the hang of it...
 
OP
coach_z
Joined
Jul 23, 2004
Messages
3,169
Reaction score
164
Points
63
Location
North NJ
Your Mac's Specs
i dont have no mac's
surfwax95 said:
Make sense?

yes and no

what is PID?

do i type all of that stuff after I type 'man nice'?

i am not going to delve into all of this until i fully understand and do a bit more research
-chris
 
Joined
Aug 27, 2005
Messages
2,406
Reaction score
210
Points
63
Location
Fayetteville, AR
Your Mac's Specs
15" Powerbook G4 • 24" iMac • iPhone 3Gs
PID = Process Identification

man = See manual page for a given command.

You wouldn't type "man nice" if you were trying to run the command. That's just to view the help for the command.

...I don't blame you, you should research as much as possible before stepping into this stuff. :mac:
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top