You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

after lion upgrade, swapfile filling up HDD

macbook-pro 2010 mid

ram : 8G,

HDD : 120G SSD, 320G SATA


my ssd's free space : 47GB


after lion upgrade, swapfiles eat my HDD space.

when i booting mac, first time no vm.

a few minuts later created vm.

about a hour after in directory /private/var/vm

swapfile0

swapfile1

swapfile2

swapfile3

swapfile4

swapfile5

.

.

swapfile40

swapfile41...


swapfile's size 1GB


waht happend?

what can id do?

help please...

MacBook Pro, Mac OS X (10.7), SSD 120GB, 8G Memory

Posted on Jul 28, 2011 6:02 PM

Reply
7 replies

Aug 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)?

Dec 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.

Jun 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.

after lion upgrade, swapfile filling up HDD

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.