3

I have a Macbook pro, both of which are evincing awful performance for day to day tasks. I'd like to know what is causing it, or failing that, how to diagnose this performance issue more effectively. I'll describe the main problem and what I think may be related effects, and hopefully someone here can lead me down the right path to an answer.

When I open my machine and it wakes up from the suspend state, the password dialog comes up, but often my keyboard input does not appear in the dialog for some time (this morning, for example, I typed my password and waited 45 seconds for the first character to appear, followed by a perceptible lag for each subsequent character). At the same time, I can hear what I believe to be the disk thrashing away madly.

The disk thrashing continues for a long time (today, 7 minutes). During that time, my computer is nigh unusable; cmd-tab takes ~10 sec to display the task switcher, typing anything into my terminal results in a wait for the command to echo, followed by slow runtimes. Chrome just beachballs for no reason.

I am running:

  • OSX Lion 10.7.1
  • Chrome 15.0
  • Emacs 24
  • Quicksilver
  • Growl 1.3
  • Sparrow
  • Adium 1.5
  • Dropbox
  • Google Music Updater
  • iStat Menu (installed after this started, to try diagnose the issue)
  • Watts
  • iTerm
  • Twitter
  • iTunes
  • iCal

I do not have any remote volumes mounted; I had thought that perhaps the issue was with Quicksilver indexing AFP volumes, but evidently that's not the case.

My hardware is a Late 2010 17" MBP, 4Gb RAM, 1TB 7200RPM HD.

What tools can I use to track this down (remembering that I don't have a terminal when it's most prevalent, and in fact am not even logged in) or what's happening?

3
  • 1
    Looking at the output of /Applications/Utilities/Console.app, do you see anything relevant? After logging in and the ~7 minutes, does the system work normally?
    – slhck
    Nov 14, 2011 at 15:45
  • Open Activity Manager and check your RAM usage. Or use a console and free -m. I have a mini that I upgraded to 8GB ram and usually idle around 5GB used (with significantly less open than you have). Macs use massive amounts of memory.
    – Kevin
    Nov 14, 2011 at 15:49
  • My Macbook Pro running Mountain Lion was very slow. I quit Dropbox and instantly the speed was normal. I don't know why or if there is a solution to run Dropbox.
    – user184414
    Jan 4, 2013 at 2:42

4 Answers 4

4

My suggestion would be to, as a commenter suggested, look at the Console.app logs. Specifically use the search bar and search "I/O", and see if there are any errors. If there are it's your hard drive.

The next place to look is free RAM and running processes. If you have little free RAM this could be the culprit although given the extent of your issues I doubt it.

A rogue process chewing up processor cycles is a more likely scenario.

Lastly if all that seems within reason open up your Disk Utility.app, select your boot volume, usually "Macintosh HD", and under the First Aid tab run Verify Disk. If you get any errors then that is by far the most likely cause of your slowdowns.

If you don't get errors, select the root drive (the one above Macintosh HD in the hierarchy) and then click the Info button on the menu bar. You should get a window with some SMART attributes listed at the bottom of the list. If "Raw Read Error Rate", "Reallocated Sector Count" or "Reallocation Event Count" are anything but zeroes, it's very likely that your drive is on its way to failure.

4
  • I/O turns up nothing. My processor usage hovers below 15% per core, spiking when (as happened just a moment ago) my text entry starts to lag. I'm looking into the Disk Utility steps now.
    – Chris R
    Nov 15, 2011 at 1:39
  • What processes spike and what is consistently using that much CPU? Is it something that you expect to be using that much CPU?
    – JD Guzman
    Nov 15, 2011 at 22:35
  • +1. I hadn't noticed that Lion's Disk Utility added the ability to see raw read errors and reallocated sector counts. Nice tip. Anyone who doesn't have Lion yet can run SMART Utility as I mentioned in my separate Answer. I like your Answer except I would recommend looking at the SMART attributes first, because it's faster and less error-prone than looking through the logs, and it doesn't incur huge slow-read wait times that running Verify Disk on a drive with bad sectors would incur.
    – Spiff
    Nov 16, 2011 at 6:06
  • @JD Guzman: I don't know, that's the thing; by the time any diagnostic tools have started running, the incident is passed; when it's happening, I see >1s lag for simple keystroke responses.
    – Chris R
    Nov 17, 2011 at 8:10
2

Your hard drive is probably dying. Run SMART Utility (shareware; free to run during a brief evaluation period; please support shareware; I have no affiliation with this shareware author). It talks to your drive briefly and immediately reports any problems your drive knows about. It runs very quickly -- it doesn't have to scan your whole drive or anything like that. If it reports any pending/reallocated/remapped bad sectors, your drive is dying and you should plan to replace it.

If SMART Utility doesn't report any bad sectors, then I'm wrong and it's probably not your hard drive. But I'm probably not wrong.

Note that SMART Utility reports a lot of detail that Mac OS X's built-in Disk Utility doesn't report. Disk Utility may still report "SMART status: verified" for a drive that SMART Utility will tell you has lots of bad sectors. Believe SMART Utility over Disk Utility.

Sometimes you can see the bad sector read errors reported in /var/log/kernel.log or maybe /var/log/system.log, usually in a form similar to /dev/disk0s2: I/O Error: UNDEFINED. But searching through log files is a pain compared to how quickly you can download and run SMART Utility (assuming you can boot from a different drive to do this).

Sometimes you can erase the entire disk with Zero Out Data to force every sector to get written to, causing the drive to remap bad sectors, and sometimes this will be enough to get the drive working again. But even if you do that, it's still probably circling the drain and you should not trust it at all.

2

In my case it was Dropbox. I had my Aperture Library with over 400,000 files (50GB) in the Dropbox.

My macbook pro (15" early 2011) has been terribly slow, and none of the usual measures helped. Clean install, resetting PRAM, repairing disk, nothing helped. Dropbox is not eating CPU, neither memory. My computer often showed the spinning beach balls at times when CPU usage was low, only a few percent, and memory usage was 50%.

Now, after many months, I have downsized Dropbox, removed Aperture from it, and suddenly my MacBook is snappy again. Important: after deleting hundreds of thousands of files, quit Dropbox, remove ~/.dropbox completely, restart dropbox, fill in your credentials, and let dropbox merge its online copy with your local copy of your files. That will take some time, but after that you have a rejuvenated computer back.

My hunch is that a huge Dropbox consumes a resource that is not CPU, nor RAM, but something else that prevents applications to access the disk fluidly.

0

My suggestion is to uninstall Growl. It doesn't seem to play nice with Lion. There is a Lion-compatible Growl on the App Store, but I've lived without it since going Lion on my desktop. Note that you can't just trash it, you need to go to http://growl.info/ and use the proper 'Growl remove' tools.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .