On 8/11/24 15:44, Oliver Peter wrote:
Hi!

How do you guys trim your SSDs?
Or shall I ask "do you trim your SSDs at all"?

Does OpenBSD have similar functionality like
https://man.netbsd.org/blkdiscard.8 ?

I recently rented a phys. machine and installed OpenBSD on it[1], smartctl
already tells me that the disks have seen better times, that's why I am a bit
worried about wearing them out even faster without trimming:

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED   
WHEN_FAILED RAW_VALUE
202 Percent_Lifetime_Remain 0x0030   075   075   001    Old_age   Offline   -   
    25
202 Percent_Lifetime_Remain 0x0030   078   078   001    Old_age   Offline   -   
    22

Cheers
Oliver


[1] Little write-up: https://hackmd.gfuzz.de/s/Qsk14kc3i (OpenBSD & Hetzner)



No, OpenBSD does not do "TRIM" (unless something was slipped in when I wasn't
looking).

There are a lot of ways a hard drive fails...mechanical failure of magnetic
drives is JUST ONE WAY.  SSDs are prone to all the same electronic failures,
minus the mechanical failure, plus billions of tiny capacitors trying to store
data for years, any of which failing to do their job well will ruin your day.
Oh, and "write fatigue".

(I have a bit of knowledge of how floating gate storage works, and frankly,
it gives me the creeps.  It's amazing it works at all, but obviously it
does).

Are you catching my drift as to just how tiny the "write fatigue" "problem" is
in the Big Picture?  Even if you got rid of 100% of "write fatigue" failures,
it probably be almost a rounding error in the total picture of "reasons for
unexpected downtime".  And if you can't handle an unexpected downtime, you
should probably be thinking about "bigger picture" solutions than TRIM.

But really, for something important, I'd suggest retiring your hw (all of
it) every five years, or at least demoting it to lower importance
roles.  I'm all-in for recycling hardware, but HDs are so bloomin' cheap,
just buy new ones every few years, it's not worth worrying about.

If you really want to arrange the deck chairs on the Titanic, get a drive
a lot bigger than you need (say...250G for a firewall), allocate 20GB of
that for your FW at the front of the disk.  In a year, replace that first
20G partition with a new one, in the next 20G of the disk.  In a few years,
maybe you need 25G or 30G.  But this way, you can never use storage that
has been worn for more than a year.  Might get ten years of "fresh" disk
on a single SSD that way.  Do this, I'll laugh at you. :)

Nick.

Reply via email to