Some Bits: Nelson's log

SSD lifespan in my Linux server

I put a 2.5″ Samsung 860 EVO SSD in my Linux server in January 2018. It’s the root drive, 1TB, but only has about 90GB written to it. How’s it doing?

OK I think? smartctl -a tells me the value of Wear_Leveling_Count is 099, with a raw value of 8. That should mean it still has 99% life in it (apparently the raw value is inscrutable).

Total_LBAs_Written also has a value of 99, which I think is very good. The raw value for that is 23318240262 which works out to about 10TB, or writing each sector 10 times over the life of the disk. The data sheet has a warranty for 600 TB Written, so I’m not even at 2% of that. Plenty of life left in it.

hdparm and dd both show read and write speeds of about 500MB/sec. That’s about the datasheet performance. The drive is connected via SATA 3.1 at 6Gb/s, and I’m getting about 4Gb/s. A fancy new M.2 Samsung 980 Pro is 10-15x faster but I really don’t much care. In my head all hard drives are still more like 1Gb/s and then only if you’re reading sequentially from data on the inside tracks. Even this old SSD is plenty fast for what I do.

I did decide to give my SSD a little break and move /tmp to tmpfs, which is RAM only. systemd can do this easily, see these instructions. For some reason Ubuntu doesn’t offer this as a default option, I think folks worry that it might be too small (or alternately, eat up all the RAM and start swapping). The default size of tmpfs is 50% of system memory, so 8GB for my small NUC system.