Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a background process running at 100% CPU on Mac OS X. All other applications are very slow because of it.

I'd like to set this process to take no more than 50% so that my applications can run better. How can I do this?

share|improve this question
up vote 25 down vote accepted

From the command line ( or whatever) use nice and renice, just like on other unixes.

Use nice when launching a process:

nice -n <priority> <command> <arguments to command>

The default priority is zero, positive values are "nicer" (that is lower priority) and negative values are "less nice" (higher priority). Looks like Mac OS runs from +10 to -10.

Use renice to change the priority of a process already running (from the renice man page on 10.5):

renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]  
renice -n increment [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]

The part you're interested in here is the pid bit. That is the process id for the job and you can find it using ps -u <your username> and looking for the process name, but I prefer top -o in this case, because the process you're interested in will be near the top.

Note: Without superuser privileges you can never increase a process's priority. For normal users, nice and renice are one way streets. And small changes in priority can have large effects on running time. So go easy on this until you understand it.

share|improve this answer
And how can I do with an already running process? It's running for 2 hours and I don't want to start it again and loose my 2 hours of processing – Daniel Cukier Sep 17 '09 at 18:21

You can use the command:

renice -n # PID


  • # is a number that should be larger than 0 (otherwise you will move your process to higher priority)
  • PID is the process ID you can view by typing top on the terminal app (utilities/

If it is a system process or another user process you should type:

sudo renice -n 10 PID

It will ask you for your password (if you are sudoer). As for the number I would recommend 10 or 19 (even lower priority).

Note that this will change the priority not the CPU usage. If you aren't running other processes which require CPU or you have more than one CPU on your Mac (Core 2 Quad Core) the process might still use 100% of CPU.

share|improve this answer

There are also a number of GUI utilities, like the free BeNicer and Process Wizard (my previous favorite), and the $1.99 version of Freezer, which is my new favorite. These all work on running applications.

share|improve this answer
BeNicer and Process Wizard are both PowerPC apps and won't run on recent versions of OSX – arolson101 Dec 9 '12 at 1:10
renice 20 $(pgrep ImageOptim)

Or use the name of your program instead of ImageOptim

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .