Re:In defence of swap: common misconceptions
by AstralStorm on Monday January 15, 2018 @12:42PM
(#16152020)
The real question is why those pages are being held in RAM. If they're needed, swapping them out will induce latency. I'd they're a leak or not needed, the application should be fixed to not allocate swathes of RAM it does not use.
[ Parent
| on HN ]
Re:In defence of swap: common misconceptions
by cdown on Monday January 15, 2018 @02:13PM
(#16152657)
There are some systems which are memory-bound by nature, not as a consequence of poor optimisation, so it's not really as simple as "needed" or "not needed". As a basic example, in compression, more memory available means that we can use a larger window size, and therefore have the opportunity to achieve higher compression ratios. There are plenty of more complex examples -- a lot of mapreduce work can be made more efficient with more memory available, for example.
Re:In defence of swap: common misconceptions
by AstralStorm on Tuesday January 16, 2018 @03:18AM
(#16156586)
Indeed. None of the above are typically used (as in most of the time) on desktop systems where swap is the most problematic.
As for compession, the only engine I know of that wants more than 128 MB of RAM is lrzip and other rzip derivatives.
Common offenders that bog down the system in swap for me as a developer are the web browser, JVM (Android) and electron based apps (messengers, two).
I would also like a source that substantiate the claim that using swap in map-reduce workloads actually helps. Or perhaps in database workloads. Or on any machine with relatively fixed workload.