Every time Raspberry Pi comes up as a topic on HN, there are scores of comments decrying the futility and frustration of unreliable SD cards.
The thing with SD cards is that there are wide variances in quality, even among the top name-brand manufacturers. You can get the normal crappy cards that everyone buys which are likely to last not much more than 2-3 years under very occasional use all the way up to industrial cards with 10 year warranties and reliability matching the best enterprise SSDs. And everything in between.
The point is: If you buy the cheapest thing on Amazon, you're going to get exactly what you paid for. For my part, I have been using "High Endurance" cards in my Pis for several years as normal OS and data disks. They are not actually much more expensive than "normal" cards. I have not had any of them fail yet.
I don't disagree with you, but the other perennial unanswered question on HN is: how do I ensure I'm paying extra for actual quality and not just sucker tax?
Memory cards and ssds are famously obtuse like this. There are the branded versions (custom made for your Switch, for your Xbox,etc) which are exactly the same as their cheaper counterparts. Sandisk itself recently started a "creator" line of cards and ssds which are, again, exactly the same but more expensive. Samsung had Evo Plus which was different than Evo+ but same as Evo Select. Go figure!
Sometimes looking at specs helps but usually not - I.e. The "up to" speed marks are famously irrelevant for real time usage, and brand name companies will offer any number of cards with same specs and tags (u2/v3/class10/mark5/whatever) at varying price points. And then there's the WD Red saga where drives branded "NAS" were completely inappropriate for NAS usage.
I ran a photography business a while back and always bought extreme pro because I just couldn't risk it, but honestly, I felt like a bit of a sucker. It's hard to know when you're actually buying real quality and endurance increase.
Looking for the most "extreme" high-quality micro-sd cards on Amazon, and also on B&H to avoid the chance of counterfeits, I'm struck by how they are all so damn cheap. Whether SanDisk Ultra, Extreme, Extreme Plus, Extreme Pro, or Max Endurance, the 64GB card is less than $20. (I've seen reports of Sandisk Extreme micro-sd cards dying, at close to the "typical raspi" rate ... I haven't seen that yet for Max Endurance, and that does sound like what I want, so I got one and I'm trying it. But it bothered me, ironically, that it's pretty much the same price.)
Meanwhile, if you go to a professional electronics component vendor like Mouser or Newark, a SwissBit "pseudo-SLC" micro-sd card is over $50 for 32 GB. I'm pretty sure that is real industrial usage quality, and will have similar longevity to a "real SSD" of similar size. (I also got one of these, it works well so far, but that's not a conclusive test yet :)
I guess I could instead get the 512 GB "Sandisk Extreme" whatever, and the additional size will probably give similar longevity? It just seems silly, and a bit less of a sure thing, than the priced-as-expected industrial thing. It is kinda strange/annoying that in the consumer side of the market, they keep adding superlatives, but it seems like the same cheap flash for the same cheap price? The real stuff surely costs more than $16, but it's not on the consumer market, at all.
And why doesn't the Raspi foundation/company sell some of the high-priced industrial stuff, just to make it an obvious option, even if not for most people? If you're just messing around and learning, use the cheap one, but if you want a raspi to do real work for more than 4 months straight, you're gonna want one of these real industrial SD cards. I guess most people who care about storage use m.2 adapters, which you might want for the performance, or the better pricing at higher capacity. But if you don't need the performance or capacity, or don't have room for the m.2 in your application, and just need the damn thing to not break ... the real "extreme" does exist, it is the SwissBit.
I feel like the DWPD should be given with at least 2 significant digits, and must be based on real world testing to find the amount of writes that 99.9% of the cards can take for the duration of their warranty without failing before warranty ends.
> how do I ensure I'm paying extra for actual quality and not just sucker tax?
Objectively? You can't. You can make sure you don't get a counterfeit by never buying on amazon or ebay. And you can test things like the write speed are as claimed.
But to actually measure the longevity of a card? You've got to buy a load of them, use them intensively in realistic conditions, and carefully investigate every failure to produce statistics.
You can get plenty of anecdotes from DIYers, but let me tell you: My headless Raspberry Pi doesn't show up on the network? Could be a failed microsd card. Could be the disk's full so some log is blocking on a write. Could be a bad software update. Could be I powered it off mid-software-update. Could be weak wifi. Could be I brought a counterfeit microsd. Could be something I plugged into the GPIO. Could be a barely adequate power supply. Could be I messed up a setting and now the DHCP or the SSH server isn't working right. Could be it getting recruited into a botnet. Could be it changing IP addresses and me trying to connect to the old one. Are you going to take my word for it when I say it was the microsd card for sure?
I'm exactly with you - with the added Complication that when somebody does endurance testing (e.g. Backblaze), by then a) manufacturer started using different components for that SKU, and / or manufacturers no longer produce those SKUs. Almost by definition, you can only see endurance when it's too late (see the ibm desk star saga).
Bottom line, you can try to trust the manufacturer reputation, purchase channel, and price points / specs, but you can never be sure - so backup like crazy :-)
Especially with the Raspberry Pi, another point is power delivery. You need a beefy power source, but also a good cable. I bought a USB-C charging cable for my Pi4, and it was very unstable and crashed a lot. Corrupted the install a couple of times, and so I got some new SD cards.
Well, turned out the "charging cable" had 1 ohm resistance and so when the Pi load spiked, the voltages would drop well below 4.5V...
Tossed it away and got a proper cable, and the thing has been rock solid since.
Highly recommend getting a USB cable tester, I had several black sheep in my collection.
Why mount the SD card read/write. Why not mount read-only. After boot, I can remove the SD card. I can insert another card with more files, or chroot to other external storage. The rootfs is in RAM. Been booting RPi with tootfs in RAM since 2013.
SD cards are not reliable for frequent, small writes, IME. Certainly worse than USB sticks. I wish RPi offered the option to boot from USB. Even an option to use a SD card to eMMC adapter and boot from eMMC would be an improvement.
But my point was that not all SD cards are made the same and lots of the tech-literate here on HN don't seem to know that. "SD cards are not reliable" as a blanket statement is false. You have to research to find out which ones are the best and use those, then you don't need to do weird workarounds like read-only filesystems and running from a RAM disk, you can just use the Pi like a normal computer.
This is the best solution - if you don't need persistent storage. I prefer N100 minipcs for this reason - the Minix Z100 I have uses 6.4W at the wall (linux, idle, wifi and bt disabled) and while this is probably more than rpi, I got a silent computer with a case and NVME out of the box. Being in x86-land is just an added bonus.
> Why mount the SD card read/write. Why not mount read-only.
I have seen dozens of name brand SD cards fail while mounted read only in a medium sized deployment of Pis. The problems mostly come from firmware bugs, not from nand wear.
Is SD card "quality" really relevant? I've long wondered why it remains the problem only on Raspberry Pi. One quirk of Pi is it doesn't have proper power circuit, likely for legal reasons. Are such design oddities really not have to do with early SD failures specifically on Pis?
It is not just a problem with Pis, but also other use cases in which the SD card is used 24/7, or at least for long stretches of time, especially if the use case involves writing of data. Dashcams are also notorious for destroying crappy SD cards due to their high write load, for example.
Guessing it's due to swapping? I imagine disk activity from a dashboard cam is a monotonous long write stream. Disk activity on a Pi is your modern VM OS constantly swapping memory between RAM and drive.
> I've long wondered why it remains the problem only on Raspberry Pi.
SD card firmware is often buggy and only heavily tested with windows. Camera manufactures will specify SD cards that are know to work with their cameras for this reason.
A normal-quality microsd is already the same price per byte as a real SSD, so paying 50% more to get a high endurance card is pretty annoying. Also annoying is that the sandisk high endurance still doesn't have a 1TB model.
And nearly always the cheap cards seem to fail due to firmware shortcomings rather than hardware faults. Ie. the built in wear levelling and error recovery is bad.
Considering firmware is effectively free once written, the fact the cheap cards still don't have good firmware leads me to believe it might be deliberate market segmentation. Ie. "we need to make the cheap cards glitch and fail often, or nobody would buy our expensive cards".
If so, it really raises moral questions about how many peoples wedding pictures have been gobbled simply so some executive can get his christmas bonus...
> And nearly always the cheap cards seem to fail due to firmware shortcomings rather than hardware faults. Ie. the built in wear levelling and error recovery is bad.
Well, higher quality cards have better performing controllers that operate at higher speeds or have dedicated hardware offloads for stuff that a "cheaper" controller has to do in software.
These moral questions stand unsolved for decades, and many people are acutely aware of them. IMO it's time we start putting those executives in jail for it. But we all know it ain't ever happening.
I work with embedded products that has a SD in them, and we have used Swissbit but moved to GreenLiant "Industrial Card" cards.
We do _extensive_ testing of these in-house. Like restarting machines 10000 times etc. We have never seen a card wear out, as far as I know, and we have test systems that are used way more than any usage I would consider "normal".
The thing with SD cards is that there are wide variances in quality, even among the top name-brand manufacturers. You can get the normal crappy cards that everyone buys which are likely to last not much more than 2-3 years under very occasional use all the way up to industrial cards with 10 year warranties and reliability matching the best enterprise SSDs. And everything in between.
The point is: If you buy the cheapest thing on Amazon, you're going to get exactly what you paid for. For my part, I have been using "High Endurance" cards in my Pis for several years as normal OS and data disks. They are not actually much more expensive than "normal" cards. I have not had any of them fail yet.