This website contains age-restricted materials including nudity and explicit depictions of sexual activity.
By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.
I prefer swap files over swap partitions, because it makes it my partition layout simpler to manage.
If your using a swap partition, make sure it’s located on an encrypted partition, else it exposes data stored in RAM (encryption keys etc). With SSD’s it’s difficult to make sure this data is actually deleted, even after overwriting.
My preferred setup for a long time was LUKS with btrfs on top. Then subvolumes for
/
,/home
and the swap file (+ /var/cache, /var/log etc.). This gives me peace of mind nothing is unencrypted except /boot.Nowadays I simply use zram, which allows for a small part of RAM to be compressed for swap. It’s great, simple to setup and performs well. Imo it should be default for all desktops.