16 GB and still swaps

Discussion in 'Mac OS X Lion (10.7)' started by dborod, Jul 26, 2011.

  1. dborod macrumors regular

    Jul 22, 2002
    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?
  2. iThinkergoiMac macrumors 68030

    Jan 20, 2010
    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.
  3. gentlefury macrumors 68030

    Jul 21, 2011
    Los Angeles, CA
    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.
  4. nathantm, Jul 26, 2011
    Last edited: Jul 26, 2011

    nathantm macrumors newbie

    Jul 26, 2011
    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

  5. dborod thread starter macrumors regular

    Jul 22, 2002
    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.
  6. dborod thread starter macrumors regular

    Jul 22, 2002
    Any idea if that still works on Lion?
  7. nathantm macrumors newbie

    Jul 26, 2011
    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.
    sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
  8. CapnJackGig macrumors 6502a

    Jul 17, 2011
    Are you using Safari? If so, it eats memory for lunch and then moves on to your HD for dessert.
  9. dborod thread starter macrumors regular

    Jul 22, 2002
    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...

Share This Page