Find the answer to your Linux question:
Results 1 to 5 of 5
I'm going to re-install SuSE on my laptop. I have 512MB of RAM but I don't have a lot of HD space to allocate to Linux. How important is it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2002
    Location
    Salt Lake City, UT
    Posts
    4

    Setting up Swap space - Do I really need it to equal my RAM?


    I'm going to re-install SuSE on my laptop. I have 512MB of RAM but I don't have a lot of HD space to allocate to Linux. How important is it to have a large swap size with my 512MB of RAM? I've heard you should set it to twice as large as your RAM but I can't give up this much space. I had it set to 512MB before. Can I skimp on the swap (maybe 256MB) to save space for the OS or is this not a smart thing to do?

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    The important thing with swap is that swap size + RAM size = total memory. Then, it's basically up to you to decide how much memory you really need. Most systems don't even need 512 MB. I also have 512 MB RAM, and I'm using a 128 MB swap partition, which is seldomly used at all. I would manage fine without it, but I like having it as a buffer.

  3. #3
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    I agree, the saying "you need 2x your ram" is dumb. I have worked with many servers with 4GB of ram and would never use a 8GB swap. Plus what if you are working with a box that has 32MB of ram, I sure would want more then 64MB of swap.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Exactly, but that last part is also pretty relative. My servers at home have 32 MB, and I've just put in a swap of about 40 MB or so, and they run just fine. Most of the time, they don't even need the swap.
    It really depends on how much memory you need. So if you're going to use, say, GNOME2 with the latest version of nautilus running on the best graphics setting, combined with like evolution and five mozilla windows, you're going to need at least 200 MB of total memory. If you're going to run a (norma; at homel) server, you usually don't even need 128 MB.
    In devhen's case, I'd say that probably he won't even use his swap , but it's always nice having a buffer to fall back on, just in case. Like I said, I also have 512 MB in my workstation, and I almost never need the swap.
    I think that "twice your RAM size" comes from an old suggestion, and is meant for low-mem machines, such as those with 32 MB. I think the paging algorithms are somehow optimized for that.

  5. #5
    Just Joined!
    Join Date
    Aug 2002
    Location
    Salt Lake City, UT
    Posts
    4
    Thanks guys, for clearing that up. I think I'll set my swap to 64 or 128 megs and that will save me some disk space.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •