logoalt Hacker News

optionalsquidtoday at 9:26 AM2 repliesview on HN

It also doesn't sound like a particularly good idea on BTRFS, judging by the linked documentation:

https://btrfs.readthedocs.io/en/latest/Swapfile.html


Replies

jeroenhdtoday at 8:10 PM

Swapfiles on BTRFS seem to work great if you allocate them early (with the command linked in your article) and put them in a different subvolume than the rest of your system.

BTRFS in general seems more I/O constrained than ext4 or xfs so it's probably still worse to put a swapfile on a BTRFS partition, but so far my systems are doing fine.

fc417fc802today at 9:38 AM

And since you should probably be running a modern CoW filesystem then you probably shouldn't be using swapfiles ... is the conclusion I arrived at anyway. Either install multiple times more RAM than you need and enable zswap or else set aside a swap partition as has always been done.

show 1 reply