Optimum swap file size?

Discussion in 'Mac Basics and Help' started by Desperado, Sep 3, 2006.

  1. Desperado macrumors newbie

    May 10, 2005
    Hello folks

    Since my Safari tends to show me the spinning ball very often recently I asked myself if I could somehow optimize the way MacOsX assigns memory.

    As far as I know the system creates swap files with ~80 MB in size if necessary. My question is if there is an optimum allocation size for people with 1.25 GB Ram.

    Thanks for your admittance
  2. CoMpX macrumors 65816


    Jun 29, 2005
    New Jersey
    OS X does a very good job of managing the swap file and RAM by itself.
  3. ManifoldSky macrumors newbie

    Jun 15, 2009
    Umm, what on earth are you talking about?!?

    Normally I wouldn't kick such a long-dead horse, but this subject really gets under my skin.
    Although OS X is great at any number of things, VM management is most certainly NOT one of them. OS X has always had crappy VM management, and that has not changed in Leopard.
    In particular, OS X's routines for freeing up swap files is atrocious, and forces otherwise unnecessary reboots on a regular basis if you happen to use apps that need huge amounts of memory resources. Upon quit, OS X will SOMETIMES release SOME of the swap memory, but mostly tends to just hold on to it. No amount of quitting apps can rectify this. I can run a particular app, say kJams, that needs huge amounts of memory, and then quit it, and every other app I am running, let the machine sit for 24 hours, and I will still have 8 swap files. This is NOT due to bad system configuration. The same thing happens on several machines, on machines with clean installs, with 4 GB of RAM, etc..
    Again, VM management in OS X is NOT something to brag about.
  4. Consultant macrumors G5


    Jun 27, 2007
    FALSE. OSX is UNIX, server grade. Works much better than windows.
  5. portent macrumors 6502a

    Feb 17, 2004
    I'm pretty sure OS X's virtual memory is optimized for performance, not for efficiency.

    Think about it. You launch a big program. OS X hangs while it prepares a new swap file. You quit that program. OS X hangs while it consolidates and frees up the swap file. You launch another big program. OS X hangs while it prepares a new swap file. Repeat.

    A better approach (from a speed, not efficiency) perspective is to just leave the swapfile in a ready state, since [so the logic goes] if you've needed that much space before, you'll probably need it again soon.
  6. davecotter macrumors newbie

    Sep 13, 2007
    the kJams memory hogging bug has been fixed, by the way

Share This Page