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

I'm not saying to avoid swap. It is great at what it was designed to do. I only take issue with optimizing swap for bandwidth when it will never be able to keep up with RAM bandwidth. The MacBook Neo for example has 60 GB/s of RAM bandwidth but only 1.5 GB/s SSD bandwidth.
 help



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.



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

Search: