Slashdot Mirror


How Big Should My Swap Partition Be?

For the last 10 years, I have been asking people more knowledgeable than I, "How big should my swap be?" and the answer has always been "Just set it to twice your RAM and forget about it." In the old days, it wasn't much to think about — 128 megs of RAM means 256 megs of swap. Now that I have 4 gigs of RAM in my laptop, I find myself wondering, "Is 8 gigs of swap really necessary?" How much swap does the average desktop user really need? Does the whole "twice your RAM" rule still apply? If so, for how much longer will it likely apply? Or will it always apply? Or have I been consistently misinformed over the last 10 years?

5 of 900 comments (clear)

  1. Re:separate partitions for / and /home by cayenne8 · · Score: 1, Troll
    "Is there any point to separate partitions for / and /home? I mean, if you were running different file systems on each of them I could see the point."

    I was wondering the same thing. I usually like to have 3 partitions...one for swap, one for / and one for /boot.....since I usually used something simple for boot like ext2....and reiserfs for /.

    --
    Light travels faster than sound. This is why some people appear bright until you hear them speak.........
  2. Re:What Has Changed? by Anonymous Coward · · Score: 0, Troll

    We really need an "idiotic" moderation...

  3. Re:Here's how big by TheLink · · Score: 1, Troll

    "taking a properly configured machine down"

    So what do you set your postgresql limits to? Firefox often uses more than 256MB.

    With 256MB process limits, 20 fat apache processes with the same php app bug and you could still hit gigs of swap and the very problem I mention - unresponsive machine - "swap death".

    My way doesn't take as much guessing (how much will this ever use reasonably etc) and works well enough.

    NOTE: I also turn vm overcommit off- because I prefer apps to run out of mem, rather than the Linux oom killer killing them (I believe freebsd also overcommits by default).

    I prefer putting up with a theoretically slightly lower performance (less disk cache) as a trade off for a more graceful failure mode where the system continues to stay up. The machine may get sluggish (to a controlled degree), but it doesn't become unresponsive.

    Maybe I don't trust "modern" kernels as much as you do. FreeBSD, Linux, Windows whatever, they're all buggy.

    You can call it poor configuration if you want. So far it has worked well enough for me.

    --
  4. Re:What Has Changed? by Snaller · · Score: 0, Troll

    "Yeah, your 256MB of space was trivial when you had a 30GB hard drive ... and 8GB of space is still trivial with a 750GB hard drive. "

    Its trivial if YOU buy us one.

    --
    If Google really cared they would fix Android Chrome to reflow text, instead of discriminating
  5. Solid state drives suck by Snaller · · Score: 0, Troll

    (and stop modding down people you don't agree with)

    I was excited when i bought one, only to find its not very good, Windows stutters and freezes and is not a fast machine.

    The claim is that it would last about 170 of normal use - but now everybody (like you) are saying ooh, you can't write on it because that will wear it out.

    Blaa

    --
    If Google really cared they would fix Android Chrome to reflow text, instead of discriminating