Given that the 5.2 kernel branch is now marked EOL, I've switched to 5.3 as of the most recent major update, and one thing that stands out right away is that my system has now begun swapping far earlier than before, and in far greater quantities too. This machine here has 8 GiB of RAM installed, and I'm only keeping the same applications open as I normally do, which are...
- Claws Mail (for Usenet access only)
Apart from the above, my biggest memory hog is most likely the Chromium browser, but I don't have that open all the time.
With the 5.0, 5.1 and 5.2 kernels, I would occasionally get about 256 to 512 KiB of swap (and peaking at about 10 MiB) if I were looking at a few heavy websites ─ e.g. store.kde.org, or a thread with many embedded YouTube videos at one of the forums under my care. But ever since I started using kernel 5.3, I am regularly seeing up to 300 MiB of swap in use ─ right now it's at 221 MiB again, but just a few minutes ago it was over 330 MiB.
Don't get me wrong: the swapping doesn't appear to have any impact on performance that I can tell ─ everything's still snappy as ever. But my swap partition is on an SSD, and therefore I consider swapping undesirable for the lifetime of the SSD. I know, modern SSDs can take quite a beating in terms of their write cycles, but I'd still rather avoid it if possible.
The weird thing is that I have
vm.swappiness set to "0" ─ yes, I know that's recommended against, but on a machine with 8 GiB of RAM, it shouldn't pose any real hazard ─ and I also have
vfs.cache_pressure set to "200".
Did anything change between kernel 5.2 and 5.3 on account of the settings for reducing the tendency to swap, or is there perhaps another player involved ─ (cough)
systemd (cough)? ─ that decides whether things should be swapped out?
All I can say in that regard was that my previous machine ran PCLinuxOS ─ which does of course not use
systemd ─ in only 4 GiB of RAM, and that, with the same applications open as I am using now, it was extremely rare for me to hit swap on that machine. So why do I now have a quarter of a Gigabyte worth of data in my swap, on a machine with twice the amount of RAM that my previous box had?