←back to thread

150 points shaunpud | 1 comments | | HN request time: 0.212s | source
Show context
fh973 ◴[] No.45060597[source]
Swap on servers somewhat defeats the purpose of ECC memory: your program state is now subject to complex IO path that is not end-to-end checksum protected. Also you get unpredictable performance.

So typically: swap off on servers. Do they have a server story?

replies(6): >>45060665 #>>45060768 #>>45062143 #>>45062478 #>>45062741 #>>45110791 #
abrookewood ◴[] No.45060665[source]
That's a really good point that had never occurred to me.

Edit: I think that the use of ZFS for your /tmp would solve this. You get Error Corrected memory writing to an check-summed file system.

replies(1): >>45060900 #
yjftsjthsd-h ◴[] No.45060900[source]
ZFS /tmp is probably fine, but swapping to ZFS on Linux is dicey AIUI; there's an unfortunate possibility of deadlock https://github.com/openzfs/zfs/issues/7734
replies(2): >>45061284 #>>45061712 #
cromka ◴[] No.45061712[source]
So maybe another filesystem with heavy checksums could be used? Btrfs or dm-crypt with integrity over ext4?
replies(2): >>45061804 #>>45062874 #
1. Vogtinator ◴[] No.45062874[source]
swapfile on linux must be directly mapped, bypassing any filesystem level checksums (see https://btrfs.readthedocs.io/en/latest/Swapfile.html)