The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    I have 3GB of ram, do I need a swap partition ?

    Discussion in 'Linux Compatibility and Software' started by wearetheborg, Jun 22, 2008.

  1. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    I have 3GB of ram, do I need a swap partition ? This is for a 32bit OS.
    If more than 3GB of ram cant be addressed by the OS, is there any use for swap ?
     
  2. bmwrob

    bmwrob Notebook Virtuoso

    Reputations:
    4,591
    Messages:
    2,128
    Likes Received:
    0
    Trophy Points:
    55
    I don't actually know for sure, but would guess probably not. Because most of the distros people use install so easily and almost automatically, I'd use it anyway unless hdd space is short, just to make sure the install goes smoothly.
     
  3. dougbrad82

    dougbrad82 Notebook Consultant

    Reputations:
    69
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    30
  4. sesshomaru

    sesshomaru Suspended Disbelief!

    Reputations:
    316
    Messages:
    1,918
    Likes Received:
    1
    Trophy Points:
    56
    Um, but isn't the OP referring to Linux? :confused:

    @theborg:

    A swap partition is necessary if you are using Suspend to Disk. In such a case, it has to be at least the size of your RAM. Otherwise, you could do without it in theory, but I usually keep aside a 1GB swap partition anyways.
     
  5. zephyrus17

    zephyrus17 Notebook Deity

    Reputations:
    646
    Messages:
    1,576
    Likes Received:
    0
    Trophy Points:
    55
    Yeah.. Like sesshomaru said. I have 2Gb of RAM, and just assigned the minimum 256Mb to swap, thinking that my RAM will more than handle it. But if you want to hibernate, you need swap >= your RAM. In your case, 3Gb of swap or more.
    If you don't use hibernate, then the minimum 256Mb is good enough.
     
  6. srunni

    srunni Notebook Deity

    Reputations:
    96
    Messages:
    854
    Likes Received:
    0
    Trophy Points:
    30
    The general rule has always been to have 2x as much RAM as swap. But if you have 2GB+ of RAM, you're probably fine with the same amount.
     
  7. zephyrus17

    zephyrus17 Notebook Deity

    Reputations:
    646
    Messages:
    1,576
    Likes Received:
    0
    Trophy Points:
    55
    2x more swap? Why so much?
     
  8. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    This is the default general rule and has worked well for me for the past 15 years or so.

    If you profile your memory usage, you can certainly decide to use less or even no swap at all (on Linux anyway). In the past, I've equipped servers with enough RAM that swap was unnecessary. That was the whole point: give enough RAM so that the server would do everything it needs to without having to swap: better performance overall.

    I have 2GB in my current laptop with a 4GB swap... and I've used the swap sometimes. It all depends on how much you use your computer. For my wife's laptop, which has 4GB RAM (she does not need 4GB but the laptop came with it), I've created 4GB swap so that she could hibernate the laptop if she wants. She does not use her laptop in such a way that 4GB will ever be fully used so more swap would not make any sense.
     
  9. FFZERO

    FFZERO Notebook Evangelist

    Reputations:
    23
    Messages:
    321
    Likes Received:
    1
    Trophy Points:
    31
    If you are planning to use hibernation then you would need a swap equal to your ram. Or, if you know that you will never exceed x amount of ram than use x.
     
  10. pixelot

    pixelot Notebook Acolyte

    Reputations:
    3,732
    Messages:
    6,833
    Likes Received:
    0
    Trophy Points:
    205
    Well, I guess I nailed it right on. :D
     
  11. Thomas

    Thomas McLovin

    Reputations:
    1,988
    Messages:
    5,253
    Likes Received:
    0
    Trophy Points:
    205
    Just make a 256MB one, it really improves performance(I noticed, even if I didn't touch the swap).
     
  12. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    I have two gig swap with 3 gigs ram. I monitor swap usage with conky, and I do hit the swap file during large file transfers, for example I copied over 9 gigs of music and photos/videos and it hit the swap file. You don't want to go without one.