Tags : :
After lots of experimentation and a script from Chris Clepper, I have a solution to fixing the real culprit that causes many or most of the CPU error codes in Pro Tools and many other time sensitive apps in Mac systems.
The search application Spotlight is prioritized too high in the system and when it does a search, it hogs the CPU, which is disastrous to a contiguous type app like a DAW. It does it's search at least once a minute so it's like playing Russian Roulette once a minute while recording. This forces users to increase RAM by upping their latency settings to keep from crashing, when the DAW is barely using the system.
The answer is to turn off Spotlight after starting up these types of apps. We turn Spotlight off after instantiating the DAW, because we need to establish the file hierarchy in the DAW and not lose our files when we boot the app later. This fix is easy and will help you reduce your latency to the absolute minimum on your system. I run 32 samples on an 8 core Mac Pro with 30 channels in record regularly with no CPU errors. That same system was only reliable at 256 samples with Spotlight running.
When you turn Spotlight off, it stays off even after shutting down and rebooting. So you will need to turn it back on to do a system scan and search when not using the DAW. This is no biggie after you get used to the procedure.
I suggest dragging the Terminal icon into the Dock so that you can quickly do this procedure. I also keep a page with the turn off and turn on scripts in Notes, so that I can quickly access them from the Doc.
To turn off Spotlight after starting up the DAW.
After starting up the DAW, open Terminal. Copy and paste the line below and press Enter.
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
After you press Enter, the system will ask for a Password. When you type in your password, it will appear that nothing is happening in Terminal. That is not true. Just carefully type your password and press Enter. If your password was correct the next line will be:
Name of your computer:~your name$
Spotlight will now be off.
To restart Spotlight after your session is over, open Terminal. Copy and paste the line below and press Enter.
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
And again enter your Password.
I also suggest placing a copy of the Activity Monitor in the Doc and taking a peek at %CPU before and after turning off Spotlight. With Spotlight on you will see two processes, mds and mdworker, regularly going to the top of the %CPU list. This is when we get CPU errors in PT. Turn off Spotlight and mds and mdworker stop running and stop slamming the CPU.
It is really that simple. Once you have turned off Spotlight, go to PT and set your latency to 32 samples to start, and run a test. I am confident you will find much better performance and stability. You may also want to change your Host Processors. My system runs best with only 2 out of 8 processors and 80% CPU usage. I have also set Host Engine to ignore errors and minimize additional latency but have never heard a click or pop with Spotlight turned off.