Benches macOS

9

How to change process priority

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

How can I change the cpu priority of a process?

I could not find a way to do this using the Activity Monitor. How about a command using the terminal app?

When I am using Handbrake, I would like to lower its process priority to compute in the background.

Thank you in advance.

9 replies

Sign in or join Beachball Help to reply.

  1. 0

    carillonator

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    you have to refer to the process by its ID. Go to the Activity Monitor (Apps>Utilities) and find handbrake and its ID. Use renice to re-prioritize an already-running process--nice is to start the process from the terminal.

    To set it to its lowest priority:

    sudo renice 20 2933

    where 2933 is the process' ID (change it to yours). 0 priority is default, -20 is highest.

  2. 0

    BDAqua

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Jeff,

    Just do a...

    man nice

    in Terminal, and note how it's backwards... minus is faster, plus is slower. 🙂

  3. 0

    JeffCMKRNL

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    That looks like what I am looking for.

    I tried it but I could not get it to work. I think it is because of the "utility" argument. At first I used the path to the handbrake application. This is what I tried and the error I received:

    Arakis:~ jeff$ nice 10 /Applications/HandBrake/HandBrake.app

    nice: 10: No such file or directory

    What is meant by the "utility" argument?

  4. 0

    BDAqua

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Just type that nice 10 with a space after it, then drag handbrake from a finder window to the Terminal window... see if that works better.

  5. 0

    carillonator

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    you have to refer to the process by its ID. Go to the Activity Monitor (Apps>Utilities) and find handbrake and its ID. Use renice to re-prioritize an already-running process--nice is to start the process from the terminal.

    To set it to its lowest priority:

    sudo renice 20 2933

    where 2933 is the process' ID (change it to yours). 0 priority is default, -20 is highest.

  6. 0

    Chris CA

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    This -> Renicer seems to work okay. I haven't had any problems with 10.4.11.

  7. 0

    JeffCMKRNL

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    That is exactly how I did it. I did have a space after the 10, and I dragged the application to the terminal window, and it responded with the "Not found" error message.

    I will try the renice when I get home tonight. At work I am using Windows 2000 and Lotus notes (AAAArrrrgh!). I also support 4 PDP-11s and 6 antique VAX systems and an old Stratus.

    I have renamed the title of my position to "Paleocybernetic Systems Administrator".

  8. 0

    polyglotinc

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I tried this and it did not complain with an error message but I see no evidence via Activity Monitor that it did anything!

    I am still seeing 0% Nice CPU in the CPU tab of Activity Monitor

    and Handbrake is still using 150% of CPU (I guess this is possible because of dual core CPU).

    How do we know that the renice did anything?

  9. 0

    JeffCMKRNL

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Well, I think it worked, but I'm not seeing the processing being registered as "nice" cpu usage, so I am not sure.

    I could not find a way in the activity monitor to display process priority. Is there a way to view the current priority either in Activity Monitor, or in Terminal?

    Jeff