6 ms·
Obviously, running out of memory and resorting to swap (or other safety nets) is less than ideal. But why reject taking apparently-free steps to soften the blo
by ssl-3 5d ago
Obviously, running out of memory and resorting to swap (or other safety nets) is less than ideal.
But why reject taking apparently-free steps to soften the blow?
Is there some advantage in making sure that when the wall is hit, it is hit as hard as it possibly can be?
- Rohansi 4d agoBecause it wouldn't soften the blow. Swap benefits the most from improved latency not bandwidth. Data is moved from swap back to physical RAM when swapped out pages are accessed by software (which stalls the thread). The kernel has less insight into the memory access pattern to prefetch the next page so the stalls likely continue for each page it needs to restore. The latency of zram (compressed in memory) is still lower than the fastest SSDs which reduces those stalls.