Site Information

Optimizing OS X Mountain Lion

Posted by Benjamin Zwickel on

Mountain Lion Big


Introduction:

So you have an Apple computer running OS X Mountain Lion that you want to use as a media server, and you want to get the best possible audio and video performance. I’ve got you covered. I’ll walk you through exactly what you need to do to disable memory resident programs that automatically load by default when OS X boots up. I’ll also show you how to turn off unused wireless control interfaces, such as infrared, WiFi, and Bluetooth.

How do these optimizations improve media performance?

When you disable unnecessary default resident programs and reallocate system resources, your computer does less switching, swapping, interrupting, and error correcting. Unused wireless control interfaces unnecessarily use system resources and corrupt data by radiating unwanted EMI "noise" requiring more switching, swapping, interrupting, and error correcting. Doing these optimizations translates into less bit read errors and more system resources which results in more fluid and coherent audio and video performance.

Most of these optimizations will work on any version of OS X from Snow Leopard to Yosemite. If you are using Yosemite go to our new optimizations guide.

Mojo Audio has been doing similar optimizations to our media servers for years. We discovered some of these optimizations, some were given to us by customers, we found some on computer audio forums, and we read about some in publications. We’d like to thank our many contributors who continue to share with us, making this one of the most comprehensive OS X optimization guides available.

Warning: I recommend that before making changes or doing updates of any kind to your Mac that you back up your existing system. I recommend using "cloning" software, such as Carbon Copy Cloner since it creates a bootable backup.

It’s a perfect use of your time . . . you can clone your boot drive while you review the rest of this guide.


Close all Applications

You backed up your Mac, right?

Before applying these optimizations, make certain the only application running is "Finder."

Go to the "Force Quit" window to view all applications that are running.

Apple Icon > Force Quit

Click on and highlight an application. Press the "Force Quit" button in the lower right corner. Repeat until the only application shown is "Finder." Click on the red X in the upper left corner to close "Force Quit."


Optimize in System Preferences

The System Preferences application can be found by clicking on the Apple icon in the upper left corner of the screen and then sliding down the drop-down menu to select it.

Apple Icon > System Preferences

The System Preferences application can also be opened by selecting it in the icon dock that runs along the bottom of your screen (the icon is rectangular frame with gears inside).

When you open the System Preferences window you’ll see that the icons are categorized in rows. On older versions of OS X the rows are labeled on the left hand side: Personal, Hardware, Internet & Wireless, System, and Other. For some reason they took the row labels out in Yosemite but left just about everything else the same.

For each optimization done in System Preferences I’ll identify the row to help you locate the icon.


Remove unused languages

In the System Preferences control window, go to the Personal row and select Language & Text. The Language & Text control window will open, and the following categories will be listed at the top of the window: Language, Text, Formats, and Input Source. Select the Language tab so that it is highlighted. You’ll see all the languages in the main window. Click on the Edit List button in the lower left corner.

A window with a checklist of all available languages will open. Deselect any languages you don’t want to use by clicking on the check box and removing the check mark next to the language.

Optimally, you should have only one language selected. Click OK and the checklist window will disappear, revealing the Language & Text control window. The only language(s) you should now see in the window are the one(s) you selected

Should you require additional or different languages, you can go back into the Edit List window and select and/or deselect languages at any time by following the directions above and adding or removing a check in the box next to the language.

Click on the Show All button in the upper left corner of the Languages & Text control window to return to the System Preferences control window.


Turn on/off wireless control interfaces

Downloadable Quick-Reference Guide pdf downlowd

Turning off unused wireless control interfaces, such as Wi-Fi, Bluetooth, and Infrared, improves computer-based media server performance by freeing up system resources and reducing data corruption caused by EMI "noise" on your Mac’s sensitive internal circuitry.

Warning! Turning off wireless control interfaces can disable manual control devices, such as your Apple Bluetooth keyboard and mouse. I strongly recommend having a simple USB keyboard and mouse for troubleshooting your wireless control interfaces.

For highest performance use no wireless control interfaces.

  • Operate your Mac “headless” through an Ethernet cable connected to a wireless local area network (LAN) controlled wirelessly with an iOS device, mobile device, or laptop computer.
  • Operate your Mac laptop manually with the integrated monitor, keyboard, and mouse. Connect to the internet via Ethernet cable on a local area network.
  • Control your Mac with a simple USB manual control device viewing on a computer monitor or HDTV. Connect to the internet via Ethernet cable on a local area network.

The second-best option is to use only one wireless control interface.

Let’s start by looking at what works with what so you’ll have a better idea of which wireless control interfaces you’ll want to turn off. You may come to realize that if you’re willing to change one or more of your manual control devices, you may be able to improve performance by turning off all but one of the wireless control interfaces you are currently using.

Below are some manual control devices and their commonly associated wireless control interfaces:

  • Most keyboards and mice = USB (wired or wireless)
  • Apple keyboard and mouse = Bluetooth
  • Apple and many aftermarket remote controls = Infrared
  • iOS devices and mobile devices with a remote control app = Bluetooth
  • iOS and mobile devices or computers with a remote desktop app = WiFi

The above list may differ from brand to brand or app to app and may even change over time. I recommend turning on/off wireless control interfaces one at a time and testing each of your manual control devices to confirm which manual control device works with which wireless control interface.

Note: Wireless USB control devices have relatively low noise because they have external receivers and limited data transfer. They cause less EMI noise and are better shielded from the Mac’s internal circuitry.

Quick-Reference Commands: Turning on/off the infrared control interface

System Preferences > Security & Privacy

Unlock the window and press the Advanced button.

Off: Check the box for Disable remote control infrared receiver.

On: Uncheck the box for Disable remote control infrared receiver.

Step-by-step: Turning on/off the infrared control interface

In the System Preferences control window, go to the Personal row and click on Security & Privacy. The Security & Privacy control window will open. You’ll see a Lock icon in the lower left corner.

System Preferences

If the Lock icon is in the locked position, you must unlock it. To unlock the window, click on the Lock icon; you’ll be prompted to enter your administrative password. If you need to lock or unlock other windows in OS X, you can follow this same procedure wherever you see the Lock icon.

Note: The administrative password for any Mojo Audio optimized OS X drive clone is always “Mojo.”

 Security & Privacy Sceen

Once the Lock icon is in the unlocked position, click on the Advanced button in the lower right corner. A list of options will appear.

A list of options will appear

Check the box for Disable remote control infrared receiver.

Disable remote control infrared receiver

Click on the OK button to close the Advanced controls and return to the main Security & Privacy window.

To re-enable the infrared remote receiver: Go back into the Advanced controls for Security & Privacy and uncheck the box for Disable remote control infrared receiver.

To return to the System Preferences control window, click on the Show All button in the upper left corner of the Security & Privacy control window.

Quick-Reference Commands: Turning on/off the WiFi control interface:

System Preferences > Network

Click on the Wi-Fi in the left column.

Off: Click on the Turn Wi-Fi Off button.

On: Click on the Turn Wi-Fi On button.

Step-by-step, Turning on/off the infrared control interface:

In the System Preferences control window, go to the Internet & Wireless row and click on Network. The Network control window will open.

Network Control Window

You’ll see a column on the left side. Click on Wi-Fi in the left column, the right side of the screen will change to display the Wi-Fi status. Press the button marked Turn Wi-Fi Off in the upper left corner.

click on Wi-Fi

To re-enable Wi-Fi: Go back into the Wi-Fi status window, and click on the button marked Turn Wi-Fi On in the upper left corner.

To return to the System Preferences control window, click on the Show All button in the upper left corner of the Security & Privacy control window.

Quick-Reference Commands: Turning on/off the Bluetooth control interface

System Preferences > Bluetooth

Off: Uncheck the On box.

On: Check the On box.

Step-by-step:Turning on/off the Bluetooth control interface

In the System Preferences control window, go to the Internet & Wireless row and click on Bluetooth. The Bluetooth control window will open.

Bluetooth Screen

You’ll see a check box marked On in the upper left corner. Uncheck the On box.

Bluetooth Screen

To re-enable Bluetooth: Go back into the Bluetooth window, and put a check in the On box.

To return to the System Preferences control window, click on the Show All button in the upper left corner of the Security & Privacy control window.


Remove the presentation order for Spotlight

In the System Preferences control window, go to the Personal row and click on Spotlight. The Spotlight control window will open, and the following categories will be listed at the top of the window: Search Results and Privacy. Select the Search Results tab so that it is highlighted. You’ll see a list of your applications with check boxes next to them.

Uncheck all the boxes.

Click on the Show All button in the upper left corner of the Spotlight control window to return to the System Preferences control window.


Disable Login Items

There must be at least one application that automatically opens when you login to your computer. Ideally you would want your player software to be the only application that automatically opens. If your player software is not already set to automatically open when you login to your computer you must manually change this before disabling other login items.

To make your player software open at login you must go to the Applications window and open the player software so that its icon appears in the bottom dock. By doing a secondary click with your mouse pointer on top of the player icon, you’ll make a pop-up menu appear. Slide up the pop-up menu to the Options row, then slide to the right so that the next level pop-up menu appears. Slide up to the Keep in Dock row and put a check mark beside it.

Repeat this process and go to the Open at Login row and put a check mark beside it. Your player software will now open on login and its icon will appear in the bottom dock even when the application is closed.

To remove applications from opening at login open the System Preferences control window, go to the System row, and select Users & Groups. The Users & Groups control window will open, and the following categories will be listed at the top of the window: Password and Login Items.

Select the Login Items tab. You’ll see a list of applications that automatically launch when your computer is booted up. You’ll notice a “+” and “-” button in the darker gray area below the program list.

Highlight iTunes Helper and click on the “-” button to remove it. Select any other applications that you don’t want to open at login and click the “-” button to remove them.

Repeat the above process for removing applications that boot up at login. The only application that should be on this list is your player software.

Click on the Show All button in the upper left corner of the Users & Groups control window to return to the System Preferences control window.


Disable the Automatic Software Update

In the System Preferences control panel, go to the System row and select Software Update. The Software Update control window will open, and the following categories will be listed at the top of the window: Scheduled Check and Installed Software. Select the Scheduled Check tab.

You’ll notice check boxes for “Check for updates” and “Download updates automatically” at the bottom of the window. Uncheck both of the boxes to disable these automatic features.

Important: After you’ve done this, you’ll need to check for software updates manually from now on. One place you can do this is in the Software Update control window. Another place you can manually check for software updates is in the drop-down menu below the Apple icon located in the upper left corner of the screen. Select the Apple icon, slide down to the Software Update row and select. Follow the updating instructions from Apple.

Click on the Show All button in the upper left corner of the Software Update control window to return to the System Preferences control window.


Disable the Time Machine automatic backup

In the System Preferences control window, go to the System row and select Time Machine. The Time Machine control window will open. On the left side of the window, you’ll see a slide selector that has “off” at one end and “on” at the other.

Make sure the selector is switched to the “off” position.

Click on the Show All button in the upper left corner of the Time Machine control window to return to the System Preferences control window.

Quit the System Preferences application.

Warning! Because your hard drive will inevitably fail, we highly recommend you manually back up your media server. We recommend cloning your hard drive over other back up methods because it will not only back up your data, but it will also back up your personal settings and all of these optimizations. This will save you a significant amount of time when you have to reinstall your hard drive.


Optimize using the Disk Utility

By default, the Disk Utility application automatically journals changes made to the storage disks to aid in the recovery of crashed drives. As long as you have a back up of your drive, you can improve audio and video performance by disabling this automatic feature.

To launch the Disk Utility application, go into the Utilities folder inside the Applications folder and select the Disk Utilities icon.

Applications>Utilities>Disk Utility

The Disk Utility control window will open, revealing a window that lists all the drives currently connected to your computer.

To disable the automatic journaling feature, individually select and highlight each drive on the list and do the following: Hold down the Option button on your keyboard and click on the File drop-down menu located in the upper right corner of the screen. Slide down the File drop-down menu and select Disable Journaling. If you don’t hold the Option button down while selecting the File drop-down menu, Disable Journaling will not be a selectable option.

Repeat this for all drives that work with your media server.

If you wish to enable the automatic journaling feature for a storage drive, simply repeat the above process and select Enable Journaling in the same row where Disable Journaling was previously located.

A manual feature of Disk Utility that can improve performance is Repair Disk Permissions. Once all software is installed in your computer, you should run this utility. It should also be run periodically to repair disk permissions as software in your computer is updated. To run the utility, individually select and highlight each drive, then click on the Repair Disk Permissions button located near the bottom center of the window.

Allow the automated utility to run until it says “Permissions repair complete” at the bottom of the details window, just above the Repair Disk Permissions button.

Repeat this utility for all drives that work with your media server.


Deactivate processes using Terminal

Final Warning! Incorrectly entering code in the Terminal interface can permanently disable your computer and could require formatting and reinstalling your entire hard drive. We strongly recommend that optimizations done through the Terminal application are only done by people who are qualified. We also strongly recommend you clone your hard drive using drive copy software like Carbon Copy Cloner prior to doing any of these optimizations so that you can quickly and easily reinstall your hard drive should a critical error occur.

It may save you time and trouble if you were to do a new drive clone after you have completed and tested the above non-Terminal application related optimizations. After doing the System Preferences and Disk Utility optimizations above you need to reboot your computer and make certain all media server features are working correctly. Now is a good time to again clone your hard drive. If a critical error occurs and you have to reinstall your hard drive you will be brought back to the place where you have all the above optimizations already completed and are ready for the Terminal optimizations below.

Consider yourself warned.

The Terminal application is a text-driven command-line interface that allows you to communicate directly with the Unix-based operating system at the core of OS X. Unix is the lowest possible level of human interface above machine language, giving the most streamlined and direct control over the operating system. We’ll use Terminal to remove applications and programs that are normally set running by default when you boot up the OS X Mountain Lion operating system.

To launch the Terminal application, go into the Utilities folder inside the Applications folder and click on the Terminal icon.

The Terminal interface will appear. Now we are ready to enter commands into the terminal interface to remove default resident programs.

To remove Mission Control as a resident program, type the following lines into the Terminal interface one at a time, then hit the Enter key:

defaults write com.apple.dock mcx-expose-disabled -bool TRUE [Enter]

killall Dock [Enter]

Now you need to quit the Finder application to make sure the disabling has been done correctly. Open your player software and quit the Terminal and Finder applications. Unlike most applications, which you can quit from the bottom dock or Force Quit window, to quit the Finder application, you’ll need to click on the Finder icon in the dock so that the Finder drop-down menu appears along the top of the screen. Select the Finder column in the top drop-down menu next to the Apple icon in the upper left corner of the screen. Slide down to the bottom Quit Finder row and select. You’ll know you’ve done this correctly if the spotlight under the Finder icon in the bottom dock is gone.

Important! To maintain optimal media playback performance, each time you reboot your computer, and each time you use Finder, you will need to follow the above instructions and quit the Finder application.

To remove Dashboard as a resident program type the following lines into the Terminal interface hitting the Enter key after each one:

defaults write com.apple.dashboard mcx-disabled -boolean YES [Enter]

killall Dock [Enter]

To remove Spotlight as a resident program type the following line into the Terminal interface then hit the Enter key:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist [Enter]

In order for the following command to take effect you’ll be required to enter your administrative password and then hit the Enter key.

To remove Automatic Termination as a resident program type the following line into the Terminal interface then hit the Enter key:

defaults write -g NSDisableAutomaticTermination -bool TRUE [Enter]

To remove the Finder application as a resident program type the following lines into the Terminal interface hitting the Enter key after each one:

defaults write com.apple.finder QuitMenuItem 1 [Enter]

killall Finder [Enter]

Quit the Terminal Application once you have made these changes.


Reactivate processes using Terminal

If you want to reactivate any of the resident programs we deactivated, launch the Terminal application and type in the following codes.

Applications>Utilities>Terminal

To reactivate Dashboard as a resident program type the following lines into the Terminal interface hitting the Enter key after each one:

defaults write com.apple.dashboard mcx-disabled -boolean NO [Enter]

killall Dock [Enter]

To reactivate Mission Control as resident program type the following lines into the Terminal interface hitting the Enter key after each one:

defaults write com.apple.dock mcx-expose-disabled -bool FALSE [Enter}

killall Dock [Enter]

To reactivate Spotlight as a resident program type the following lines into the Terminal interface then hit the Enter key:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist [Enter]

In order for the following command to take effect you will be required to enter your administrative password and then hit the Enter key.

To reactivate Automatic Termination as resident program type the following line into the Terminal interface then hit the Enter key:

defaults write -g NSDisableAutomaticTermination -bool FALSE [Enter]

To reactivate Finder as a resident program type the following lines into the Terminal interface hitting the Enter key after each one:

defaults write com.apple.finder QuiteMenuItem 0 [Enter]

killall Finder [Enter]

Quit the Terminal Application once you have made these changes.

Perform periodic maintenance

To maintain the highest level of performance, you must do a few tasks periodically to assure that the only software resident in your media server is your player software:

  • Manually turn off the Finder application every time you reboot.
  • Manually close applications other than your player software.
  • Repair disk permissions every time you update or install software.
  • Manually update your software frequently.
  • Clone or back up your hard drive frequently.

If you like what you read in this blog and are interested in getting more free tips and tricks, sign up for Mojo Audio’s Audiofiles blog. Also, sign up for our e-newsletter to get more useful info as well as coupons, special offers, and first looks at new products. Plus, don’t forget to “like us” on Facebook.

Enjoy!

Benjamin Zwickel