6 ms·
I am far less concerned about read/write speeds than I am about write endurance and overall reliability/lifespan of microSD cards in raspberry pi 3/4. Would be
by walrus01 5y ago
I am far less concerned about read/write speeds than I am about write endurance and overall reliability/lifespan of microSD cards in raspberry pi 3/4.
Would be interesting to see a write torture test until failure comparing the samsung "PRO ENDURANCE" microsd cards to regular u1/u3 class cards.
- icameron 5y agoThis is a good point, but there is a larger problem anytime you are relying on SD cards for a R/W root partition. Especially when making a product out of one of these boards. It's so easy to follow a tutorial and start an idea from a Bone or Pi or whatever and have some cool functionality and think it's ready to sell. Unfortunately, many of these boards don't have on board flash and by default are booting from SD card with a Linux distribution. It will fail a lot more than a real hard drive does. A cheap SD card is not the same as an SSD when you get down to it, no way around it. Absolutely use the SD card to log data, but don't make booting dependent on cheap removable flash media. Choose an SBC that has high quality flash with good EEC. Source: Experience datalogging with SBCs for 3 companies for 10 years of my career.
- koz1000 5y agoI'm curious about the quality of the uSD card holders on all of these units. Do they all use quality non-corrosive fingers with enough force on the contacts? I once had an intern that told me all about his RPi project to do model rocket telemetry, then after some interrogation sheepishly admitted that the project never quite worked because the g forces and vibration at launch were enough to make the card holder lose contact and the kernel panicked. Bummer.
- colechristensen 5y agoRockets are difficult environments for connectors, the spring loaded compliant mechanism of an sd card holder just isn’t appropriate for that application. You could get it to work but it would involve a lot of vibration analysis and design to be gentle enough to the connector and you would have to keep track of every time a card was connected and removed.
- Teever 5y agoI bet you could achieve the same results in a lot less time with a lot of glue.
- kingcharles 5y agoThat's very true, but then you have a hard time removing it to get the data from it, or to put new code onto it :)
- toast0 5y agoNewer PIs can boot from the network, in case you need to put new code on because the current code doesn't boot... and you could use the network to fetch data as well. Maybe not as convenient, maybe more convenient, depending.
- p1necone 5y agoI wonder if you could fix this with some extra casing around the card slot to make it friction fit. Or an even filthier hack - hot glue/solder it in place, and use a wifi enabled micro sd so you can still access it when the rocket comes back down (and reuse your stuck together sd card monstrosity on multiple launches) .
- jakogut 5y agoI think a simpler and easier solution when you have plenty of memory is to use an initramfs [0] as your root, which avoids having to read from disk after boot. Considering the Pi 4 can be had with up to eight gigs of memory now, this is a pretty good solution. Additionally, Buildroot [1] can build a kernel with a compressed initramfs image quickly and easily, for a number of popular single board computers, including the entire Pi family. This allows more than enough functionality for simple and reliable data logging. EDIT: You couldn't be sure when the disk was ready for writes, so you'd have to log to memory, and have a task that attempts to mount the data partition and flush the buffered data to disk atomically before clearing the buffer. [0] https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt https://www.kernel.org/doc/Documentation/filesystems/ramfs-r... [1] https://buildroot.org/ https://buildroot.org/
- polishdude20 5y agoI've got a rocket flight computer I develop d during covid and one of the top things people say about designing these is to add a flash chip to it. The ad card is great to store data and transfer it to a computer but during flight? No way can you rely on the contacts. So during flight, you save all the data to flash, then once landed, dump it to the SD card. SD card got loose? Beep in a special pattern and keep trying to connect to it, I come along , hear the pattern and hold the SD card in until it stops beeping and emits a "happy" sound letting me know it all transferred. Here's the computer for reference: https://github.com/AdamMarciniak/CygnusX1 https://github.com/AdamMarciniak/CygnusX1
- pas 5y agowhat exactly goes wrong when these SD cards die in SBCs? does anyone have some idea? they are solid state gadgets after all, using low voltage.
- erik 5y agoI wrote some notes on this in a sibling comment: https://news.ycombinator.com/item?id=30761695 https://news.ycombinator.com/item?id=30761695
- bmlw 5y agoHi! I'm the guy that tested these and I hear you, as I mentioned at the bottom of the post, I'm currently working on stress testing some of the cards through a series of sequential read/write and random IO tests and as soon as I have enough data to justify the post, I shall be putting it up. I don't have a Samsung endurance card, though I'm testing a SanDisk MAX ENDURANCE card in this round.
- Sakos 5y agoI'm very interested in seeing how that SanDisk fares. Been thinking about getting it.
- Throwawayaerlei 5y agoSwissbit industrial cards might be interesting to check out to confirm they live up to their claims, but they're pricy.
- nekoashide 5y agoWhich Samsung cards do you want?
- bmlw 5y agoI'm not sure if you're offering to purchase some to have their results added? You really don't have to, but I've created a list to help me keep track of which cards I don't have and wouldn't mind testing at https://www.amazon.se/hz/wishlist/ls/7JG01YVBN93M https://www.amazon.se/hz/wishlist/ls/7JG01YVBN93M - I'll add other brands later but this is a good way to keep track of things and monitor prices anyway!
- nekoashide 5y agoLet me know how testing goes, I always buy Sandisk but Samsung sometimes tugs at my hand before I buy their competitor.
- bmlw 5y ago
- m463 5y agoyes, there was only 1 samsung card tested - they should test more. Basically ALL my SD cards are different flavors of samsung.
- bigiain 5y ago> they should test more. Basically ALL my SD cards are different flavors of samsung I'm looking forward to your blog post with similarly detailed results for your collection of Samsung cards. (Or your offer of decent contracting rates so "they" can do that for you.)
- bmlw 5y agoAs the other guy pointed out, I'm doing this in my spare time with hardware I had or was able to procure quickly/at a decent price (this isn't sponsored, sadly!) I don't have many Samsung cards at this time but I'm looking into my options. I already have 4 cards that I'm almost finished with speed testing (SanDisk MAX ENDURANCE, Integra Ultima PRO, Patriot EP and a Kodak model) and will source more as and when I'm able to :)
- qbasic_forever 5y agoSave yourself the headache and switch to USB booting to a proper SSD. Don't try to get maximum lifetime or endurance from dirt cheap micro SD cards.
- dragontamer 5y agoI don't know if its true or not... but I feel like I lose data when I leave my phone in the car. Temperature-changes almost certainly changes the physics of the microsd cards. I feel like what's reliable at room-temperature (70F) may not be reliable at 32F or 140F. Then again, Rasp. Pi setups probably don't care about temperature. But I can imagine cameras, phones, etc. etc. that are left in a car in a wide variety of temperatures who may care.
- sascha_sl 5y agoTwo easy ways to mitigate this: * run alpine in diskless mode, this way all writes are very deliberate and you never have something like a journal eat though your entire card * use the SD card to boot EDK2 UEFI firmware, and enjoy booting generic ARM images from USB
- hhh 5y agoIf you have any suggestions for tests, I have a very large fleet of Raspberry Pi 3/4 with varying SD cards. We have only had to replace <5 from failed SDs, we have had more stolen than fail.
- erik 5y agoI've seen failure rates of >5% / year on 24/7 read-only Pi deployments across a variety of name brand consumer microSD cards. Are you getting better reliability than that? What cards have you deployed the most of?
- walrus01 5y agoDid those have log2rak installed with a sensible size ram drive /var/log?
- erik 5y agoLogs were written to a ram fs. We experimented with occasionally flushing logs to disk, but ended up disabling this and leaving the microSD card filesystem read-only 100% of the time.
- hhh 5y agoWe have a lot (upper hundreds) of the Canvas Go! Plus cards from Kingston. I'll see if I can get some more details. Basically any UHS 3 or better card our supplier can provide. A little over 300 of the Samsung EVO Plus cards.
- erik 5y agoWould love to hear more details if you can share them!
- foolfoolz 5y agoif you are using raspberry pi you only have 2 options: - use sd card in read only mode - use a real drive, no sd card anything else will result in high likelihood of data loss
- omgwtfbyobbq 5y agoHow high?
- foolfoolz 5y agowith my own devices, every one. longest run i had was ~1 year. most were much shorter like 2-3mos
- omgwtfbyobbq 5y agoThat's pretty bad. I've had 3-5+ years (still running) on most of the sdcards in my 5 Pis. There was one exception with a Sony card that only lasted 1+ years, but the other cards have been fine. I periodically take backups for restoratio/creating clones.
- erik 5y agoThe main problem with running a Pi on a microSD card isn't write endurance, it's low quality controller and firmware implementations on the cards. Contributing factors include: - Even when used read-only, the flash memory occasionally needs to be refreshed, which means the controller needs to shuffle data. - Controllers have to map drive addresses to flash, and they store their tables on the flash. Firmware bugs, power interruptions, or problems with the flash can render the tables unreadable and lose all data. - Some controllers even store their firmware on the same flash that is used for user data. So problems there can brick the card.
- dhon_ 5y agoWe use a Supercapacitor UPS hat to supply enough power for a controlled shutdown due to concerns over SD card corruption (you get around 1 minute). It's been reliable on systems that regularly lose power over a period of around 5 years. The hat we use (Juice4Halt) is more expensive than the SBC though, so that is probably a non-starter for a lot of people.