3 ms·
On Linux there are also zswap with a compressed cache in front of the real swap. Depending on workload either zram or zswap may work better under the memory pre
by _0w8t 5y ago
On Linux there are also zswap with a compressed cache in front of the real swap. Depending on workload either zram or zswap may work better under the memory pressure.
Also, there is a matter of the compression algorithm selection. With modern kernel using anything but lz4 or zstd is rather suboptimal.
But then again I have Samsung 980 PRO SSD in my laptop and with it I just disabled memory compression and use the real swap. The read speed is like 2 times faster then lz4 decompression and while the write speed is like 3 times less than lz4, it does not tax CPU which is a big bonus when I compile a big C++ project that does occasionally triggers the need for SWAP even with 32 GB of RAM.