4 ms·
You might be surprised, with NVMe swap 8GB is surprisingly capable. ~1.6GB/s Read/Write.
by pants2 7mo ago
You might be surprised, with NVMe swap 8GB is surprisingly capable. ~1.6GB/s Read/Write.
- teaearlgraycold 7mo agoApple has a great zram implementation as well.
- serf 7mo agothe slowest DDR4 is capable of 12.6GB/s~ish per channel . nowhere near the same performance.
- Dylan16807 7mo agoThe ratio between RAM speed and SSD speed is unimportant. Useful swap just needs a fast drive.
- AnthonyMouse 7mo agoFlash has finite write endurance. NVMe swap can burn through it pretty quick. Which is isn't that bad because if it wears out you can replace it... unless the drive is soldered.
- ChrisMarshallNY 7mo agoI’ve never had an SSD crap out because of read/write cycle exhaustion, and I’ve been using SSD almost exclusively, for over a dozen years. I’ve had plenty of spinning rust ones croak, though. You don’t solder those in, so it’s not really a fair comparison. I did have one of those dodgy Sandisks, but that was a manufacturing defect.
- AnthonyMouse 7mo agoBut how much RAM did you have? If you have 24GB of RAM and a 12GB working set then it's fine. Likewise if you have 8GB of RAM and a 4GB working set. But 8GB of RAM and a 12GB working set, not the same thing.
- spacedcowboy 7mo agoMac SSDs are expected to last 8-10 years, even with high use. though Apple don't publish these values specifically, it's possible to start to extrapolate from the SMART data when it starts showing errors. A good SSD ought to be able to cope with ~600TBW. My ~4.5-year-old MBP gives the following: smartctl --all /dev/disk0 ... Data Units Read: 1,134,526,088 [580.8 TB] Data Units Written: 154,244,108 [78.7 TB] ... Media and Data Integrity Errors: 0 Error Information Log Entries: 0 ... I'm sure an 8GB RAM machine would use more swap than my 16GB one, but probably not much more, given that mine has had heavy use for development and most people don't use their laptops for anything like that. Even so, that would still put it well within the expectation of 8-10 years, and that's for a $600 laptop.
- AnthonyMouse 7mo ago> I'm sure an 8GB RAM machine would use more swap than my 16GB one, but probably not much more It's non-linear. If you have a 17GB working set size, a 16GB machine is actively using 1GB of swap, but the 8GB machine is using 9GB. If you have a 14GB working set size, the 16GB machine doesn't need to thrash at all, but the 8GB machine is still doing 6GB. Meanwhile "SSDs are fast" is the thing that screws you here. Once your actual working set (not just some data in memory the OS can swap out once and leave in swap) exceeds the size of physical memory, the machine has to swap it in and back out continuously. Which you might not notice when the SSD is fast and silent, but now the fact that the SSD will write at 2GB/sec means you can burn through that entire 600TBW in just over three days, and faster drives are even worse. On top of that, the write endurance is proportional to the size of the drive. 600TBW is pretty typical for the better consumer 1TB drives, but a smaller drive gets proportionally less. And then the machines with less RAM are typically also paired with smaller drives.
- spacedcowboy 7mo agoMost people using these things aren't going to be using more than 8GB on an ongoing basis, and if they do, they'll not be swapping it like mad as you suggest, because it's only on application-switch that it will matter. As for 600TB in just over 3 days, I want some of what you're smoking.
- bzzzt 7mo agoMost flash memory will happily accept writes long after passing the TBW 'limit'. If write endurance would be that much of a problem I'd expect the second hand market to be saturated with 8Gb M1 MacBooks with dead SSDs by now. Since that's obviously not the case I think it's not that bad.
- AnthonyMouse 7mo ago> Most flash memory will happily accept writes long after passing the TBW 'limit'. That's the problem, isn't it? It does the write, it will read back fine right now, but the flash is worn out and then when you try to read back the data in six months, it's corrupt. > If write endurance would be that much of a problem I'd expect the second hand market to be saturated with 8Gb M1 MacBooks with dead SSDs by now. That's assuming it's sufficiently obvious to the typical buyer. You buy the machine with a fresh OS install and only newly written data, everything seems fine. Your 30 day warranty/return period expires, still fine. Then it starts acting weird.
- bzzzt 7mo ago> That's the problem, isn't it? It does the write, it will read back fine right now, but the flash is worn out and then when you try to read back the data in six months, it's corrupt. SSD firmware does patrol reads and periodically rewrites data blocks. It also does error correction. Cold storage is a known issue with any SSD, but I don't have any insight in how bad this problem is in reality. Of course it will wear out eventually, but so will the rest of the system components. There's nothing to be gained by making SSDs that last 30 years when the other components fail in 15. > Then it starts acting weird. Is that speculation or do you have any facts to back that up?