logoalt Hacker News

Kim_Bruningtoday at 8:16 AM4 repliesview on HN

Every rule has an exception. Beware of this advice on zfs, for instance.

Meanwhile zswap (of no relation with zfs) is free performance. Is it a rule that everything starting with a 'z' must be cool?


Replies

jenderstoday at 9:36 AM

That’s a good call out. I’ve never used ZFS on root. Been a ZFS user on Linux since the FUSE days but it has never seemed particular well suited (O_DIRECT support came late, ARC/page cache redundancy, etc). I can’t guarantee a consistent enough workload to optimize ZFS for and I don’t feel like it’s general purpose enough. Large object storage though? I’m sitting on a PB of ZFS.

jck86today at 9:50 AM

zswap indeed is the real magic almost silver bullet nowadays. Device backed swap is often not needed anymore and it solves a lot of the issues with freezing under memory pressure, though it may not be ideal for servers.

And if I have a separate otherwise unused ssd then using a swap partition simply is easier than creating a file system for it and mounting it somewhere. Block level backups also are easier.

What would be nice about swap files is if they could dynamically grow and shrink without a special setup.

Way too many variables on Linux for a one size fits all.

optionalsquidtoday at 9:26 AM

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

show 1 reply