Hacker News new | ask | show | jobs
by craftkiller 18 days ago
I was under the impression that when you're streaming the weights from disk because the full model won't fit in memory, that it is solely reading from the SSD, not writing, so it wouldn't be causing wear on your SSD.
3 comments

NAND[0] has a fun thing called "read disturbance" where repeated reads from disk will eventually flip 0s to 1s. You have to erase and rewrite the block before the bits flip[1], or you lose the data, but doing so is the same amount of wear as a write.

[0] I heard this being an issue with TLC, I don't know if it also applied to MLC or SLC.

[1] I suspect in practice they use an error correction code and rewrite blocks that read with corrected errors.

It's kinda irresponsible to talk about read disturbance without clarifying that it takes an extremely large number of reads to cause a read disturb error, and it can be corrected by a single rewrite of the data. Read disturb errors are something SSD engineers need to account for, but from an end user perspective it's a smaller problem by multiple orders of magnitude than write endurance, which is already rarely a real problem in practice.
You'd need your OS to support, and be configured to use, a disk mounting option that disables file access timestamps, otherwise reads ARE writes.
Do any operating systems update file access time after every read operation instead of just at fopen?
Based on the ~10x performance gain from disabling access timestamps in VxWorks' HRFS, I'd guess it does. I have no idea if that's common or rare.
...and disable swap.
It is and it doesn't. You only get into disk writes if the system starts paging out to disk.
No one can reliably track uses of "it", and definitely not multiple uses, so please take your time to qualify everything explicitly. Currently I have no idea what each "it" is referring to.
Reads off your SSD don't age it prematurely.