Site TIPS PAGE🔎   UP ONE LEVEL
 OJB's Web Site. V 2.1.tip tips mac owen2 
Tip

Up to OJB's Mac Tips List

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!



My latest blog post: Learning from Failure: I think there is a place for parties with views I find insane. (posted 2024-11-28). My latest podcast: OJB's Podcast 2024-08-22 Stirring Up Trouble.
 ©2024 by OJBServerMacs are BestMac Made
T: 10. H: 174,254,558
Features: RSS Feeds Feedback LogMod: 07 Jun 2024