Make my next Mac fast!
June 18, 2010 9:44 PM   Subscribe

Why is my MacBook Pro so laggy, and how can I keep my new MacBook Pro from being the same way?

Using a 17" MacBook Pro with 10.6.2, 2GB RAM. A little over three years old. Over time the machine has gotten steadily more laggy: for the last six months ago it's been beachballing enough to be consistently annoying. E.G: iPhoto takes a long time to open, and when I want to quit, I have to click on iPhoto in the menu bar and wait 10-20 seconds for the pull-down bar to appear. Often dragging a window on the screen takes a long time (seconds, not minutes) to register. Activity Monitor shows CPU 71% idle.

Possible reasons: I tend to keep a reasonably large number of applications open (iCal, Firefox, Mail, TeXShop, iCal, iTunes, Things, and Adobe Reader open just about all the time, with 8-15 tabs in Firefox.) I also have only about 5GB of hard drive space free.

I'm planning to buy a new MacBook Pro soon, and I want to keep it nice and snappy. Will moving to a new machine with a much larger hard drive solve the problem? Does it matter in this respect if I spring for the solid-state drive? More RAM? Am I going to have to train myself to close up iCal, iTunes, Mail, etc. when I'm not actually using them?
posted by escabeche to Computers & Internet (23 answers total) 16 users marked this as a favorite
1) Try out YASU (free) to clean out the cruft.

2) I'm guessing moving to 4 GB RAM would really help you out, especially with iPhoto.
posted by sharkfu at 9:49 PM on June 18, 2010

I also have only about 5GB of hard drive space free.

This is probably the killer. Macs generally don't need to be defragmented, but if you fill the hard drive a lot of the optimizations that make defragmenting unnecessary don't work or don't work as well, especially if you often work with large files.

Beyond that, more RAM is almost always better.
posted by jedicus at 9:51 PM on June 18, 2010

When it comes to lag in OS X, it's rare for me to say "RAM" - compared to most versions of Windows, OS X handles running out of RAM fairly well, and 2GB isn't particularly under-sized.

That said, you do have a fair bit open and running, particularly if you've got large mailboxes, a large iTunes library, and most of your FF tabs include Flash. iPhoto too isn't the fastest app around when you've got a large library, and 5G free disk space isn't helping you either. But I'm going to go out on a bit of a limb and say your biggest culprit is probably Adobe Reader. Any reason OS X's doesn't cut it?
posted by Pinback at 9:58 PM on June 18, 2010

Response by poster: particularly if you've got large mailboxes

Wait, does this matter? I have tens of thousands of e-mails in various folders.

Any reason OS X's doesn't cut it?

No reason. I think I have Reader set as the automatic launch when I click on a .pdf file. Is Preview much faster?
posted by escabeche at 10:05 PM on June 18, 2010

Wait, does this matter? I have tens of thousands of e-mails in various folders.

OS X Mail uses the mbox file format, which stores each mailbox as a single large file. Your mailbox files could potentially be hundreds of megabytes or even a few gigabytes in size. If your hard drive is running low on space then these large files can become fragmented, leading to poor performance.

Is Preview much faster?

Significantly, in my experience.
posted by jedicus at 10:20 PM on June 18, 2010

Three suggestions, two of which echo what others have written...

1. Stop using Firefox (ever), use Safari or Chrome. Firefox is a mess - I don't know anyone on a Mac who still uses it. If you need the rendering engine, try Camino - otherwise both Safari and Chrome are WAY faster and won't have the same results that you're seeing. Check out Activity Monitor (in Applications/Utilities) to investigate further and learn what is going on.

2. I agree with ditching Adobe Reader as well - Preview is way faster and lighter on your system.

3. Give yourself more free HD space - at least 10% of the total capacity should be free at all times. When you run out of physical RAM, you get into virtual memory situations, which is normally managed very easily by the OS. To do this, the OS writes things temporarily to the HD - and if there's not much space to do that, it takes more time to manage that effectively.

(That's a casual description of what's happening - some smart person could likely say the same thing more accurately than that, but this should be OK to give you a mental model of what's happening.)

Lastly - Macs (and all computers these days) love RAM. If you can swing it, it's never a bad idea to bump up the amount you have installed.
posted by mikel at 10:27 PM on June 18, 2010

The combination of less than maxed out RAM and a nearly full hard drive is causing your machine to work much harder than it needs to. Delete files, regain hard drive space, run disk utility and your MBP should be humming along again.

And though the Mac OS does handle lots of apps being open at once, cut down on the number and see what kind of a difference that makes.

But yeah, more RAM and get rid of dead wood files, I recently cleared out some old iMovie projects and recouped 8 or 10 gigs of drive space.
posted by fenriq at 10:29 PM on June 18, 2010 [1 favorite]

Use Disk Inventory X to find where your disk space is being used.
posted by rhizome at 10:37 PM on June 18, 2010

Having only 5 GB of free space is the big red flag in your post. Try to get around 20 or 30 GB free at least. WhatSize ($13) is a helpful application that will sort your directories by size to show you which ones are eating up your space. There is also a free alternative called OmniDiskSweeper.

The SSD will be faster, but it will need to have sufficient free space or you'll run into the same problem there. SSDs cost much more per GB than a hard drive, so if you have a lot of large files you may be better off with a hard drive. Look at how much space you are using on your drive now and shop for SSDs that are double that at least. A 7200 RPM drive is a decent compromise between at standard laptop drive (which is 5400 RPM) and an SSD. Another option is to get an SSD and an external FireWire drive for your iTunes library.

Before buying a new computer you might consider upgrading the hard drive in this one instead. SuperDuper! would help you clone your current drive onto a new one, and iFixit can help out with the actual process of swapping in the drive. Upgrading to 10.6.4 would also be helpful (after you've made some space as that download is almost 1 GB on its own) and be aware that you can clear the caches by simply restarting and holding down shift. It will take a few extra minutes to boot, and when it completes you will want to reboot again normally as the safe boot disables your login items.

I don't think 2 GB of RAM is limiting you very much based on the applications you're using. If you want to get another year out the laptop it is worth upgrading the hard drive first, and then the RAM.

Also, Preview is far superior to Reader in both speed and security.
posted by ridogi at 10:47 PM on June 18, 2010

Use Chrome!!
posted by antgly at 10:51 PM on June 18, 2010

One note, Apple mail no longer uses the mbox format (since the introduction of time machine I believe, but could have been earlier) but rather uses one file per message. The indexes however would be large, so that could be impacted by a large mail box. I have three inboxes, each with 3-5k messages, and several other folders with over 30k messages and currently mail is only using about 123mb of ram.

The biggest RAM hogs on my machine are typically iPhoto (been a while since I've used it but I recall it being easilly over 600mb), Safari (I saw it hit 1.06GB a couple days ago. made me switch back to Chrome), Firefox (usually around 400-800mb, but I've see it near 1GB). Chrome seems similar but it is hard to tell as it uses separate processes that have shared memory.

I'll echo everyone else's comments - free up some disk space and drop a few apps. Or get a bigger disk and get more RAM. That by far is your major slowdown and getting a new laptop to fix that is a bit of overkill.

I recently went from a first gen MBP with a 2.16Ghz CoreDuo to a new Core i7 MBP. The most noticeable speedup was actually directly related to the increased RAM. (The other reason to upgrade for me was no 64bit support on those old Core Duo CPUs, need that for work).
posted by cftarnas at 10:57 PM on June 18, 2010

Second thought - 5GB of free disk space means when you do swap out RAM the disk will be extra slow for that as it will likely be very scattered writes and reads. Ugly.
posted by cftarnas at 11:12 PM on June 18, 2010

The biggest RAM hogs on my machine are typically iPhoto (been a while since I've used it but I recall it being easilly over 600mb), Safari (I saw it hit 1.06GB a couple days ago. made me switch back to Chrome), Firefox (usually around 400-800mb, but I've see it near 1GB). Chrome seems similar but it is hard to tell as it uses separate processes that have shared memory.

Keep in mind that those programs probably don't actually have that much data in memory--either in RAM or virtual RAM.

Due to the way unix-derived operating systems allocate memory, and depending on the algorithm in use, a program can wind up with a huge amount of unbacked virtual address space assigned to it. It hasn't been written to, so it doesn't need to be stored anywhere. Since it isn't stored anywhere, it isn't hurting you.
posted by Netzapper at 12:40 AM on June 19, 2010

Not to dissuade you from getting a new MacBook, but upgrading your memory and HD will make a world of difference. Also open Disk Utility and run "repair permissions" and "repair disk". And at the very least run Software Update because the OS is at 10.6.4.
posted by whiskeyspider at 5:27 AM on June 19, 2010 [1 favorite]

> Firefox is a mess - I don't know anyone on a Mac who still uses it
You do now. Until Chrome/Camino/Safari can import all my setting, all my plugins, and work the way I need it to, speed isn't a problem.

I would say, though, that Adobe Reader is likely to be eating up more resources than it should. It's a vile piece of software.
posted by scruss at 8:40 AM on June 19, 2010

My macbook is over three years old and was getting all slow and laggy like yours. I recently replaced the hard drive with an SSD and it screams. So I have to say that you might not need a new machine. If speed is the only reason you are upgrading, an SSD will be a lot cheaper than a new laptop.

To keep a laptop running fast, I think every year you should reformat the drive and reinstall only what you are currently using. If you don't have an SSD, then at least get a 7200 rpm hard drive which should be faster than your current drive. Take the opportunity to upgrade to the latest versions of the OS and all of your applications, if you haven't already done so. Don't reinstall any optional third-party plugins right away. Install the minimum and then add things one at a time so you can tell if one new thing has a big effect on performance.

If you do get a new machine, don't use migration assistant to transfer everything. Only transfer what you really need and gradually add the optional stuff so you can judge the performance hit.
posted by conrad53 at 10:03 AM on June 19, 2010

Try opening Activity Monitor and seeing how your RAM situation is. See plenty of green in the system memory pie chart? You're good. See none? That will cause your beachballs.

One thing I've noticed is that iCal seems to have a memory leak for me; I think it's something to do with google sync. Anyways, if I leave it open for more than a few hours, it sucks up all the available memory on my system, and quitting it helps tremendously. You can check by quitting it and watching the pie chart in activity monitor... How much green opens up?

Also, seconding the reccomendations re: Preview instead of Reader and Safari instead of Firefox, and, yes, a larger hard drive.
posted by wyzewoman at 10:43 AM on June 19, 2010

More specifically on RAM, open up Activity Monitor, click System Memory, and look at the Page Outs. Page Outs is when the computer writes data from physical RAM to virtual RAM (swap) on the hard drive, because you're running out of physical RAM. Since all hard drives are way slower than RAM this is a performance hit. Page Outs should be a relatively small number (I've got 14MB right now). This number will increase the longer the system has been on without restarting but if you've got some large number (maybe 100MB+) that's a good indication that more RAM will help.

Leaving all those applications running is going to use more RAM, even when they're idle. 2GB is, IMO, no longer enough for OS X. Even my mom runs 3GB and she is not a power user.

Also, I'm another Firefox user. I find Safari's tab management inept for large numbers of tabs.
posted by 6550 at 2:01 PM on June 19, 2010

If you're doing lots of document-heavy work, an SSD will likely be your best possible investment.

Note that the times that your Mac is freezing is when it needs to read things in from disk: opening applications or paging them back into memory from disk. Your CPU is largely idle throughout these tasks. Thus, your disk is the main bottleneck.

Three tangential recommendations for your new Macbook Pro:

1. If you get a 15", get the High Resolution display. Looking at my old MBP is painful.

2. Consider the "anti-glare" (matte) display. The pre-unibody MBPs had nice, tolerable glossy displays. The unibody ones literally have a pane of glass in front of the display. I find the glare to be surprisingly frustrating, especially since I loved my older glossy display.

3. Get gfxCardStatus. It'll tell you when your Mac is using the integrated Intel GPU, and notify you when it switches to the discrete Nvidia GPU. Minimizing the time it's on the Nvidia GPU is the only way to get battery life even remotely approaching Apple's advertised numbers. You'll also have to learn to love Safari: Chrome triggers the Nvidia GPU as soon as it loads Flash, and won't switch back to Intel until you quit it.
posted by SemiSophos at 3:06 PM on June 19, 2010

Response by poster: Page Outs should be a relatively small number (I've got 14MB right now). This number will increase the longer the system has been on without restarting but if you've got some large number (maybe 100MB+) that's a good indication that more RAM will help.

OK. I did this. And my page outs is 10.13. GIGS. Ten times as big as what you called "some large number." Does this mean I'm somehow using my computer really, really wrong?
posted by escabeche at 7:12 PM on June 19, 2010

It doesn't mean you're using your computer wrong. Virtual memory exists just for that reason and you aren't going to hurt anything by paging out physical memory to virtual memory.

But it could go a long way to explaining your performance problems. Writing/reading memory to/from the hard drive is just such a slow operation compared to the speed at which RAM itself runs.

With your current system you would probably alleviate some of the problems by keeping fewer programs open but where's the fun in that? I like having all the programs I'm using a command+tab. I usually have Firefox with 50+ tabs open, iTunes or VLC, Adium, Skype, Excel, and Word open, so I accept that I need more than 2GB.

I suspect you'd see a pretty significant performance boost by going to 4GB+ of RAM. If you're getting a new MacBook Pro don't bother upgrading your current one, since they all come with 4GB now (only the white MacBook still ships with 2GB). However if you're going to hold onto your current machine for awhile longer then going to 4GB would probably be a big help.

And one stop-gap until you decide if you're getting a new machine or upping the RAM in the current one is to restart the computer more often. I prob restart 1-2 times a week. It frees up all the RAM that was taken up before a restart, kind of a blank slate, at least for awhile.
posted by 6550 at 9:21 PM on June 19, 2010

Oh, and I think the 10% free space on the hard drive is a good suggestion, too.
posted by 6550 at 9:22 PM on June 19, 2010

When I saw Safari using 1gb of ram that was not its VM footprint, that was much higher. I do know the difference between the various memory usage numbers.
posted by cftarnas at 3:15 PM on June 20, 2010

« Older I need help with what to do at the gym!   |   I went to a party Mom... Newer »
This thread is closed to new comments.