Mac Performance Guide
Published July 14th, 2012 at 4:38 PM EDT , modified December 29th, 2013 at 6:42 AM EST
Although they don’t need regular maintenance to keep them performing at their best, Macs, like any computer, can sometimes suffer from a variety of performance issues. When you start to see the spinning “beach ball” cursor and general slowness, there is something wrong somewhere. The question is, where? The goal of this guide is to help you find the source of the problem and fix it.
One thing that is important to understand is that performance problems may be completely normal for what you are trying to do. For example, if problems occur immediately after upgrading to a new system on an old machine (eg, Mac OS X 10.6.x to 10.7.x), there may be nothing wrong. Your hardware may simply be inadequate for the demands being placed upon it. Similarly, if you’re having performance problems with a specific app, especially a game, you simply may be asking too much of aging or inadequate hardware.
In addition, there are a number of myths circulating about important maintenance steps that are needed to keep a Mac running fast. Some of these myths are outlined in The myth of the dirty Mac.
All that said, let’s start looking at possible reasons for performance problems.
- Back up!
- Free hard drive space
- Repair the hard drive
- Check the RAM
- Check for CPU hogs
- Check the hardware
- Check third-party software
- Clear caches
The very first thing you need to do, before doing any troubleshooting, is back up your computer immediately! The reason for this is that performance problems can sometimes be caused by serious hard drive corruption, or even a dying hard drive. This means that the process of troubleshooting could very well be fatal to your data. (In fact, by the time you’re reading this, it could potentially already be too late, if you don’t already have backups!)
So, before doing anything else, make a couple good backups. If you already back up your computer regularly, just be sure your backups are up-to-date. If you only have one backup, buy yourself an external hard drive at least as large as the drive you need to back up and create a second “clone-style” backup, using Carbon Copy Cloner or SuperDuper!. If you have none, get one drive for a clone backup as well as another drive that is a minimum of three times the size of the total used space on the drive you want to back up and use the Time Machine feature of Mac OS X to back up to that drive.
Free hard drive space
In Mac OS X, keeping some hard drive space free is a requirement. The system needs free space for writing virtual memory swap files, log files, Time Machine’s local snapshots, Versions data and many other things. Without adequate free space on the drive the system is installed on (the “boot drive”), the system can become slow or even start crashing, ultimately leading to data loss in the worst case scenario.
The question is, how much free space is enough? This has been a question of some debate among experts, but in the end, that debate is fairly academic. If you have slightly more free space than needs to be free, that’s not going to hurt you. A reasonable rule of thumb is that about 10% of your hard drive’s total capacity should be free. In other words, if the boot drive is 500 GB, you need to keep approximately 50 GB free. If your hard drive is below that 10%, you need to delete some files until you have 10% free. If you don’t know how to tell how much free space there is, choose Computer from the Go menu in the Finder, select your hard drive and choose File -> Get Info. Compare the Capacity and Available numbers. If Available is more than 10% of Capacity, inadequate free space is not the cause of your problems.
What do you delete? That’s a good question, and there’s no easy answer. Some people will recommend using a variety of “cleaning” tools to remove logs, caches, etc. It’s important to understand that this is not a good plan, though. The gains will be small and temporary. Similarly, some will recommend doing things like deleting preinstalled apps, removing unused languages from apps, etc. Again, this will not be a significant gain, and worse, it can cause other problems down the road. It’s better not to do that kind of thing.
What you need to delete is your files – in other words, files that are in your user folder. Clean out your Downloads folder, for example, and make sure to empty the trash afterwards. Movies, photos and music are some of the largest files, so if you can remove some of those, that would be ideal. Note that you can move some of those files to an external hard drive or network storage rather than deleting them entirely. If you’re having trouble finding some of the largest files, get a copy of OmniDiskSweeper or GrandPerspective (both are free) to help you see where the largest files are.
Just follow one cardinal rule: if you don’t know what something is, don’t delete it! For more information on this topic, see Where did my Disk Space go?
If you just absolutely cannot delete enough files, and you also cannot move files to an external drive (for example, because you have a laptop and need those files to remain easily portable), then you could replace the internal hard drive with a larger one. Before embarking on such a procedure, you would need to make a good set of backups. Then, after installing the new drive (or having someone else install it), you can restore a backup to the new drive. (You can also put the old drive in an external enclosure and use it for other storage, including an additional backup.) Note that you will want to pay close attention to the speed of the new drive. If you replace a faster drive with a larger, but slower, drive, your performance will suffer for other reasons.
Repair the hard drive
Sometimes, the hard drive’s directory structures can become damaged. When this happens, many problems can result, including performance problems. Fortunately, ruling this out is very simple: just repair the hard drive with Disk Utility.
Unfortunately, sometimes hard drive problems can be more extensive. If your hard drive cannot be repaired, you will probably want to simply erase it and reinstall your system from scratch, or restore from a previous backup. If that fails, or if it succeeds but the hard drive problems come back very quickly, your hard drive may be failing and will need to be replaced.
If you don’t have backups and the drive can’t be repaired, you can try repairing it with DiskWarrior. However, if the drive is too badly corrupt or is failing, you may learn the hard way why backups are so important!
Check the RAM
Performance problems can be the result of inadequate RAM for the tasks being done. In addition, newer versions of the system or an individual app may require more RAM for the same tasks than older versions. For example, when I upgraded to Lion (Mac OS X 10.7) from Snow Leopard (Mac OS X 10.6), I saw a lot of spinning beach balls. Ultimately, I determined that the 4 GB of RAM that was more than adequate for my needs in Snow Leopard wasn’t quite cutting it in Lion, due to some changes in Lion’s memory management (namely, the transition to an entirely 64-bit system). After upgrading to 8 GB of RAM, the beach balls became a thing of the past.
Now, I’m not recommending that you go out and spend money on RAM just to see if that solves your problem! Instead, open Activity Monitor (found in the Utilities folder that is inside the Applications folder) and select the System Memory tab, then compare the page ins and page outs. If the page outs value is too high – more than 10% of the page ins value – then that is an indication that you could benefit from more RAM. If it isn’t that high, adding more RAM won’t help. Note that you should not try to look at these values right after startup, as page outs will generally be zero, or close to it, soon after startup. Wait until your performance problems start happening, then check the page outs!
In Mac OS X 10.9 (aka Mavericks), the Memory pane in Activity Monitor has changed. It no longer shows page ins and page outs. Instead, it now shows a “memory pressure” graph. When the bar gets high, as shown here, memory is an issue, and you may benefit from additional RAM.
Note that if you see that your free RAM has dwindled to nearly nothing, that is not indicative of a problem. Free RAM is wasted RAM. It’s not doing anything for you. The system will try to cache as much data as it can in RAM to help speed up the system. This is especially true in Mavericks, which seems to do its best to fill RAM entirely. It is not unless you see one of the problems mentioned above that you should suspect memory issues.
If you need more RAM, you can take your machine to an Apple Store and have the techs there install more. That’s a bit pricey, though, compared to other options. Instead, you could buy RAM from somewhere like Crucial or Other World Computing and install it yourself. You will need to be sure to do your research first, though, and get the correct RAM for your machine. You can also look in the manual for your Mac for installation instructions.
Check for CPU hogs
Another thing to check for is programs that are hogging the processor (CPU). In Activity Monitor (found in the Utilities folder that is inside the Applications folder), click the “% CPU” heading in the list of running processes. This will sort the process list by the amount of CPU time being used. If it sorts the zeros at the top of the list, click the “% CPU” heading once more to reverse the sort. Look at the top few processes.
In normal usage, with no major processing going on in the background, I have never seen this number go above about 10% for any individual process. Of course, if you’re doing something like applying a complex filter in Photoshop, rebuilding the index of a very large mailbox in Mail, playing a Flash-based game in Safari or something else along these lines, I would expect to see those apps’ CPU usage go much higher than that. But otherwise, if the machine should be mostly idle, a high number can point you to the source of the error. If some third-party software is hogging the CPU for no good reason, the fix may be as simple as uninstalling that application. If it’s some system component, the fix will be more complex. Keep trying some of the other tips in this list, and hopefully one of those fixes will help.
Check the hardware
Bad hardware can also cause performance issues. Sometimes the cause of a hardware problem can be obvious. If you’re having performance problems after spilling a liquid on your computer, dropping it or installing new RAM, for example, checking the hardware may seem obvious. However, sometimes more subtle hardware issues can be present yet remain unnoticed until some system update happens to “trip” over the problem. So it can’t hurt to check the hardware, using Apple Hardware Test. Keep in mind, though, that AHT cannot find all possible hardware errors, so a “pass” from AHT is not a guarantee that your hardware is fine. If problems persist, and no other troubleshooting steps work, it wouldn’t be a bad idea to call in Apple’s techs for some more in-depth testing.
Check third-party software
Many people unknowingly install what many experts irreverently refer to as “crapware.” Such software serves no important purpose while potentially causing problems, including performance issues. When having problems, an important test is to start up in Safe Mode by holding down the shift key at startup. This disables all third-party software that loads at startup, among other things. If the problem goes away in Safe Mode, but reappears when you reboot normally (ie, without holding down any keys), the problem is almost certainly third-party software.
If this is the case for you, the first thing to do is examine your login items. Go to System Preferences -> Users & Groups (or Accounts on older systems) and examine the items in the Login Items list. Remove some of those items and restart the computer. If the problem persists, remove some more. If the problem goes away, you’ll know you removed the cause. To be able to add those items back to the list later if you want to, you should control-click (or right-click) on each item and choose Show in Finder, then make a note of the location. (You can control-click the folder name in the title bar of the Finder window to see the path to the file.)
If the login items are not the problem, there are a couple other things that can keep software running in the background: LaunchAgents and LaunchDaemons. You can begin looking for these by choosing Go to Folder from the Finder’s Go menu and entering the following path:
This will give you a list of files whose purpose is to keep some software running in the background, or perform some repeating task by opening a particular program periodically. These can be a source of trouble. You should weed out as many of these as you can by uninstalling the software responsible for them.
The names of these files should indicate what software they are part of. The names should generally follow a form similar to “com.companyname.productname.plist.” Use that information to determine what app installed it, then remove that app using the uninstaller provided by the developer. That uninstaller may part of the original disk or download you used to install the software, either as a standalone uninstaller or as part of the installer. There may also be a separate uninstaller that has been installed on your system somewhere, or an uninstall option may even be accessible through the app itself. If you’re not sure how to uninstall it, seek help from the developer.
Test after uninstalling each app. If removing a particular piece of software doesn’t help, you can install it again later, once you have found the culprit(s).
If that doesn’t help, try looking at the LaunchDaemons. Again, in the Finder, choose Go -> Go to Folder, and this time enter the following path:
Repeat the same procedures to troubleshoot any items found there. If that doesn’t help, the last place to look is:
(Yes, that is different from the LaunchAgents folder you looked into first… note the crucial lack of a tilde (‘~’) character at the beginning of this path.)
Finally, if all else fails, try pasting the following command into the Terminal (found in the Utilities folder that is in the Applications folder):
kextstat | grep -v com.apple
After pasting that command, press return to execute it. This will list all third-party kernel extensions (kexts) that you have installed. Use the same technique to uninstall anything shown there. As an example, mine shows:
If I were having problems and got to this point in troubleshooting, I would try uninstalling Parallels.
Cleaning caches is not something I recommend doing lightly. This has become a rather popular, but completely unnecessary, task to perform as regular maintenance in Mac mythology. Clearing the caches actually can slow down your computer in the short term, as the purpose of caches is to keep things going fast. So you shouldn’t clear caches on a regular basis to keep your machine running fast. However, caches can become corrupt, so it may be appropriate when having problems to clear the caches.
There are a number of utilities that can help you do this, some good and some to be avoided. To be safe, I recommend simply doing the job yourself. You can safely delete everything in the following folders:
The first of those is found in the user Library folder (which is invisible in Mac OS X 10.7), while the second is found at the root level of the hard drive. If that’s Greek to you, just choose Go -> Go to Folder in the Finder and paste in the first path, then hit return. Delete everything inside that folder. Then repeat with the second folder. Once you’re done, restart the computer.
If this is too intimidating to try to do manually, download OnyX and use it to clear the caches, but don’t be tempted to use it, or any similar tool, for regular “maintenance,” which is completely unnecessary. (See The myth of the dirty Mac.)