Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?



Because 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.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: