Something I found interesting when learning about flash was how it is manufactured and how much reliable single layer cells are (SLC)
There’s certainly a very visible increase in price and decrease in capacity but it’s certainly interesting when you get sd cards with a proper datasheet vs. customer level devices
Most eMMC chips (basically the chip version of an SD card) can be configured to work in pseudo-SLC (pSLC) mode. This halves the capacity but improves the write endurance by several times.
Yup. mmc-utils is the way to go. Note that this change is irreversible once you send the command to finalize the settings.
The single biggest thing you can do to improve the reliability of your embedded system is to use eMMC’s built-in hardware partitioning.
- Each hardware partition is a separate block device. A firmware update cannot corrupt the device by overwriting a partition table.
- There are two small boot partitions, and they can be made permanently read-only after programming, thus preventing corruption of your bootloader. You can also use the other one read-write for your uboot environment.
- You can easily have two OS partitions for A/B firmware updates. In addition to mounting them readonly, temporary write protection can be enabled on a per-partition basis and disabled when needed for fw updates.
- If you can’t afford the capacity hit from pSLC, I believe it can be enabled on a per-partition basis. (Don’t quote me on this, it could be wrong).
All these settings can be configured with either mmc-utils or u-boot. In volumes, programming houses can take care of this for you. (You’ll have to list all the registers out very specifically in an Excel spreadsheet)
The downside is that calculating all the correct register values is not a simple process, and you’ll have to spend a bit of time reading the eMMC spec.
I believe it's because it originally was SD/MMC which was supposed to be a future media for audio and the like for retail sale. I had some read only palm pilot cards like this - books etc were also sold this way for a short period.
a very visible increase in price and decrease in capacity
Unfortunately SLC costs disproportionately more compared to MLC, TLC, and now QLC -- the actual die cost is only 3x for SLC compared to TLC of the same capacity, but the prices are closer to 10x or more.
I recall reading about running MLC+ SSDs in SLC mode for SLC reliability at the cost of the capacity multiplier afforded by the multilevel NAND.
It always sucks when hardware that is effectively identical is charged at massively different prices, but I guess as a consumer this differentiation probably leads to ever so slightly cheaper MLC+ SSDs...
most of the reason for this is that tlc still has plenty of endurance for any remotely normal use case. people get really worried about the decrease in reliability, but normal tlc drives are warrantied to 0.3 DWPD, which is still a ton (~900 hours of 8k compressed raw video for a 2 TB SSD)
The problem isn't endurance, it's retention. Early SLC was rated for 10 years retention after 100K cycles. The latest QLC is only rated for several months after 300 cycles.
I back up important things on SLC USB-A flash drives and write refreshed copies at least annually. The drives are small (<=8GB), expensive, there are only a handful of manufacturers (mine's an ATP), and you're probably ordering it from Digikey or Mouser. SLC will supposedly hold data at rest longer, and USB-A means I can find readers for at least another decade. We'll see if retention at rest is actually good.
You can get (real!) SLC USB drives from Aliexpress too, for around $0.70/GB. These aren't the ultra-cheap ones which are often fake in capacity, but prominently advertise the type of flash and controller they use.
I also have some really small USB drives from around 2 decades ago, of course SLC flash (the only type of NAND flash at the time), and can confirm that their data is still intact. They've gone through probably a few dozen full-drive writes, while SLC flash back then was rated for 10 years retention after 100K cycles.
Yeah, I have 2 such from AliE and they perform well and haven't lost anything yet even though they have dozens of thousands of files at rest that are updated 1-2 times a month, for almost 3 years now. Quite pleased with them.
They are indeed more expensive but nothing that a programmer salary would notice even if you bought 10 of them. I am wondering whether I should buy another pair and use it as a metadata mirrored vdev on my media NAS. Haven't decided yet.
Yeah, thought the same. Not to mention that I tried to have a bunch of old USB sticks put into one of my servers and it added like two minutes to its reboot time. (Though admittedly I didn't fight hard with systemd to make sure their mounting does not block anything -- it's likely possible to do.)
Ultimately I am not willing to shell out hundreds of EUR for f.ex. 2x SLC internal SSDs at 32 or 64 GB each so I guess I'll just have a few spare disks around when I am back to being employed, and that's going to be that.
There’s certainly a very visible increase in price and decrease in capacity but it’s certainly interesting when you get sd cards with a proper datasheet vs. customer level devices
https://www.digikey.com/en/products/filter/memory-cards/501?...