4 ms·
> 8 GB is more than enough for the majority of people. I have 8 GB RAM (with no swap) and just using browser with few tabs and several times a week system get
by zajio1am 4y ago
> 8 GB is more than enough for the majority of people.
I have 8 GB RAM (with no swap) and just using browser with few tabs and several times a week system get out of memory (due to Firefox eating most of it), ending with either system thrashing or kswapd running . If Linux memory management have worked correctly it would just kill firefox, but unfortunately it does not, so i have to kill it manually in mostly unusable system (due to thrashing). For a period of time, i ran Firefox in memory control group (restricting it to 4 GB), which helped that thrashing was limited to Firefox and not affected the rest of the OS. Several people around me reported the same problem (although less often).
> Combined with the advent of modern SSDs
I do not think it is a good idea to use swap on SSDs due to limited number of writes. A year ago i replaced perfectly working SSD just because SMART reported that average write count exceeded nominal lifespan and allegedly most SSDs fail between 100%-200% of lifespan (in average write cycles). And modern SSD have even lower number of write cycles (although higher capacity, so writes are better distributed).
- nateb2022 4y agoTrue, OOM issues can occur when swap is disabled, but most consumers don't disable swap. Regarding SSD lifespan, case-by-case analysis has shown that SSDs are both more reliable than HDDs, as well as capable of more TBW per lifespan. SSDs are better than HDDs in almost every way. With average SSD TBW capacity of between 60 and 150 terabytes written, and an average of 10GB written per day (which is on the high side), an SSD can be expected to last between 16 and 41 years, which is longer than the average usability lifespan on a computer. Regarding your experience, I can't make an objective analysis however from the fact that you're running Linux and that you wrote to disk more than the nominal lifespan, I'm guessing that you probably were doing some IO-intensive things that normal consumers wouldn't do.
- zajio1am 4y ago> Regarding your experience, I can't make an objective analysis however from the fact that you're running Linux and that you wrote to disk more than the nominal lifespan, I'm guessing that you probably were doing some IO-intensive things that normal consumers wouldn't do. 1. Low-end SSDs starts at 40 TBW 2. Overwrites are counted for internal writes, not OS-level writes. In my case SMART reported 2-3x higher number of internal writes than OS-level writes (probably due to strained wear-leveling algorithm when the SSD was used mostly full). 3. I would consider my case as low-intensity workload (basic desktop usage), but 10 GB/day seems like too low. Just watching a movie is 2 GB write, if one download it first instead of watching stream. But let say it is 10 GB/day. 40000/(10×2.5×365) = 4.38 years, I think my SSD was 6 years old. But all this is irrelevant, as the original argument about swap on SSD is not about regular usage of SSD, it is about writes triggered by swapping, esp. thrashing during near-OOM situation.