MacOS – /usr/bin/nice and Handbrake

cpumacosperformance

This is really two questions… If a process is run with nice (/usr/bin/nice in the default OS X Mountain Lion installation) will it run processes in equivalent time compared to that process being run without nice? Does the answer change if the system is heavily loaded vs. almost no other user processes?

What I am hoping is that I can keep Handbrake translating my large collection of videos to H.264/Universal preset for Apple TV, while incurring little to no performance penalty to my other tasks such as Xcode. So can Handbrake be started (can any GUI program be started) with nice?

If it matters (don't think it does) the machine is a MacBookPro6,1, 2.66GHz i7 with 8GB RAM. RAM is often fully used according to iStat Menus but that's the maximum for this machine.

Best Answer

Yes, you can run a GUI app with nice. For example, to run TextEdit with a niceness of 10:

nice /Applications/TextEdit.app/Contents/MacOS/TextEdit

It really depends on whether handbrake is using more CPU or more RAM. Xcode is a RAM hog, and nice won't help there, but if it's CPU, you're good.