07 December 2011

OS X Lion slowdowns; could it be the hard drive?

There may be times after upgrading your Mac's operating system that you experience odd slowdowns on the system, either problems with general workflow or issues with booting the system.

Apple's original hardware that shipped with its systems should run its supported operating systems very acceptably; however, some people may have upgraded hardware components of their systems (hard drives, RAM, etc.) and suspect incompatibility with those components as a root cause of the problems.

MacFixIt reader Bruce wrote in with such a concern:
Prior to updating to OS X Lion, I had one of those hybrid SSD drives installed in my Macbook Pro (a Seagate Momentus). It definitely boosted my computer's performance with much faster bootup times, fast application loading for recently or frequently used apps, etc. I had no problems with it and pretty much forgot about it.

But when I updated to OS X Lion, I had lots of problems that puzzled me for some time before I realized the cause. The main problems centered around rebooting and the computer remembering which apps were open. Even when I turned off features like "restore windows when quitting and reopening apps" and even when I quit apps before rebooting, my computer would reboot into apps and windows that I didn't want. There were several other problems that had to do with preferences for different apps and utilities. It was driving me crazy until I remembered about the hybrid drive. It made sense then, of course. The system was trying to read information from the SSD portion of the drive some of the time, and from the regular part of the drive some of the time... with very unpredictable results.

I replaced the drive with a standard drive and everything worked perfectly. I haven't researched it further since then to see if anything has changed, but at that point, hybrid drives were not compatible with many aspects of OS X Lion.

Missing the speed of the hybrid drive, I finally purchased a full SSD drive and the performance is remarkable and stable.
Since Apple has not certified its OS to work on some third-party components like hybrid drives, we cannot rule out that there might be some incompatibility with third-party devices; however, the chances for this are small given that Apple's hardware is fairly standardized. The controllers that Apple uses are the same as can be found elsewhere in the PC industry, and Apple's hardware is standard enough to accept native installations of other operating systems like Windows and Linux.

Hybrid hard drives have a small amount of high-speed flash memory (2 to 4GB) as a cache to store frequently accessed information. Normal operation of the drive uses the flash memory and only spins up the hard drive periodically to write unused aspects of the flash memory to the drive. If the cache gets filled then the drive will slow down as the workload is offloaded to the slower conventional drive; likewise, if you access a file or program that is not yet in the cache, then the drive will run slower while these items are loaded. However, despite the differences between hard drives, SSDs, or these hybrid drives, it should not matter to the operating system what type of storage device you are using.

These functions of the drive happen on the hardware level, so the operating system should not have any interaction with the drive's cache separately from the rest of its components, and the OS should recognize it as one logical storage volume. Take a look at Apple's FileVault 2 technology as an example of how the operating system interacts with the drive. Enabling Filevault 2, switches on a volume management technology underneath the OS that can be used to encrypt entire volumes and span data across them without the OS even knowing this is happening. To the OS the complex drive setup with FileVault 2 appears as a single basic storage volume as if it was configured directly on the drive.

In Bruce's situation, given that the system performed well once he had switched drives it may be that Lion has an incompatibility with the specific drive; however, this does not rule out several other possibilities:
  1. Drive hardware faults
    For any drive there is a potential for hardware faults to affect its performance. These faults include the development of bad blocks if the storage medium is corrupted, or other hardware problems such as firmware glitches that might result in a specific drive not working as opposed to there being problems with hybrid drives in general. In these cases you can use a tool like Drive Genius, Tech Tool Pro, or Disk Tools Pro to check the drive for bad blocks and test its performance and reliability.
  2. Volume setup faults
    Another option related in part to drive hardware faults: problems with the logical configuration of volumes on the drive. To use the drive, the system needs to set up a partition table on it and allocate chunks of the drive into storage volumes (for example, "Macintosh HD" is a volume on your drive, and not the "drive" itself). If there are problems with the drive's partition table or with its volume format, then the system may have trouble accessing data on it and will spend time resolving conflicts and resorting to alternate means of functioning instead of smoothly performing tasks.

    To resolve volume setup faults, be sure you have a restorable full system backup such as one with Time Machine or a file-level drive clone (file-level cloning ensures the file data and organization is copied, without preserving partition tables and volume structures--see more on cloning differences here). Then fully partition and format the drive using Disk Utility on the OS X installation drive (available for OS X Lion if you create a separate restore volume). Ensure you rewrite the partition table by selecting the drive and setting the number of partitions to something different than "Current" (even if you just select "1 Partition"), and when the drive is formatted then restore your backup back to the drive.
  3. Faulty OS upgrade
    Even if the drive hardware is working properly, sometimes faults in software can result in slowdowns after an upgrade. Many times people have existing problems with their operating systems before they upgrade, these problems are then left in caches and other faulty configurations that may result in odd and slow behavior with the new OS version.

    To fix faults with the OS configuration, my first recommendation is to run a general maintenance routine on the system to reset these caches and some of the settings that may be causing problems. After doing this, if the problems persist, then try some general troubleshooting steps to see if you can see any improvement by running in alternative accounts, or in special boot modes like Safe Mode.


Questions? Comments? Have a fix? Post them below

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Blogger Templates