Swapfile vs Swap partition vs no swap at all?

This is always an eternal topic of debate. Installers usually offer to create a swap partition.

I’m using a SSD with BTRFS and I’m torn between using a swap parition, a swapfile and zramd. Which would you suggest for gaming and day-to-day use?

That post was from 6 months ago, systemd-swap was deprecated during that time. :wink:

Is it a laptop you need to hibernate and how much ram do you have?

It’s a desktop, I don’t need hibernate (never seen the point of it really) and I have 8Gb RAM.

I would first try zram for that use case and amount of ram.

The good news about swap, is that you can always try it one way and change it later.

1 Like

I have previously used zramd which worked ootb, is this the best way to do it?

I am using zram-generator but I don’t know that it makes a huge difference which method you choose. I have not used zramd so I can’t compare them for you. I would use whatever you are comfortable with.

how do you get zram-generator to work? Could you give the [very] basic steps?

Everything is explained here in great detail. It does require a bit of patience to read through it all, but it’s explained in fairly simple terms:

Thanks but I think I’ll stay with zramd, I don’t want to manually configure too much incase it breaks. I have a git repo with a script which sets everything up as I like it incase I ever have to do a reinstall. As I’ve found out over the years, one typo can cause so many headaches.

2 Likes