On Sat, 2023-04-01 at 06:16 +1100, Michael Chapman wrote: > On Fri, 31 Mar 2023, Lennart Poettering wrote: > [...] > > Presumably your system mmaps ELF binaries, VM images, and similar > > stuff into memory. if you don't allow anonymous memory to backed out > > onto swap, then you basically telling the kernel "please page out > > my program code out instead". Which is typically a lot worse. > > Yes, but my point is that it _doesn't matter_ if SSH or journald or > whatever is in memory or needs to be paged back in again. It's such a tiny > fraction of the system's overall workload. That contradicts what you said earlier about the system actually writing a significant amount of data to swap. If, when swap was enabled, the system wrote a large amount of data to the swap, that implies there must be a large amount of some other data that it was able to keep in memory instead. Linux should not write all information from memory to swap just to leave the memory empty and without any useful content - everything written to swap should correspond to something else kept in memory. So if you say that the swap use was overall harmful for behavior, claiming that the *size* of other data kept in memory was too small to matter doesn't really make any sense. If the swap use was significant, then it should have kept a significant amount of some other data in memory, either for the main OS or for the guests.