5

This answer says that zswap decompresses pages before writing them to non-RAM swap.

Is there any way to compress the pages written to disk, ideally with lz4?

I hope to:

  • Reduce SSD write wear
  • Reduce swap disk allocation
  • Speed up swap IO (hopefully fewer blocks are written/read to/from disk)
Tom Hale
  • 28,728
  • 32
  • 139
  • 229

1 Answers1

1

The only solution I've found is not using a dedicated swap partition and storing the swapfile in a zfs partition.

Tom Hale
  • 28,728
  • 32
  • 139
  • 229
eadmaster
  • 1,573
  • 4
  • 18
  • 30
  • 1
    [`From kernel 5.0+ btrfs have native swap files support, but with some limitations. Swap file - must be fully allocated as NOCOW with no compression on one device.`](https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F) – Tom Hale May 24 '19 at 11:56