[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Swap



> How much swap space does 4GB ram ideally requires?

RAM doesn't require sap space.  It's the lack of RAM which does.
There are typically 2 cases where you "lack" RAM:
- when you're using more memory than you have.  This was historically
  the justification for the "2x" rule, but nowadays it's fairly unusual
  to lack RAM on a laptop/desktop computer.
- when you want to turn off the RAM (aka "hibernate").

> I mean, is it okay if I use 1 GB of swap space (or lesser) for a 4gb
> RAM ?

Yes, it's probably perfectly sufficient for normal use.

But it probably won't be sufficient if/when you try to hibernate.

What I do:
- use LVM.
- allocate swap as an LVM volume.
- grow swap on the fly if/when it proves insufficient.  So far,
  I did bump into a "can't hibernate" situation on an 8GB machine with
  a 4GB swap, so my 8GB machine has 6GB of swap currently.


        Stefan


Reply to: