Comment by kryptiskt

3 days ago

It's a broken idea, throughput über alles isn't true of an interactive system, latency matters. There's a calculator app I use every now and then. Linux always thinks it's a good idea to swap it out since I'm not using it all the time, which means that every time I want to calculate something there's lag as it's swapped in again.

No sorry, its not a broken idea: throughput über alles is true of high-throughput-demanding systems, but latency matters is also true, for latency-demanding systems, and the two use cases represent - in an industrial sense - a very vast array of values. It's not really either/or - you are indeed identifying a knob that needs to be turned, in your particular use-case, on your particular system. There is no one-size fits all: it's a knob.

Another aspect I'd wonder about for relatively simple tasks is just freeing it from memory and being prepared to pay the cost of loading it again, it's probably already on disk. Latency matters, but it seems there will be limits especially considering the transfer speed and latency improvements we've seen to storage commonly installed in most systems over the past 15 years or so.

Then comes the challenge of deciding what processes/data to free or page, whether that's flagged by the system as it's running or at coding/compile time. And that seems similar to the issue of picking a swap strategy for a distro/OS, which will depend on the user's demands or system, setting a good default and exposing how to change the configuration to a better match if needed.