Whenever you upgrade a system there will always be times when configuration errors or incompatibilities may prevent specific features from working properly, such as a WiFi connection that is constantly dropping, but at other times more nondescript slowdowns may occur that have you questioning whether or not upgrading was worth it.
If you have just upgraded your Mac to OS X Yosemite and are noticing your system is running notably slower or choppier, then there are several steps you can take before you go about extensive troubleshooting efforts.
Repair your hard drive, permissions, and reset hardware
First ensure your boot drive’s formatting and system hardware variables are set up properly. To do this, you will need to reboot your system several times, but you can most quickly get both of these done by following these steps:
- Restart your Mac and hold Command-R down immediately, to boot into Recovery Mode.
- Open Disk Utility in the OS X Tools window.
- Select your hard drive device (when you do this, a “Partition” tab will appear).
- Go to the First Aid tab and click the button to Repair Disk.
- Now select your boot volume (the “Partition” tab will not be available when you do this).
- Again click the Repair Disk button.
- While we are at it, click the “Repair Disk Permissions” option to ensure file permissions are set in modes that allow proper access (do not be worried if you see many warnings show up when running this option).
- Shut down your Mac when finished. Then perform the steps to reset your System Management Controller (SMC). These are different for each Mac model, but are easy to do by a few keypresses.
- With your SMC reset, start up your Mac and hold down the Option-Command-P-R keys immediately when you hear the boot chimes, to reset the system’s PRAM. Release the keys when the system automatically resets and sounds the boot chimes again.
- Immediately switch from the Option-Command-P-R keys to holding the Shift key down when you hear these second boot chimes, to boot your Mac into Safe mode. In Safe Mode, you should see “Safe Mode” in red text along the top-right of your menu bar at the login window, so if you missed this then try again by rebooting and holding the Shift key when you hear the boot chimes.
- Booting to Safe Mode runs some built-in maintenance tasks, so when you get to the login window in Safe Mode, restart again to boot normally.
With these steps done, your system’s hardware variables and hard drive formatting should be set up properly, and basic maintenance should have been run. You can now concentrate on some OS X services that might be contributing to your general slowdown.
Hard Drive full?
Rebuild Spotlight’s index
After any major change to the data or software setup on your hard drive, OS X may spend a while indexing the changes so you can find items using Spotlight. When this happens, processes called “mds” and “mdworker” will take a large amount of CPU percentage, cause the system to slow, and increase energy usage. This should only take a short time to complete, but at times can get stuck and continually slow your system.
To fix this, force OS X to clear and rebuilt your Spotlight index:
- Open the Spotlight system preferences
- Click the Privacy tab
- Drag your hard drive from the Finder to the Privacy list
- Immediately remove your hard drive from this list
When you do this, Spotlight will again take a short while to index your drive, and you will see “mds” and “mdworker” work heavily; however, this time they should complete in a few hours and leave you with a fresh index that should be snappier and more accurate.
Turn off unnecessary OS X features
If you do not need optional system services, then turn them off. For instance, if you do not have bluetooth devices that you use, then disable the Bluetooth antenna in the Bluetooth menu extra. In addition, go through the system preferences and disable sharing services, iCloud features, internet accounts, and other details you do not use.
In addition to standard features, in Yosemite a number of people have noticed problems with Apple’s handling of transparencies, which cause the WindowServer process to take up system resources and cause choppy performance. To work around this problem, you can go to the Accessibility system preferences, and in the Display section check the option to Reduce transparency. You can also clear your desktop, close windows you do not use, and hide your Dock to help this. See here for more information about this problem and how to manage it.
Update all of your software (all of it)
For any software you have installed, be sure you fully update it. Preferably do this before upgrading to Yosemite; however, updates will be continually released to address problems and implement Yosemite-specific features, so be sure you regularly check for and apply them. Software updates may be found by going to the App Store option in the Apple Menu, or by selecting About This Mac in this menu and clicking the Software Update button in there.
For third-party software, check with the developers or use built-in updaters regularly to apply the latest updates and bug fixes for these programs.
Reinstall OS X
Finally, you might consider reinstalling OS X as a solution to slowdowns; however, before you resort to this, keep in mind this is usually not going to be an outright fix. Generally, resorting to a reinstall is a blanket approach that clears caches and other details already done by booting to Safe Mode and updating software; however, if you have tried these and have a full backup of your system, then a reinstall cannot hurt.
One approach that might help when reinstalling, is instead of using the OS X installer to reapply OS X over your current slow installation, use Disk Utility to format your boot drive and apply a fresh OS X installation. Be sure you have a full backup of your system before doing this, and when you get to the OS X setup assistant, you can migrate your data from your Time Machine backup.
- Back up your Mac with Time Machine (even if it is currently slow)
- Reboot and hold Command-R to load Recovery Mode.
- Open Disk Utility, select your boot volume, and use the Erase tab to format your drive to “Mac OS Extended (Journaled).”
- Quit Disk Utility, then open the OS X Installer tool to reinstall OS X.
- When you get to the Setup Assistant, follow the steps to migrate your data from your backup.
This is apparently a controversial subject in some circles, but file and free space fragmentation can also slow your system, particularly on a crowded drive. Upgrading over an existing system can add to this condition as files are erased and/or overwritten by the installer and new files are added. OS X uses a lot of hard drive space for virtual memory swap files and caches – and sleep images on laptop computers; these processes work better when there is contiguous free space available. You can review your swap file usage in Activity Monitor to get an idea what your system usage is. Some apps, like Photoshop, also use a lot a cache; again, contiguous space is more efficient. For these reasons, while it may appear that you have plenty of room on your hard drive, much of that space could be broken up between files and blocks of files (the problem is probably less significant – or of no significance whatsoever – on an SSD). Defragmenting a hard drive can consolidate files and free space for more efficient operation. OS X is supposed to prevent fragmentation of smaller files; still, adding and removing files will not always take advantage of this capability – particularly when you erase or delete items. Larger files will leave bigger holes.
If you cannot afford or do not wish to use one or another of the utilities that can defragment hard drives, you can accomplish much the same result by cloning your system to an external drive, erasing your internal drive and then cloning the system back. There are any number of apps that can do this for you; I’ve found SuperDuper! and Carbon Copy Cloner to be reliable. Of course these apps are not free either, but they will help you establish a reliable backup strategy, something you should do in any case as part of best practices. Time Machine can do the job, but restoring from a Time Machine backup is substantially slower than restoring from a clone. In addition, should your primary drive and/or system fail or become corrupted, you can boot from a clone and get back to work almost immediately. In fact you can work from the clone while restoring in the background. How appealing this procedure is will depend on what value you place on your time – and your data.
I’ve found TechTool Pro and iDefrag to be competent and capable tools. TechTool Pro has the advantage in that it can do a lot more besides defragment you drives. IDefrag does a more orderly job of organizing files – this may or may not make a difference in performance – opinions differ on that issue.
Any way, this is something to consider if other procedures fail to restore your system to good health and performance.
Still don’t think you should need to defrag your system with the way Mac’s are set up with the file system, which all that I have read ver the past few years does’nt warrant it, but I’ll let the experts wade in on this matter if they so desire.
Defragmenting your hard drive will undoubtedly help things, but the benefit is minimal and relatively temporary. The benefit is especially limited for SSDs, where access time for file fragments is not limited by mechanics. It is almost unnecessary to defragment an SSD, and in addition, the writing of the same files to different parts of the SSD media will just wear it out faster.
Thanks for the great article. Some questions:
1. Are steps 1 and 6 redundant? In other words, does safe mode repair disk as Disk Utility does?
2. Concerning PRAM reset, it says “boot chimes”. How many chimes?
3. Is the order correct? Is not better to do a reset SMC – then reset PRAM – then repair permissions – then repair Mac – then update?
4. In relation to 5-10% of your drive free, what about big drives like 10 TB ones? Is enough a minimum amount of free GB, like, say, 1 GB?
5. Finally, I would suggest to rebuild the directory with DiskWarrior. I have saved many disks just with that! The only problem with its current version (DiskWarrior 4.4) is that it is 32-bit instead of 64-bit (shocking but true) and cannot rebuild the directory of Time Machine disks or other disks with many files (even 1TB disks with not so many files; I mean, there are already 10 TB disks in the market), generating a bogus message which is utterly false (even on Macs with 64 GB RAM): “Error – Not enough memory (Error code 2154)”.
As far as I know Safe Mode does not repair the disk, only Disk Utility can do this.Safe Mode is for trouble shooting other software problems.
Don’t use third party software to fix the drive. I find using Disk Utility works just fine.
Safe Mode does run “fsck” (filesystem check) on your boot drive to both check and repair it. In essence it is the same; however, by running it as I mentioned it is not redundant, because you are using it to also check partition health and file permissions.
There is no order for resetting the PRAM and SMC; they are independent.
The 5-10% free drive space is a rule of thumb for most systems, but will depend on the amount of RAM you have, and the size of your boot drive. A Mac Pro with 128GB RAM that you push to the max with advanced video graphics and analysis routines, on a 2TB internal drive will require more percentage of free space than the same 2TB drive in an iMac with 16GB RAM used for Office programs and a little photoshop.
DiskWarrior is a good tool, but will cost for a license, and some people might find themselves not using it nearly enough to justify this cost. This is especially true when you can easily fully back up your drive, repartition and format it, and then restore the backup, and be back up with as a fresh of a drive as you can have.
Thanks. Does safe boot check partition health?
No real problems upgrading without doing a clean install, though no doubt that there is probably a lot of junk left over from the Maverick days, but I’m wondering why Yosemite is mounting and unmounting the Recovery Mode on a constant basis.
Don’t forget to move /usr/local out of the way before upgrading. If you have homebrew or TeXLive installed you should just tar the whole /usr/local somewhere safe and then remove it.
After the upgrade just untar it back where it was.
My MacBookPro with OS X Yosemite 10.10.2 will not boot into Safe Mode? Tried your instructions several times, everything else from steps 1-9 worked as listed in Repair your Hard drive, permissions, and reset hardware.