Results of 500 MicroSD Benchmarks on SBCs
bret.dk
bret.dk
Would be interesting to see a write torture test until failure comparing the samsung "PRO ENDURANCE" microsd cards to regular u1/u3 class cards.
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.
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-r...
Here's the computer for reference:
I'll call it a day on performance testing at that point and put a group of them to the test endurance wise then!
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.)
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.
* 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
We have only had to replace <5 from failed SDs, we have had more stolen than fail.
- use sd card in read only mode
- use a real drive, no sd card
anything else will result in high likelihood of data loss
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.
I say this as someone that uses SD cards currently, and I understand if others do also- it's the easiest/default option, but I've definitely given thought to switching
The solution is USB->SATA SSD converters with SATA SSDs. Those will easily sustain a few hundred MB/sec read/write. The problem then becomes the USB inefficiencies, but for the most part wear leveling/etc make them pretty bullet proof.
The PFTF UEFI firmware will reliably boot off just about everything you can plug in (USB DVD/etc included).
One work project of mine involved a bunch of sensors, an 8-bit microcontroller without much memory, and an SD card. It turns out that cost, brand name, and speed class have nothing to do with AU boundary latency. Trying to write 255 bytes every 2 to 10 milliseconds at a few MHz on a chip with 2.5 KB SRAM, the limiting factor is the SD controller needing up to a hundred milliseconds every 10 seconds or so (depending on AU size) during which real-time data cannot be buffered in the SD card, microcontroller, or sensor FIFO. There's simply too much data waiting to store!
-----
A few notes for anyone at all who cares:
Single-level cell (aka industrial) SD didn't result in a faster AU change speed.
One SD card---out of 10 or 12 tried---would not pull down its MISO line unless an extra clock pulse was manually bit-banged, which is a really stupid behavior to debug after having a few working cards. Tracking down this bug took a lot of garbled data, scope measurements, and re-readings of the SD specification to see if my code was wrong or the card manufacturer was non-compliant.
The specification has a maximum write latency of something like 200 ms, and that's the sort of detail you miss until you've spent time and money designing/ordering a PCB and realizing you should've just added a 64Mbit flash IC and dealt with the inconvenience of UART data transfer.
In my experience industrial versions of mainstream cards are less reliable!
I agree, you have to measure latency and longevity on these edge (maximum longevity or space) SD cards as bandwidth is limited by SPI (4 is not really that much faster than 2).
USB3 is not stable enough for 99.9999 uptime.
If you use the cards above and mostly write once on the 1TB and replicate all that data on 3 cards in 2 geographical locations in realtime (6x in total minimum = you have redundancy even if one node fails on local and global level) you should be fine.
After having 8GB Odroid MMC fail on me twice after 5 years, I invested in Intel Atom servers with X25-E (65nm SLC 100.000 writes per bit) drives as backup plan if the SD card solution fails/has problems.
Power goes from 2W to 25W (50W with 10x SATA SSDs) with that change so you cannot afford more than 1-2 Atoms per location as lead-acid backup will be too expensive/large otherwise.
Remember, if you do not power flash memory for a long time the data is corrupted/lost. You need your disks to be powerable on solar/wind, in practice this means Raspberry 2 when the mains go.
As electricity prices rise the supply quality will degrade. Power outages will increase exponentially until the powergrid fails without replacement parts/transport.
Peak energy is not a speculation, it's the only sure thing.
Other than that, I'm really surprised by just how much faster the IO on the RPi4 is. Quite the difference!
[1] https://support.microsoft.com/en-us/office/use-data-bars-col...
Agreed that Amazon Basics is the surprising front-runner for the cards, although the IOPing results are shockingly bad for most cards except SanDisk Ultra 16 + 32. Might need to use Analytical Hierarchy Process to determine how each performance characteristic should be weighted.
For boards, the top 3 in your tests by a wide margin are: 1) Orange Pi i96, 2) BeagleBone Black (2GB eMMC), 3) Raspberry Pi 4 Model B (Revision 1.1 – 2GB)
https://docs.google.com/spreadsheets/d/1ENHM6N38iHFd7dEYliaT...
Where on Earth did he cough up a BBB that old and why is he using it for benchmarking?
The BBB Rev B BOM lists a Micron chip that tops out at 30MB/s read and 6.6MB/s write (pretty close to measured).
The BBB Rev C BOM lists Micron chips in that range but also lists chips like the Kingston EMMC04G-M627 which is capable of 250MB/s read and 25 MB/s write.
This link seems to indicate that the Rev C is around 2x faster on eMMC. https://www.tablix.org/~avian/blog/archives/2017/08/beagleco...
(the RPi Zero numbers seem to correlate with yours so it seems you are measuring the same things)
So, the eMMC numbers are going to be highly specific to the board manufactured.
I had a Kingston SATA SSD that failed. It didn't just become read-only, it failed completely and catastrophically. One day everything was there, the next day the drive couldn't access anything.
I delved deeper after that and now stick to major manufacturers.