Earlier quoted context omitted.
This issue is much worse if you don't have swap. What happens, I think, is that as memory allocated by processes grows to fill the available RAM, it starts to push out memory that doesn't technically need to be in RAM, like cached file pages. Which accounts for some of the slowdown, until it reaches the code itself, which is 'just' a memory mapped file. So eventually most of the code that is actively trying to run is…
Yes, but the problem, I feel, is the priority of what gets pushed out to RAM on Linux. You could split the processes into 2 categories: 1: applications that are doing tasks the user wants. 2: OS processes that the user needs to interact with in order to terminate applications. There is an argument for applications taking priority: the user wants to do a task, if you move application out of RAM, the task is going to t…
And yeah, you can adjust the priorities and the latency/throughput tradeoff (even per-application to some extent), but it's a difficult thing to get right in general (what works for one use-case might make another a lot worse). I don't know of any DE that really tries to adjust this, though (not because the kernel can't, but probably because no-one on the DE side has really prioritised it or they have tried and it hasn't made a noticable difference).