This is not entirely correct. If you care about latency, then it doesn't matter on which major fault your application gets paused. Disabling swap protects you from data pages being evicted, but code pages can still be paged out.
If you care about latency, mlock() your memory, do not disable swap. Swap is good and gives the kernel an equal opportunity to evict data and code pages.
jacobgold · · focus · HN ↗
"Stop doing that"
If you care about latency, disable swap. System wide or for the specific the cgroup.
delamon · · focus · HN ↗
If you care about latency, mlock() your memory, do not disable swap. Swap is good and gives the kernel an equal opportunity to evict data and code pages.
quotemstr · · focus · HN ↗