In defence of swap: common misconceptions (2018)
chrisdown.name
chrisdown.name
There is some interesting stuff in newer kernels - like multigenerational mru [1] and that le9 patchset [2]
Am I missing something? If you have full control over the memory usage this might be useful for the mentioned usecase but for a general purpose machine this doesn't work?
1: https://patchwork.kernel.org/project/linux-mm/cover/20210818...
Funnily enough, I mostly suffer from thrashing today, on Mac, especially with chrome. And it's mostly with compressed memory, though overzealous nature of swapping in macos doesn't help.
That's a key argument, but it ignores that swap changes a read I/O to a write I/O - on HDD write is much slower (this is acknowledged in the article), and SSD have a write limit (this is not ack'd).
I know all SSD manufacturers these days say their limit is high, but I'm still a bit leery.
Manufacturers always say the write limits are very high despite using less durable tech, and I am not sure I believe them.
When my system got thrashing (droping hot pages) due to memory pressure in a limited cgroup, i see continuous 400MB/s disk read traffic (as pages are read and then dropped), but the rest of system (outside the cgroup) is usable. But when i do some big file copying, the SSD sometimes causes multi-second system freeze due to locked SSD I/O.
Also, the write limits are pretty tight. Recently, i replaced my SSD after just 6 years of light use, because it reported average sector overwrite rate to be ~3300 of 3000 nominal lifetime. And current TLD and QLD SSDs have these limits even smaller.
Call it an early Christmas/Birthday gift, and be done with it. Life is too short to wait for Firefox to page back into main memory