Currently Being ModeratedAug 22, 2011 7:47 AM (in response to hyowoog Kim)
Same problem here. A lot of the old posts on swapfiles are pretty snotty answers from Mac users assuming the person doesn't have sufficient RAM to run their programs.
Here's what I think. OS X Lion is a terrible product on par with Windows Vista.
A couple days ago I had 60GB free on my OS X Lion partition; today there is only 2 GB available. Turns out I too have a bunch of swapfiles built up in VM, which I only found out only by hard restarting, booting back up on my Windows partition, and running a program called WinDirStat (like Disk Inventory X).
Google search seems to agree that restarting in safe mode (hold down Shift key) and then restarting your computer normally should flush out the swapfiles (I'm going to try it once I'm finished working).
I'm wondering if the only way to prevent it from happening again is to disable auto-restart of programs in your System Preferences (a horrible feature by the way)?
Currently Being ModeratedNov 8, 2011 12:38 AM (in response to Fragmintz)
I just discovered the same. Starting up in safe mode, however, is not an option for me, because it kind of freezes after a while. At a certain point the grey beam stops and the starting up doesn't proceed anymore. I then have to make a hard reset to start my MBP in normal mode. Is there any other option to get rid of that junk?
Currently Being ModeratedDec 7, 2011 2:21 PM (in response to hyowoog Kim)
Same problem here on two computers. 2010 Mac Pro running Lion on a 60 gig OWC SSD with 10 gigs of RAM. 2010 Mac Book Pro running Lion on 60 gig OWC SSD with 4 gigs of RAM. So far only safe starting has worked.
Currently Being ModeratedDec 7, 2011 7:55 PM (in response to FCPXUSER)
When you start a Mac, it deletes all the swapfiles and re-creates the first one at 67 MB.
As/if more are needed, they're created "on the fly," and each is twice the size of the previous one, so they can get large fairly quickly.
A few aren't a problem; many may be. The usual cause is running more apps than your Mac can handle easily.
But another cause is an app with a "memory leak." That means when it's done with a chunk of memory, it doesn't tell OSX, so OSX can't "release" it. When the app needs more space, OSX assigns it a different chunk instead of reassigning the old one. Those chunks all take memory -- once the real memory is used up, it gets swapped out to virtual memory.
You may be able to figure it out by Restarting, but don't start any apps. If any start automatically, quit them temporarily.
Start the Activity Monitor app, in your Applications/Utilities folder, click the System Memory tab towards the bottom, and watch the Swap used figure at the bottom as you start one app and use it normally for a while. Then start another. When you see the Swap used begin growing rapidly, you may have found the culprit.
Note that Activity Monitor has pretty good basic explanations of things in the Help.
Currently Being ModeratedJun 2, 2012 11:32 PM (in response to hyowoog Kim)
This is a repost from another related thread. The problem gets reported in many places, but no-one ever joins the dots to illustrate that it is fundamental memory management bug in the OS.
This is an on-going and serious OS X bug. It is NOT confined to Lion, although that may have made it worse for some people. I experienced ths problem with Snow Leopard as well.
The problem is not with any particular apps, although it may start there. You can shut everything down on the system, and the swap will still not be freed. That's an OS X problem, because the processes that generated any memory leak have gone away, but OS X doesn't want to know.
The other symptom you will see is that the system will slow down dramatically, because activitymonitord is chewing up increasing percentages of CPU. I have seen activitymonitord running at over 40% of a CPU. That's impressive, and that was on Snow Leopard.
Apple needs to fix this, but they don't seem to be interested.