On Mon, 05 Nov 2018 11:07:12 -0500, "Austin S. Hemmelgarn" said:Actual swap usage. About 16 months ago, I had been running a couple of Intel NUC5PPYH boxes (Pentium N3700 CPU's, 4GB of DDR3-1333 RAM) for some network prototyping. On both, I had swap set up to use a file on BTRFS via a loop device, and I made a point to test both with LZ4 inline compression and without any compression, and saw negligible performance differences (less than 1% in most cases). It was, of course, significantly worse than running on ext4, but on a system that's so resource constrained that both storage and memory are at a premium to this degree, the performance hit is probably going to be worth it.
Performance isn't _too_ bad for the BTRFS case though (I've actually
tested this before), just make sure you disable direct I/O mode on the
loop device, otherwise you run the risk of data corruption.
Did you test that for random-access. or just sequential read/write?
(Also, see the note in my other mail regarding doing a random-access
write to the middle of the file...)