Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Over the past few months, many things on my MacBook Pro have become unbearably slow. Often application switching or opening a new tab in Chrome will take up to 10 or 15 seconds.

Obviously, no one can tell me why my machine is slow based on just that, so this is a pre-question. What should I look into to start to figure out why my Mac has become so slow? I'm thinking of:

  • Is the disk getting full? (It was, but now I have 35GB free.)
  • Is the RAM filling up? (No, I've got >1.5GB free while I experience the problem.)
  • Is the CPU pegged? (No, it doesn't appear to be.)
  • Is I/O blocked? (Maybe, how does one tell?)
  • What else?

When a Mac is running slow, what are the vitals to take, and what directions should I go in based on those readings?

share|improve this question
    
I believe OSX will defragment files that are below 25MB automatically. If you have several files that are above this, it may be an issue. –  kobaltz Dec 27 '11 at 19:46
    
How old is the Mac, actually? Have you tried to just reinstall OS X? It's not really as much of a PITA as you would think it is. –  slhck Dec 27 '11 at 20:52
add comment

4 Answers

I've found this to usually be due to a dying hard drive (especially for Macs).

One of the nice things about Macs is that they are all the same. Since most people don't have this problem with their Macs, it's probably going to be something that makes your Mac unique from the rest (length of ownership and use).

Parts wear out and get old. You'll probably want to find a way to read the raw SMART data from the drive. Having reallocated sectors is usually a good hint that the drive is on its way out (even if the status says "ok").

I use smartctl to do this. You might be able to get smartctl for Mac, for example using Homebrew running brew install smartmontools, and run:

sudo /usr/local/Cellar/smartmontools/6.2/sbin/smartctl -a /dev/disk0

Or you can run a live CD like Knoppix and load up smartctl -a /dev/sda.

From the knoppix terminal:

sudo apt-get update
sudo apt-get install smartmontools
sudo smartctl -a /dev/sda

Another thing that can slow your computer down is dust or a broken fan. If your CPU heat sink is full of dust, it might be throttling down the CPU to prevent heat damage. I think it's 8 screws and the whole bottom panel comes off providing access to just about anything.

share|improve this answer
3  
You can also check the disk by just using Disk Utility, verifying the disk. There are also other tools such as SMARTReporter. –  slhck Dec 27 '11 at 20:51
2  
I got it with brew install smartmontools. It seems to say that SMART says the disk is passing. On the other hand, Disk Utility says the volume bitmap needs repair, so maybe that's part of it. –  Peeja Dec 28 '11 at 1:14
    
@Peeja The pass is slightly comforting but I've run into too many failing drives with a "pass" to trust it. Make sure the raw data count in "reallocated sectors" is zero. –  James T Dec 28 '11 at 1:24
    
@JamesT Uh oh: it says 100 (for "Value" and for "Worst"). Sign of a dying disk? –  Peeja Dec 29 '11 at 2:32
    
@Peeja I'm not sure but I think your looking at the wrong columns. There is a "Value" column and a "Raw Value" column. You want to look at the "Raw Value". There are examples here: superuser.com/questions/151288/making-sense-of-s-m-a-r-t –  James T Dec 29 '11 at 3:33
show 1 more comment

If you have a traditional hard disk drive rather than a solid state drive, the symptoms you describe sound like the early stages of hard drive failure. Some sector that gets read a lot but never written to is failing, causing lots of "slow read" retries, and eventual timeouts/failures. Because it never gets written, the drive never gets a chance to reallocate it. This can cause unbearable slowness and rainbow wheels across all kinds of activities, and persists across reboots (it often causes painfully slow booting as well).

Run the free demo of SMART Utility to see if your hard drive has any Pending, Removed, or Reallocated bad sectors. If it has any at all, it's starting to fail and you should replace it immediately.

Note that Mac OS X's built-in Disk Utility will often say "SMART status: Verified" even when there are bad sectors, so you really need to run SMART Utility, not just Disk Utility. Well, actually, as of Lion (Mac OS X v10.7.x) you can actually get to the underlying SMART error counters in Disk Utility, by clicking on the icon of the physical hard drive itself (not the partitions) and then choosing "File > Get Info...". But the third party SMART Utility does a good job of interpreting the correct counters for you, so I still recommend it.

It is sometimes possible, but not recommended, to resuscitate a hard drive with a small number of bad sectors, by formatting the entire drive (not just the individual partitions) with "Zero Out Data" enabled. This forces every sector to get written to, which allows the drive a chance to reallocate any pending bad sectors. This will probably cause the current crop of bad blocks to be taken care of, but once a drive has any bad blocks, it's probably in a death spiral and shouldn't be trusted.

By the way, it's worth noting that SMART Utility queries the drive's controller and returns results immediately; it doesn't have to waste time testing the entire disk, so there's no time waste involved.

P.S. I used to recommend that people in this situation look in the System Log and Kernel Log for messages something like "disk0s2: I/O Error: UNDEFINED", but I found that that advice was too prone to user error. It's much easier and more reliable to just download SMART Utility and run it.

share|improve this answer
    
Nice, I didn't know that Macs own disk utility could show the raw data. I wouldn't personally want to trust a drive with reallocated or bad sectors even with the zero'd out data. I agree with the statement about the drive being on a downward spiral. –  James T Dec 27 '11 at 21:21
    
+1 for the SmartUtility. I downloaded that on my Mac, and it's telling me the HDD is dying, which is quite believable, since a format never fixed it –  Canadian Luke Dec 27 '11 at 22:48
add comment

Just some quick food for thought: there are interrupt cycles allocated to check on functionality of vital components, for example for the fan heartbeat signal. My right fan died and the MacBook became painfully slow even before any chip would heat up enough to throttle down. It just can't handle the new interrupt situation. I know that had been an issue with another component on a different Mac platform but I can't go into details.

share|improve this answer
add comment

My guess: your system is creating a whole lotta swapfiles. Check out the vm_stat command. And look at the page http://osxdaily.com/2010/10/08/mac-virtual-memory-swap/ for more hints.

share|improve this answer
1  
Could you explain how to interpret the vm_stat results with regards to the OP's problem? –  slhck Dec 27 '11 at 20:06
    
I'd need to see the OP's vm_stat output before. –  ott-- Dec 27 '11 at 20:13
add comment

protected by Community Jan 13 '13 at 21:28

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.