Swap, ZRAM, Zswap and Hibernate on NixOS

(blog.matthewbrunelle.com)

21 points | by speckx 4 hours ago ago

3 comments

  • gucci-on-fleek an hour ago

    I agree with everything else here, but swap files on btrfs should probably be avoided whenever possible [0].

    [0]: https://btrfs.readthedocs.io/en/latest/Swapfile.html

    • ciferkey an hour ago

      Right, you are good to do swap files on btrfs since linux 5.0 or so as long as you follow some rules. Disko thankfully covers all those details for you, but I shouldn't have skipped over that in the piece. I'll make an update when I get a chance.

  • eccgecko 2 hours ago

    Thanks for this. So weird though - I literally spent the better part of the weekend reading and learning all about the differences between zram and zswap and ultimately deciding to switch out my previous zram config for zswap on my NixOS system! So seeing this pop up on my hackernews feed felt a bit spooky…