4 ms·
The degree to which swapping hurts responsiveness depends a lot on why and how it occurs. If swapping just means moving large contiguous pages that are complet
by uniqueuid 5y ago
The degree to which swapping hurts responsiveness depends a lot on why and how it occurs.
If swapping just means moving large contiguous pages that are completely inactive, it's a bunch of writes which neither slows hot memory access nor the ssd.
If, on the other hand, you're swapping out pages that frequently need to be re-read, that's another story.
So if swapping works well, that's to some degree a sign that your software has bloated "dead" memory regions.
- astrange 5y agoMemory leaks typically don't swap back in, so affect performance less than you'd think. Something like a GC scan can swap them though.
- saagarjha 5y agoWell, it depends on how you're leaking things. If you're doing small allocations and the leaks are interleaved with extant objects, the pages will remain live and you'll just cause pressure.