4 ms·
I mean, are you saying ‘but more RAM?’ because obviously yes that’s true but not a solution if you already own a laptop, and have you seen ram prices? Also swap
by CJefferson 14d ago
I mean, are you saying ‘but more RAM?’ because obviously yes that’s true but not a solution if you already own a laptop, and have you seen ram prices? Also swapping to a fast SSD isn’t like it used to be on spinning discs. I’ve been amazed how responsive Mac neo laptops are and they are swapping all the time.
- Rohansi 14d agoI'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.
- ssl-3 14d agoObviously, 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 14d 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.