I’ve heard a lot of people say your swap should be 2x RAM… but do I really need 32GB of swap?

  • eh@nerdbin.social
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    1 year ago

    On a desktop or especially laptop case, it should be equal to (or larger than) your RAM if you use hibernation (as RAM gets copied to swap during hibernation)

    On my server, I set it up to be 2GBs, mostly arbitrarily. Right now it’s at 500MB, but my main memory is also only 600-800MB full out of the total 4GBs available, so I’m not running out of RAM anytime soon.

    Swap behavior seems to have changed a while ago, so consider reading https://chrisdown.name/2018/01/02/in-defence-of-swap.html on how it works right now. Hell, even that might be outdated nowadays. Up to date info on how swap works really seems hard to come by.