Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dborod

macrumors regular
Original poster
Jul 22, 2002
163
82
I've got a 2011 iMac with 16GB of RAM.

I tend to keep a lot of programs open, but I don't run any rendering/scientific applications that use a ton of RAM.

After a day or so of uptime, there's always 1 few MB of space used for swap, and while it doesn't directly impact me, my latent OCD wants the purity of no swapping going on.

Does anyone know how to discover which process is causing the machine to go into swap?
 
Are you paging in or paging out? Paging in is pretty much unavoidable and not a big deal. Paging out is what slows down your computer.
 
Mac OS is not windows. Swap memory or virtual memory is NOT a result of not enough ram. Mac utilizes what you have to its fullest. If you have 32GB ram it will still use a lot of VM. Basically everything that is available will be used and it will let go as its needed.
 
I disabled virtual memory or the swap files on my computer a while back because of the constant thrashing of my hard drive. Since then, it doesn't do it anymore even with the 8gb of memory installed. I just followed the instructions here. http://hints.macworld.com/article.php?story=201106020948369

Untitled2.png
 
Last edited:
Are you paging in or paging out?

Paging out. The way I understand it, OS X allocates a 64 MB swap file at boot time, and then allocated additional files as needed.

Typically, my machine will allocate an additional file and page out about 3 or 4 MB.
 
I'm now on lion and it still works, just type it in terminal and reboot. You can always revert it by changing to load from unload in this script.
Code:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
 
Are you using Safari? If so, it eats memory for lunch and then moves on to your HD for dessert.
 
Are you using Safari? If so, it eats memory for lunch and then moves on to your HD for dessert.

Yes, I'm using Safari. Both the "Safari" and "Safari Web Content" processes are 64-bit, so they ought to be able to make use of way more than 2 GB of RAM before using swap space.

I'm still curious to know which process is using the swap...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.