Startup disk almost full again?!
May 3, 2008 8:12 PM   Subscribe

Why would my Powerbook's virtual memory top 20Gb?

I have 21Gb free on my 100Gb hard drive, and sometimes I still get the message "Startup disk almost full." This happens when I'm doing ordinary things like Safari, Mail, and/or Microsoft Word for an extended amount of time. When I reboot, it resets, but I still wonder if something is going haywire.

It also seems like my computer has been running hotter than usual lately. I'm using Mac OS X 10.4.11 on the last generation of Powerbook G4.

I've looked at this post, but it didn't exactly pinpoint the problem.
posted by luazinha to Computers & Internet (14 answers total) 1 user marked this as a favorite
Probably some program you're running is using an ever-increasing amount of memory as it runs (usually because it forgets that it allocated stuff and so it doesn't ever deallocate it — this is a "memory leak"). For me, the usual culprit is Firefox; I suspect that it's Flash content in particular (ads or youtube) but I haven't really checked. You can try quitting and restarting each of the applications you're running to see if it frees up a bunch of disk space — the OS will free up all the memory associated with a given program when you quit it, even if that program has forgotten about it. My guess would be either Safari or Word.

It's also possible that some program is creating a bunch of temporary files and not cleaning up after itself; these will generally all get cleaned up when the system is restarted, so that would also explain what you're seeing.

You can check a process's virtual-memory use from the terminal, but there's probably also some spiffy point&shoot GUI way to do it, which maybe someone else will post…
posted by hattifattener at 8:28 PM on May 3, 2008

Some versions of Firefox are notorious for leaking memory.

It's possible to place a ceiling on how much virtual memory space Windows allocates on the hard disk. Once that ceiling is reached, any program trying to allocate more bags it and is shut down. When it happens, you'll get told.

The way it's done varies depending on the version of Windows you're using.
posted by Class Goat at 8:42 PM on May 3, 2008

It's Mac OS 10.4.11, Class Goat, not Windows.

there's probably also some spiffy point&shoot GUI way to do it, which maybe someone else will post…

It's called Activity, and you'll find it in Applications/Utilities. It'll show you all kinds of things about CPU, memory and disk usage, in addition to allowing you to force-quit processes that are no longer responding, as Safari sometimes does.
posted by mumkin at 8:51 PM on May 3, 2008

I might add that RAM is awfully inexpensive these days. If your Powerbook isn't already sporting 2 Gigs of RAM, you can make it happen for about $50. It won't solve your memory leak problem, if that's what it is, but it'll go to disk that much less, which'll speed response times up and potentially reduce temperatures.
posted by mumkin at 9:01 PM on May 3, 2008

Don't worry about it. It doesn't matter, OS X is ridiculously generous on assigning virtual memory to applications and widgets, even if it will never ever use it. All you should look at there is your physical memory usage and page ins/outs which would seem reasonable for your usage. You can track memory leaks and resources hogs via their physical memory usage.

For reference, my OS X machines w/ 3GB of RAM and 28GB of free hard-disk space is using 2.5GB of RAM and 57.73GB of Virtual Memory.
posted by cgomez at 9:08 PM on May 3, 2008

Whoops, missed the point of the question. Use a program called "DiskInventory X", which can help you track down hard-disk hogs, specifically, you can run it when you receive "startup disk full" and see if there is a leak or bug. The VM page files are stored in ~\var\vm (not accessible through Finder normally) and see how much it's actually using.
posted by cgomez at 9:14 PM on May 3, 2008

Sorry, I saw "Powerbook" but read "Thinkpad". (I'm not doing very well today.)
posted by Class Goat at 9:56 PM on May 3, 2008

Thanks for the answers so far. I've been using activity monitor and fiddling around with safari in order to try to get it to happen. I have multiple youtube windows and my netvibes open. Maybe I'll be able to figure out exactly where the memory leak is happening.

But supposing that I find out that its Safari, is there anything that I can do about it except for stop using the problem? I swear there was a specific moment 3 weeks ago or so when my computer started to have performance problems (probably as a result of heat) after this happened.

I have 1.5 Gb of memory. Would upgrading to 2 gigs make a big difference?
posted by luazinha at 5:07 AM on May 4, 2008

'it's' and 'the problem application,' I mean.
posted by luazinha at 5:09 AM on May 4, 2008

Memory leaks in a given app just cause that app to consume ever-increasing amounts of memory (and eventually disk space, via the virtual memory subsystem) for as long as it's left running. The workaround for a memory leak is to restart the leaky app before it uses up enough memory to cause disruption. Rebooting works because it restarts everything, which is generally overkill. Just restarting the leaky app is enough.

Upgrading from 1.5GB of memory to 2GB would make a leaky app take 33% longer to start using up virtual memory space on disk, but would not fix the leak. You'd still need to restart the app every so often.

OS X is particularly susceptible to memory leaks because the default behavior is to leave everything running even after its last window has been closed, which means you tend to end up with a lot of processes running even if you don't seem to be doing many things at once. If even one of those is leaky, you will eventually see the behaviour you describe. If you get in the habit of actually shutting down apps you've finished working with, the way Windows or Linux does by default, you will probably never notice the leak again.
posted by flabdablet at 5:27 AM on May 4, 2008

It's possible that this has been happening all along, but that your hard disk previously had enough free space to accommodate it. Maybe cleaning up the disk and freeing up space would make the problem "disappear". Especially if you can't figure out what's causing the high memory usage.
posted by gjc at 6:54 AM on May 4, 2008

I have 1.5 Gb of memory. Would upgrading to 2 gigs make a big difference?

Going from 1.5 to 2 GB of RAM would do something for you, obviously, but it probably wouldn't be spectacular. Not, say, like going from 512MB to 2GB would. This is a 15" DDR2 Powerbook? If so, those have two RAM slots, and yours would have a 512 and 1 GB stick installed. Putting in 2 identical 1GB sticks would do more than just up your available memory by 512MB, because paired DDR2 is faster.

I swear there was a specific moment 3 weeks ago or so when my computer started to have performance problems

Are you, by any chance, running Growl with the Growl Safari plugin? Growl Safari, Safari 3, and 10.4.11 were a deadly combination for me. Removing Growl Safari made all the difference in the world, performance-wise. Took me a long while to figure out that was my problem, but oh! what a relief.
posted by mumkin at 10:00 AM on May 4, 2008

Interesting. So I followed cgomez's advice and used Disk Inventory X. Right now I'm down to 16 gigs from 21, so I wanted to see where the other 5 went. In ~var/vm/ the only large file is the sleepimage, which is 1.5 gigs (a snapshot of the RAM, I assume). But what about the other 3.5 that have just disappeared and will, I suspect, return once I reboot? Is a separate sleepimage created every time I close the computer with an application running? Is there something I can do about runaway sleepimages?

Thanks again, all.
posted by luazinha at 11:29 AM on May 4, 2008

Oh, and mumkin, I'm not using Growl/Growl Safari.
posted by luazinha at 11:30 AM on May 4, 2008

« Older How can do I do those crazy card tricks?   |   Tear apart my songs! Newer »
This thread is closed to new comments.