:: Re: [DNG] SSD Lifetime?
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Martin Steigerwald
Fecha:  
A: dng
Asunto: Re: [DNG] SSD Lifetime?
Steve Litt - 05.12.23, 16:54:32 CET:
> Martin Steigerwald said on Tue, 05 Dec 2023 09:09:38 +0100
>
> >smartctl -x on a Samsung 980 Pro 2 TB SSD which is about 2 years
> >meanwhile, in daily usage:
> >
> >Available Spare:                    100%
> >Available Spare Threshold:          10%
> >Percentage Used:                    1%
> >[…]
> >Data Units Read:                    261.509.276 [133 TB]
> >Data Units Written:                 73.925.789 [37,8 TB]

>
> Nice! Here's mine:
>
> Available Spare:                    100%
> Available Spare Threshold:          10%
> Percentage Used:                    1%
> Data Units Read:                    543,369 [278 GB]
> Data Units Written:                 11,883,671 [6.08 TB]
> [...]

>
> Mine is 2TB, split into a (not working) Ubuntu OS and a (working) Void
> install. It's about 9 months old. The explanation of so many more data
> units written than read is a complete mystery: I set it up to do almost
> only reads off this drive.


Well maybe not! How much RAM does the box have? If its enough for plenty
of page/buffer cache, then once warmed up, it may have all of your Linux OS
in cache. Thus it does not need to load much into RAM anymore.

> >Especially in case you leave some space free,
>
> We're on the same page here:
>
> [slitt@mydesk ~]$ df -h /
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/nvme0n1p1  1.4T   57G  1.2T   5% /


Not really at the same page. I leave about 10-20% completely unallocated
if I can. Add do that which is unused in filesystems.

Currently I have almost no unallocated space on the device - yes I could
make use of a 4TB SSD in that laptop, but AFAIK those are still double-
sided and thus probably to large for this ThinkPad T14. Yet I have a bit
less than 150 GiB free in all of the filesystems on that disk combined.
That is more around 15% free instead of 95% free. Cause I expect before
the year 5000 or so I would have another kind of storage technology and I
do not need my SSDs to last that long :). Maybe I would be saving out data
to crystals or inside a quantum anomaly by then. (If you find some kidding
in here, you can keep it.)

Back then I have read some paper from Intel for Intel SSD 320. AFAIR the
sweet spot of having better performance after lots of writes was with
leaving about 20% free. 40% free gave a bit more speed, but not as much as
in my opinion to justify the cost. I don't know however how it is with
today's SSDs. It will depend on the size of the reserved area which I
would expect to be larger with enterprise grade SSD.

> >so it updates every 2 hours instead of AFAIR 24 hours in case of no
> >other activity triggering an update.
>
> I'll have to try that. I might set it to 30 or even 15 minutes, because
> a computer can do a million things in 15 minutes, so the cost of a
> hardware disk write is low, and reduces the amount of data loss or
> garble in the event of a dirty shutdown.


Again, this is just about time stamps, not about regular data writes and
also not about any other metadata writes. Really read about "lazytime" in
manpage "mount(8)" and the kernel tuning knob:

https://www.kernel.org/doc/html/latest/admin-guide/sysctl/
vm.html#dirtytime-expire-seconds

As the option name already says, it is only about timestamps.

So with it set to 7200 seconds my risk is to have time stamps outdated by
as much as up to 2 hours. There is no other risk to my data. That is good
enough for me.

Best,
--
Martin