Note: You are currently viewing my old web site. There is a new version with most of this content at OJB.NZ.
The new site is being updated, uses modern techniques, has higher quality media, and has a mobile-friendly version.
This old site will stay on-line for a while, but maybe not indefinitely. Please update your bookmarks. Thanks.


[Index] [Menu] [Up] Title[Header]
Tips

(Up to OJB's Mac Tips List Page)


Terminal: Change Priority

Some processes (or programs) might need to run for long periods on your machine while you are doing other work without making other programs slow. For example you might be running a distributed network data processing program like SETI@Home. Alternatively, there may be programs which need more of a share of the CPU to make sure they don't "skip", for example CD writing software like Toast or music software like Music or iTunes. Changing the process priority can help with this.

First you need to find out the process ID. To do this use the "ps" or "top" command. See other tips here for information about these. Use "ps -axc" and find the process ID of the required process (its the number in the first column). Now use the "renice" command to change the process priority, type "renice p x" where p is the new priority and x is the number of the process to change.

The priority can be a number between -20 and +20 where -20 is the highest (it goes faster) and +20 is lowest (only runs if other programs don't need to). Standard users can only make programs run slower but you can use "sudo" to give you privileges to make things faster. For example "sudo renice -10 665" will change the privileges of process 665 to -10 (assuming it started at the default, 0, it will go faster). To check the current nice values of running processes use the "ps -axcl" command. The column titled "NICE" (or just "NI" is there is less space available) shows the nice value.

Update: Modern systems with multiple fast cores are unlikely to be affected significantly by one or more processes using too much CPU time. If a process is dong this it might not be running correctly so don't just try to hide the problem using nice, which probably won't help much in that situation anyway!


[Up]

[Contact][Server Blog][AntiMS Apple][Served on Mac]