An AppleScript that may give OS X a speed boost

Apr 01, '03 09:47:00AM

Contributed by: Anonymous

My name is Carl Bond. I've made a script (really, it's just a quick hack) to speed up Mac OS X. I hope you like it. Be sure you know what you are doing when you edit and execute this script.

For more information, see my page.

tell application "Terminal"
  do shell script "sudo renice -3 -u YOURUSERHERE" password "YOURPASSWORDHERE" ¬
    with administrator privileges
  do shell script "sudo renice +9 -u www"
  do shell script "sudo renice +9 -u root"
  
  set finderPID to do shell script "ps -axww | grep '[/]Finder'| awk '{print $1}'"
  do shell script "sudo renice -15 -p " & finderPID
  
  set dockPID to do shell script "ps -axww | grep '[/]Dock'| awk '{print $1}'"
  do shell script "sudo renice -15 -p " & dockPID
  
  set winmanPID to do shell script "ps -axww | grep '[/]Window Manager'| awk '{print $1}'"
  do shell script "sudo renice -15 -p " & winmanPID
  
  set apedPID to do shell script "ps -axww | grep '[/]aped'| awk '{print $1}'"
  do shell script "sudo renice +5 -p " & apedPID
  
  set atsPID to do shell script "ps -axww | grep '[/]ATSServer'| awk '{print $1}'"
  do shell script "sudo renice +5 -p " & atsPID
  
  set pbsPID to do shell script "ps -axww | grep '[/]pbs'| awk '{print $1}'"
  do shell script "sudo renice +5 -p " & pbsPID
  
  quit "terminal"
end tell
[robg adds: Obviously, replace YOURUSERHERE and YOURPASSWORDHERE with the correct information for your account. The referenced page explains what the script does in more detail, but it's basically giving more CPU time to the user's tasks and less to background tasks. I haven't tested the script, and make no claims as to how much this will or will not improve the perceived performance of OS X on your machine. If you do try it and do some numerical before-and-after comparisons, please post your results!]

Comments (16)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030329153000323