Ssd data retention

If you use the btrfs filesystem on linux there is a nice ‘trick’ to refresh the cells: the btrfs balance command rewrites blocks/chunks to optimize the filesystem. Performing a ‘full balance’ will basically rewrite all the data on the file system. I have used it succesfully on a cheap Kingston NV2 SSD to get the read speeds back up (some data dropped between 1GB/s, and was back to high 2-3 GB/s after the balance:

https://btrfs.readthedocs.io/en/latest/Balance.html

This is only relevant to the few users with btrfs though.

If you have another ssd with enough space you can also dd/image the full disk and restore… If you do it ‘in time’ (say, you still have 1GB/s read speeds speed), it should take less than an hour on a pcie 3 or 4 ssd.

6 Likes

As this thread has progressed, I am now wondering if my “3-2-1” no longer makes sense.

Currently it is:
1 copy on a mirrored spinning rust hard drive nas. Counts as one because raid is not redundancy.

1 copy on a bluray

And a second copy on a bluray offsite. (Kept under my desk at work which is about 20 miles away. But if there is a mega disaster that effects my home and work, I got bigger problems)

My thread was me thinking at least one of the bluray copies should be flash, for density reasons. Keeping the catalog of bluray discs and the discs themselves can get unwieldy after time.

However, I am now thinking the more logical method would be (at least for new data), the SSD be the main pool of hot data, with periodic refresh of the cells. Once written, the data rarely changes. And the offsite can still be bluray, and the second copy cold storage be hard drive.

Spinning rust hard drive should require even less refresh of the bits. And using the SSD for the hot server pool would be faster and possibly more power efficient if it is idle for most of the time? And easy to schedule periodic cell refresh?

If there isn’t a map of those block shouldn’t the command just run and do a check regardless? I can’t remember if the map is stored on the drive controller or the OS files.

There is such a map and it’s stored on the drive. The drive needs it to do wear leveling, trim, keep track of remapped/spare sectors, etc.

According to the internet, harddrives should retain data for up to 70 years or so, in theory.
In practice, I think they’re recommended for no more than 10 years of cold storage, but that might just be to sell tape drives to enterprise customers or some such.

For cold storage on harddrives, because the mechanism doesn’t fail while cold(no moving parts while the drive is off :yay:) and it doesn’t use any electrolytic fluid capacitors, about the only thing you should worry about is emi/cosmic rays or corrosion/mold/whatever.
As long as it’s a dry place, out of the sun, and nothing major happens, any minor bit rot from flawed construction/poorly written bits/minor emi should be recoverable with something like parchive.
So, I think right now, the best cold storage solution for offsite backup is harddrives with parchive recovery files.

blurays supposedly last 100 years or whatever, but they said that about CD-ROM too. The fact of the matter is, the materials used to make plastic disc storage weren’t even around 100 years ago, and to this day are still poorly understood relative to magnets, metals, and motors. Even magnetic tape has been around as a storage medium longer than optical disk, and is much better understood.

Presumably SSD wear levelling will refresh old cells that have been storing “at rest” data? I mean logically, it would make sense… but i’ve seen a lot of stupid IT equipment…

That’s an assumption/guess for wear levelling to work - but i’ve got no idea how SSD controllers actually work internally.

Way back when Ryan Shrout and Alan Malventano were on PCPerspective this very question came up due as a follow up to an endurance challenge that was being done by the guys at Tech Report.

I remember Alan saying that actually running a Defrag on the system was enough to do this. Keep in mind that was over 7yrs ago now so maybe there is software inside SSD’s that can handle this at the lowest levels.

Maybe we can scour the web for some of those old PCPer podcasts and pinpoint the conversation. The Tech Report endurance challenge might be harder to find now.

Found the Tech Report article, it was in my bookmarks, but am looking for the Alan response which which is on point for this discussion.

Maybe a good question to ask Alan on Twitter/X ?

How would you even run a defrag on an SSD in 2024?

If you have XFS you can xfs_fsr or for ext4 there is e4defrag provided by e2fsprogs Like I said, it was an old conversation and there could be low level tools to do this very thing now.

I have to second what Alkafrazin mentions here. As part of my career, I spent several years dealing with recovering from storage failures. This was before enterprise SSD storage was a thing so I can’t speak to SSDs specifically. The vast majority of storage failures come from bit rot (my recall is like 80% - I know there is research on this out there somewhere). These often go undetected because it is just as likely to hit non-critical data as it is to hit critical data. Basically, you need the right checksums on all data saved to detect how frequent these are. And bit rot on an HDD or SSD only propagates the wrong data to “backup”. I have personally seen “corrupted” backups going back years. Basically the data on disk was bit rotted and the backup just copied the degraded bit out.
And no one had needed to access that page of the database for years and suddenly… Journaling file systems only get you so far. They help protect against failures while committing data to the disk (i.e. power failure). The remaining 20% of data failures is hardware/driver/power failure scenarios.

Thus the question I have is, is the bit rot on SSDs any worse than existing storage concerns? And when I see numbers of “70 years”, think of this like an MTBF number. If you have 70 drives sitting around, on average 1 will fail per year. 7 years down the road, you will have lost 10% of them.

And proper storage is important… I have had to deal with situations like backup tapes stored under peoples desks that literally turned to dust because all the plasticizer had evaporated off. I would not be surprised if CD/Blu-Ray encounters similar issues over time. Then there is of course the technology to read the data off of media (ever had to buy legacy hardware off of eBay because you have the tape, but no tape drive compatible? Never mind corroded power connectors for drives, etc.

In short, if you haven’t worried about bit rot with all your other media. Your risk profile hasn’t really changed. And I hope you didn’t copied data from old bit rotted media to the SSD and just bring the problem forward. :grinning:

5 Likes

One would think, but at least with all the consumer SSDs I’ve used so far, that is not the case.
The frustrating part is that the hypothetical time-based cell refresh mechanism isn’t advertised on any SSD by it’s manufacturer, at least then we’d know. The only way we have to know if this feature is implemented is if someone goes on a years long test with the drive which doesn’t seem to be a very attractive proposition for the review sites due to the time it takes.

​​​ ​ ​
​​​ ​ ​

On a tangent: Read refresh is a thing most SSD controllers implement from what I’m told, where each page of flash has a counter of how many times it’s been read since the last time it was written, and if that number gets too high the SSD controller will migrate that page to another part of the SSD so that it doesn’t become too weak from repeated reads.

Detailed paper on read refresh algorithm:

3 Likes

To clarify, the citation was the magnetic half life of permanent magnets. It’s just what I saw cited for useful HDD data retention, and I doubt it’s a useful number for actual data storage, but more of a maximum data retention of a magnetic storage system.

If that’s the case… I can confirm I have an SSD based SAN that is coming up 4 years old and likely has static data on it.

I would suspect that if the refresh isn’t happen the vendor maybe just considers it a disk fail event.

I I think I’ve had ONE failed disk in it since like… 2019?

But… maybe pure storage have their own smarts or own SSD firmware. But for what it’s worth, that’s my experience with long term flash.

1 Like

Are the SSDs in the SAN enterprise SSDs? I know Pure Storage makes it’s own flash controller now but I’m not sure if they always did.

Reason I ask is because I have a suspicion that the enterprise grade flash controllers are implementing the cell refresh mechanism in the background as part of garbage collection; The reason I think this is because I have a bunch of Toshiba PX05SRB SSDs that haven’t had their read speeds slow down after 2-3 years.

2 Likes

i’d be lying if i claimed either way. not sure.

Fair enough. In this case looking at it like an MTBF sounds like the wrong way to view it.

In addition to the permanent magnet half-life, we do still have to take into account both the magnetic media degrades.

So while the head may still be able to write, then read, new data. There is a chance that it is not strong enough to read the signal on data that has sat around for a number of years.

2 Likes

I’d expect neodymium magnets to have half lives ~1000 years @ 35C assuming its an average coercivity grade.

I think the magnetic domains encoded onto the platter will be the first thing to degrade magnetically as well. Currently platter’s are using a Cobalt-Chromium-Platinum alloy to write data to which is supposed to be pretty rugged, definitely not 1000 years rugged though, probably on the order of decades though.

4 Likes

It does sound like spinning rust hard drives likely have the best data retention for the equation:

Best = (Cost per TB x years stable x Density x ease of storage x ease of recovery)

At least with HDD vs SSD vs Optical

I agree. Tape storage probably bests all of them once you get into needing to store more than a couple hundred TBs, the barrier to entry for tape is kind of high though.

2 Likes

Tape breaks (or is subject to damage due to say, getting jammed in your tape unit) quicker than hard drives though in my experience (so you need multiple copies), and you’re going to have to re-write the tapes to new tapes when your chosen format goes EOL and drives are no longer available.

1 Like