
A2-class microSD cards offer no better performance for the Raspberry Pi - geerlingguy
https://www.jeffgeerling.com/blog/2019/a2-class-microsd-cards-offer-no-better-performance-raspberry-pi
======
megous
A2 needs support in the Linux kernel. It's not there, yet.

[https://github.com/ThomasKaiser/Knowledge/blob/master/articl...](https://github.com/ThomasKaiser/Knowledge/blob/master/articles/A1_and_A2_rated_SD_cards.md)

"A2 promises even better performance with 4000/2000 read/write IOPS minimum
but there's a problem since as outlined by the SD Association A2 cards show
"much higher performance than A1 performance by using functions of Command
Queuing and Cache".

Cache and Command Queuing require host (driver) support since the host needs
to activate those new features first. The cache feature on A2 rated cards
makes use of volatile RAM on the card requiring the host to learn new commands
to issue flushing the cache (involving the risk of data losses -- for details
see especially chapter 4.17 in Physical Layer Simplified Specification 6.0)"

~~~
geerlingguy
So is there any kind of device able to use A2 cards at the rated performance
yet? I can't get anything better on my Mac with multiple readers (USB 3.0 and
3.1), and I'm guessing if I tried on the reader in my 1 year old Dell XPS, I'd
get the same.

What good is a performance designation (A2) if no device in the real world
supports it?

~~~
megous
I don't know. It's a bit of a bummer.

I imagine Android would benefit the most (and phones also don't suffer from
sudden power outages, which is the biggest risk with enabling this), so
someone may try looking if mmc core in androind kernel has patches to support
this.

~~~
aidenn0
My phone will reboot randomly; depending on what layer the reboot happens at,
there may be no flush command sent to the card.

~~~
megous
No worries, I checked it a few minutes ago, and android doesn't support this
either.

------
djsumdog
I'm surprised we haven't seen a smaller than M.2 form factor for SATA on
embedded devices. It seems like the big limiter on devices like the Raspberry
Pi and others are the sd cards/emmc modules, since the amount processing power
and ram have been continually going up.

If you need disk performance on the Pi 4, wouldn't it make more sense to only
keep the kernel,initrd on the sdcard and mount the primary filesystem off a
USB3 device (like an mSATA-2-USB enclosure), that is if you have the space to
spare for it in your project/enclosure?

I did something similar with one of the SolidRun devices, but I had to scuttle
it due to other hardware problems:

[https://penguindreams.org/blog/review-clearfog-
pro/](https://penguindreams.org/blog/review-clearfog-pro/)

~~~
jononor
General practice in embedded is to avoid writing to disk as much as possible.
Data collection is mostly done by sending it to the cloud for storage there.
However 'edge processing' and 'edge storage' are hot topics, so there will
probably be more work in this area. Some of the surveillance camera vendors
are showing interest in this, since it would be beneficial to reduce data
needed to be sent. Especially since vast majority of the data is never looked
at, or only looked at once (human/machine event detection). But one has the
(fundamental?) problem that the sensor is often installed in an adversarial
environment. Would be sad to try to pull data after a crime, only to realize
the camera storage was destroyed.

~~~
jononor
Many embedded applications are also not particularly form-factor constrained.
A good security camera lens is often easily bigger than a couple of 2.5" hard-
drives and a medium sized single-board computation. Heck, just wiring boxes
for an industrial sensor system, are can often bigger than 10s of 3.5" disks.

~~~
sigstoat
> Many embedded applications are also not particularly form-factor
> constrained.

just because the overall package is large doesn't mean the embedded designers
are allocated a large portion of that.

and the upstream suppliers are always going to be pushing to be a bit smaller,
so they can fit into more things, and get more sales.

------
module0000
I appreciate you doing these tests, this (and your last article) instantly
answers my question about _" how will this perform in one of my rpis?"_.
Please keep doing them as new cards(with their marketing claims) are
introduced!

------
jokoon
How about lifespan? I fail to understand why SD card have such a short
lifespan, and it's the sole reason I won't acquire an RPi.

It seems that the only think that is lacking on RPi is flash memory storage.
Most smartphones have a lot of it, and it seems that 1GB of storage would be
enough for the RPi and would not necessarily be so expensive.

~~~
vardump
FWIW, only noname and Sandisk cards have given up the ghost on me. Samsung Pro
& Evo cards have been doing just fine. Other than that, you just need to worry
about getting proper power. Just use the official power supplies, and you're
fine.

Also eMMC chips are no magic. There are crappy ones and good ones. Guess which
ones you're going to get for little money?

~~~
blackflame7000
Proper power is essential. A phone charger is not a power supply even though
it works. I suspect a lot of SD cards are getting undeserved blame from a PSU
issue.

~~~
geerlingguy
This is my experience. The only time I had an issue with corruption (using
over 60 different microSD cards through 7 years and maybe 50 or so different
Raspberry Pis) was when I used a little .5A microSD AC adapter that came with
some cheap battery powered device that broke.

I have not had any problems when using a reliable power supply. I'm guessing
the 'endurance' or 'industrial' cards some people claim are lifesavers are
just doing something to guard against flaky power input when doing reads and
writes, so it masks the issue.

------
officeplant
Looks like I'll keep booting my pi's from usb attached storage. At least with
the Pi4 USB speed improvements should be nice.

~~~
542458
I didn’t even know you could do that! Any idea if it works on the pi4 or not?
The docs don’t mention it.

[https://www.raspberrypi.org/documentation/hardware/raspberry...](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md)

~~~
JudgeWapner
just a guess but s/he may have been referring to just putting root filesystem
on a USB drive, but still requiring the bootloader (and possibly kernel?) to
be on sd card. It's a one-time "hit" that is completely negligible.

~~~
HankB99
That's the present situation and I've used it before. Some recent Pis can boot
directly from a USB drive without the need for a bootloader on the SD card.
That's still in the works for the Pi 4 as I understand, but network boot
(PXE?) will come before that.

------
walrus01
The major problem is not disk write speed, which we can all agree sucks, but
longevity and lifespan when used as a system boot disk and also containing
/var and similar. The write wear leveling on a u3 microsd card is nowhere near
as good as even a $50 consumer class ssd.

Small single board computers should move towards m.2 2280 nvme drive support,
or at least one sata 6 gbps interface.

~~~
joshvm
SD card performance on the Pi <4 is so poor (and the bandwidth is shared with
the USB controller anyway, I think) that you might as well use an attached USB
hard disk; even for booting.

Jeff's benchmarks are accurate in my experience. If you try saving single
images from a camera at even 5-10fps, the card quickly bottleneck and you
start dropping frames. If you buffer and store (in my case 16-bit raw), you
can essentially saturate USB bandwidth if you're also using a USB camera.

~~~
Vogtinator
No, the bandwidth isn't shared as both sd controllers (sdhci and sdhost) are
directly accessible using MMIO (and DMA).

~~~
joshvm
Thanks for clarifying that, I was never sure.

------
hajile
Support for booting from SSD should solve the SD issues before too long.

~~~
gcbw2
why things on the RPi take so long? is the SoC still undocumented because of
the NDA as before?

------
devinjflick
Very glad I took your recommendation from your previous article on the Evo
cards for my new RPi4s! kudos and thank you sir!

------
artemonster
SD is a garbage spec. Arasan IP for SD host (in Raspberry SoC) is trash.
Driver support is minimal. What'd you expect?

------
ggg3
sd card performance specs are all a joke.

they are "at most" some speed. What even is the point of writting such spec?

the car analogy would be if you measure some car going down a hill (doesn't
even matter if tumbling and killing everyone inside), measuring that it was
300mph and then advertising it as "speeds of 300mph!!!"

~~~
cameronbrown
Also how ISP speed is measured ;)

~~~
Youden
Advertised, not measured.

And it's not like that everywhere, the UK has started what I hope develops
into a trend:
[https://www.bt.com/broadband/deals/](https://www.bt.com/broadband/deals/)

~~~
ripdog
The UK has to do that because the fastest widely-deployed internet connections
available are VDSL2. DSL connections in general are relatively unreliable, and
speeds vary wildly depending on a variety of factors, most importantly the
length of the cable between you and your cabinet/exchange. Australian folks
may chime in here with tales of their DSL connections dropping out during
heavy rain, when their telephone junction boxes fill with water and short out.

If the UK had deployed fit-for-purpose tech like Fibre-To-The-Home (FTTH),
there would be much less need for the UK's advertising regulations. (Obviously
speeds are never guaranteed on residential connections, but advertised fibre
speeds are a much more accurate predictor of internet experience than DSL or
cable.)

"But", you might say, "that BT page is advertising 'Superfast Fibre'!". Well,
yes, in the UK it is legal for telcos to lie to their customers. When they say
fibre, they mean Fibre-To-The-Cabinet - and VDSL the rest of the way. Would
anyone call their 3G mobile service "Superfast Fibre" because the tower is
fibre-fed? No. For whatever reason, though, this is totally okay in the UK.

~~~
cptskippy
On the flip side, in the early 2000s Bellsouth (now AT&T) deployed FTTP in
much of the Southeast and would convert that to ADSL to plug into existing
house POTS wiring. It was sold as ADSL at 12mb/s. There was literally no other
internet option available from them at the time either.

~~~
whenchamenia
And here I am, an hour ouside the city and would gladly pay 150/mo for half
that. But noone can, or cares to, deliver.

------
tinmandespot
Doing god’s work

------
stefan_
Testing microSD card speed on a Mac is rather pointless because performance is
(severely) limited on the Raspberry Pi through it's terribly slow interface,
not necessarily the actual card.

Remember RPi 1-3 use a plain SPI interface, and even the new 4 only has UHS-1.

~~~
dkersten
He explained in the article why he did this: to check if the manufacturers
claims are incorrect, or if its a RPi hardware issue.

~~~
megous
It's neither.

~~~
867-5309
it's clearly the former.

~~~
megous
Manufacturer's claims are not incorrect. OS vendors just didn't intoroduce
support yet.

