Swap - add during the install or afterwards : and how much would you reccomend!?

hello and good day, :grinning_face:

well: currently install EOS on a ThinkPad x220 with 4 Gigs of RAM
(note: will definintly add more RAM in the winter holiday. but at the moment i do not have time for that:

that said: Setting up swap during installation is pretty common, as it gives the operating system virtual memory to use when RAM runs out,

But how much SWAP would you add here:

keepin in mind that this may help preventing crashes and allowing the installation to complete.
my Friends told me that modern Linux distributions like Debian or (perhaps Arch Too) typically create a swap file by default instead of a dedicated swap partition, but both methods achieve the same purpose. - is this true!?

well - i also could add swap after running the Installation - that is possible too!!? Is there any differende in the procedures!?

Look forward to hear from you
:melting_face:

It is hard to say without understanding your workload. I good default number would be 4GB.

Sure, you can easily add a swapfile.

3 Likes

thank you so much - this helps alot!

There’s been an interesting exchange of thoughts about swap partition, zram and swap file, which may be useful:

1 Like

For a laptop that wants to do hibernation you need as much swap as you have RAM. And if you use a swap file you can easily change swap size at any time.

swap partitions are not that flexible. I would install without swap partition and add a swap file after installation.

It is for sure the easiest and most scalable variant.
But I would expect a better performance on a separate swap-partition, and if hibernate is needed, I think you need a partition. Not sure if a swapfile will do.
Swapsize (on disc) I think, is cheap enough today, so I would not be too savy…

The performance impact is very minimal. Nothing to be worried about for a standard desktop use case.

You can hibernate to a swapfile.

If there is a performance difference it will not be noticeable. I never noticed any performance issue. But if you are concerned about performance you can use zswap in conjunction with your swap file.

No. swap file is fine for hibernation. This is what I use.

Oh, thanks! Never mind…
Next stop I will test this :slight_smile:

Just for clarity, zswap is a kernel feature and at least in officially supported kernels in Arch is enabled by default. If you add a swapfile or swap partition it will be used automatically.