Pages

Thursday, June 12, 2014

When your Mac slows down, give it a tune-up

When your Mac slows down, give it a tune-up


Tune up your Macintosh, and clean out the cruft

Macs are solid machines, but just like their owners they have a tendency to get lethargic as they age. Launching and switching programs takes longer, simple tasks become arduous, and the dreaded beach ball of doom appears more often than it did when your machine was new. The operating system just starts to feel crufty, and can get worse over time. I see these issues in my IT consulting business regularly.

You may be asking, why does this happen? There are many reasons, but some are more common than others. Sometimes your hard disk (or solid-state drive) gets too full and interferes with normal computer operations. Crashes or misbehaving programs can corrupt the disk directory or application cache files. Remnants from old software may still be running behind the scenes, or you don’t have enough RAM to deal with your OS and workflow.

Is there some sort of tune-up you can do to sort it out? Your tech always tells you to just reboot the computer, but there’s got to be more than that. The good news: Yes, there are some things you can do. And, perhaps, adopt some more efficient computing practices for yourself along the way.

Here are four common things I perform or check for clients when they complain that their Mac is sluggish:

• Free up more disk space
• Rebuild the disk directory and clear caches
• Remove unnecessary startup items and Internet plug-ins
• Install more RAM and manage memory better

Let’s look at each of these.

Free up more disk space

Far and away, the most common issue I find when computers are running slowly is that the hard drive is nearly full. When your hard drive gets too full, performance suffers. There is always a constant stream of information going between RAM and disk storage. The operating system uses disk storage for temporary data: virtual memory swap files, application cache files, etc. Programs and data you’re actively using get loaded into RAM and old data or background tasks are temporarily saved or cached to the hard drive.

When free space on the hard drive gets too low, the OS can’t operate efficiently and spends more time doing smaller read/write operations. You start to see that rainbow beach ball more often. When space completely runs out, the machine becomes unresponsive and virtual wheels grind to a halt.

You can find out how much space is left by going to the Apple Menu –> About this Mac –> More Info.  The Storage tab will show the amount of available free space your Mac still has. If the remaining space is less than 2GB, your computer is struggling. A good rule of thumb is to keep at least three times the amount of installed RAM free. For example, if you have 2GB of RAM installed, keep at least 6GB free on the disk.

To free up space, delete unneeded files, old downloads and installer files ending in .dmg or .pkg. Movies, TV shows, music and pictures can also take up lots of room. You can copy some of these files to an external hard drive, then delete the originals to make more room.

Remember to empty the trash after deleting to actually free up the space. When you can’t clear out enough data to make room, it’s time for a bigger hard drive.

Mac TrashRebuild the disk directory and clear caches

The disk directory is the list of files stored on your hard disk along with their locations. Sometimes this can get out of sync with the actual files on disk. If a program crashes or doesn’t complete saving a file correctly, the information in the directory may not match what’s actually on your disk. Various small read/write errors also slowly build up over time and can cause problems opening and saving files, again generating the dreaded beach ball of death.

Cache files are temporary holding places for constantly changing information, such as installed fonts, graphics from web pages, Spotlight indexing, etc. As above, program errors and crashes can corrupt cache files, making them fully or partially unreadable. This, in turn, causes individual programs or the OS itself to misbehave.

There are a number of utilities on the market to help with these problems, but a very simple solution is built right into your Mac: the Safe Boot. Among other things, a Safe Boot runs a full scan on the hard drive sector by sector and fixes problems found in the disk directory. It also clears cache files of old data, so you get a clean start on your next reboot.

To perform a Safe Boot, restart the computer and hold down the Shift key until you reach the desktop. This may take a few minutes, and depending on your OS X version you may see a progress bar onscreen for part of the process. Once you’ve reached the desktop, release the Shift key and restart normally.

For more advanced disk directory repairs, I highly recommend DiskWarrior. If your Mac won’t boot at all (even in Safe Mode) you can often get things working again with this useful utility.

One common step people take to try and solve disk problems is to repair permissions using Disk Utility. Back in the early days of Mac OS X this was helpful, but it has become much less necessary in current versions. It won’t hurt to repair disk permissions, but the errors listed and fixed typically don’t affect much.

Remove unnecessary startup items and Internet plug-ins

When your Mac starts up, programs you use frequently can be set to automatically launch at startup: Safari, Mail, Dropbox, etc. Several background processes may also get loaded to support programs you’ve installed, like backup software. And some programs may have configured themselves to launch at startup whether you want them or not – Skype, anyone? You may have extraneous items or out-of-date tasks vying for attention.

To prune these down, check in a few places:

First visit System Preferences –> Users & Accounts, and click the Login tab. Here you’ll see a list of items set to open automatically when you log in. Some of these items may no longer be needed or current. For example, if you used to run Symantec AntiVirus on your iMac in 2002 and have just migrated things along ever since, there may be one or two Symantec programs still set to launch at startup. You can also remove any programs that may have configured themselves to run automatically which you don’t use (like Skype).

To remove an item, select it and click the “-” sign. You can also safely remove any items that show an error code or as kind “Unknown.”

A long delay at startup could be a sign of a missing shared network drive. If you’ve previously connected your Mac to a server or another networked Mac (say at work), that drive may have been added to the list of items to open at login. If you’re then on another network or the share is unavailable for some reason, the Mac will pause as it waits for a response from the missing disk. Check to see if there are shared drives or “Volumes” in the Login Items list, and if so remove them.

The next few steps are a bit more advanced. You need to be familiar with locating and deleting configuration files on your hard drive. If you are not comfortable with these steps, skip down to the section on RAM.
System and User Library
On the hard drive, there are a few more folders you can check:

Macintosh HD –> Library –> LaunchAgents
Macintosh HD –> Library –> LaunchDaemons
Macintosh HD –> Library –> StartupItems
Macintosh HD –> Users –> Your Home Folder –> Library –> LaunchAgents
Macintosh HD –> Users –> Your Home Folder –> Library –> StartupItems


These folders contain .plist files that launch background processes (backups, VPNs, etc.). You can delete items you recognize as outdated or programs no longer needed; for example, as above you may see some items with Symantec in their filenames, or an old backup program you’re no longer using. An Administrator password will be required. Not all of these folders may exist on your system.

Note that in OS X 10.7 and above the User Library folder is invisible by default; to make it visible, hold down the Option key then in the Finder click on Go –> Library

VERY IMPORTANT: If you’re not sure what something does, leave it alone!!
Internet plug-ins can also cause problems, especially older plug-ins with newer web browsers. Plug-ins tend to get installed automatically as you visit websites over the years, but rarely get uninstalled. Do you really need the RealPlayer plug-in from 2005 any longer? Check the following two folders and as above, prune out anything you recognize as unneeded or more than three years out of date:

Macintosh HD –> Library –> Internet Plug-Ins
Macintosh HD –> Users –> Your Home Folder –> Library –> Internet Plug-Ins

After removing any Login items, LaunchAgents, LaunchDaemons or old plug-ins, reboot the Mac.

Install more RAM and manage memory better

Your Mac uses RAM to store data that the computer is actively using. The more RAM you have, the more programs you can run simultaneously with less need to cache and store data on the much-slower disk storage. Doubling or quadrupling the amount of installed RAM (if possible) will make a noticeable difference in how smoothly the computer functions.

You can see how much memory is installed in your system under the Apple menu by choosing About This Mac. For systems running OS X Lion 10.7 or higher, 4GB is really the practical minimum. If you’re still chugging along on 2GB, adding more will make a big difference.

Quitting unused applications can also improve performance. I’ve come across clients complaining about bizarre behavior on their Macs, only to find 30 apps running simultaneously! Quitting (or force quitting) most of them can substantially improve performance. If you need to force quit, restart the computer afterward.

Speaking of restarting — why do techs always tell you to do this? Well for one thing, it tends to solve problems more than half the time, so it’s our default response for a quick fix! But more seriously, after your computer has been running for a while and swapping lots of things in and out of RAM, or after a program has crashed, small errors can snowball into bigger glitches. The RAM storage itself can get fragmented, or stalled background processes can begin to interfere with running tasks.

Rebooting the computer clears out everything from RAM, stops all running processes, reloads the OS and brings things back to square one. Modern operating systems such as OS X, Windows 7 and Linux are much more resilient than in days of old, but the need to reboot has not gone away entirely. If your Mac hasn’t been restarted in several months, it’s time.

Now here’s a user workflow issue: If you tend to have many windows open at one time in a single program — say 20 Microsoft Word files, 34 PDFs in Adobe Reader, six dozen web pages in different browser tabs – this will definitely slow things down. Each open window requires memory to store and CPU power to deal with. In general, try to keep under (say) 10 documents open for any single program at one time.

I know, I know, you’re going to complain: “But this is how I work, I need all these things open at once!” Yes, yes. But remember you’ve just complained that your computer is running slowly, and this is one way to fix things. Pick your poison!

Is a fresh install of OS X worthwhile?

Sometimes problems seem so vast that a fresh installation of the operating system is a tempting fix. In my experience this isn’t routinely needed (OS X is not Windows). Trying the steps above is definitely worth doing before replacing the OS.

However, if you’ve tried all of the above and are still having problems, an OS reinstall might help. Remember to back up all your data first — I like either Time Machine or making a clone of the hard drive for this task.

I’ve also found it best to have a local copy of the OS X installation software with you — either Apple’s downloadable Lion, Mountain Lion or Mavericks installers, or the install DVD for older OS versions. These work faster and more reliably than online installers, and allow you to start over again if something goes wrong.

You did back things up first, right?





No comments:

Post a Comment