<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>It's Pi all the way down... - reliability</title><link href="https://waldorf.waveform.org.uk/" rel="alternate"></link><link href="https://waldorf.waveform.org.uk/feeds/reliability.atom.xml" rel="self"></link><id>https://waldorf.waveform.org.uk/</id><updated>2025-02-27T23:04:13+00:00</updated><entry><title>Loading the Deck</title><link href="https://waldorf.waveform.org.uk/2025/loading-the-deck.html" rel="alternate"></link><published>2025-02-27T00:00:00+00:00</published><updated>2025-02-27T23:00:36+00:00</updated><author><name>Dave Jones</name></author><id>tag:waldorf.waveform.org.uk,2025-02-27:/2025/loading-the-deck.html</id><summary type="html">&lt;p class="first last"&gt;A cautionary tale of &lt;span class="caps"&gt;SD&lt;/span&gt; cards and online&amp;nbsp;reviews&lt;/p&gt;
</summary><content type="html">&lt;p&gt;I mentioned in my &lt;a class="reference external" href="https://waldorf.waveform.org.uk/2023/dealing-the-sd-cards.html"&gt;last post&lt;/a&gt; on this topic that fake &lt;span class="caps"&gt;SD&lt;/span&gt; cards have been an
issue in the&amp;nbsp;past.&lt;/p&gt;
&lt;blockquote&gt;
Buy from well-known outlets, not minor vendors on whatever variant of
flea-bay you frequent. Just because it’s on Amazon, doesn’t mean it’s not a
knock-off; check the actual seller.&lt;/blockquote&gt;
&lt;p&gt;For that post, I also purchased a variety of &lt;span class="caps"&gt;SD&lt;/span&gt; cards of various models for
testing purposes, some from Amazon. I also&amp;nbsp;stated…&lt;/p&gt;
&lt;blockquote&gt;
I &lt;em&gt;haven&amp;#8217;t&lt;/em&gt; had any issues for the last few years, but during them I&amp;#8217;ve
stuck to buying strictly from either SanDisk or Samsung [&amp;#8230;]&lt;/blockquote&gt;
&lt;p&gt;Guess how that&amp;#8217;s&amp;nbsp;going!&lt;/p&gt;
&lt;div class="section" id="another-one-bites-the-dust"&gt;
&lt;h2&gt;Another One Bites the&amp;nbsp;Dust&lt;/h2&gt;
&lt;p&gt;Another month rolls by, and another Ubuntu release rolls off the production
line. In this case it was Noble&amp;#8217;s .2 release&amp;nbsp;(24.04.2).&lt;/p&gt;
&lt;p&gt;At each release, we go through a round of so-called &amp;#8220;&lt;span class="caps"&gt;ISO&lt;/span&gt; tests&amp;#8221; &lt;a class="footnote-reference" href="#iso" id="footnote-reference-1"&gt;[1]&lt;/a&gt;. This
invariably involves grabbing a handful of &lt;span class="caps"&gt;SD&lt;/span&gt; cards, flashing the release
candidate image to them, booting them on various models of Pi model and running
through a &lt;a class="reference external" href="https://iso.qa.ubuntu.com/"&gt;battery of tests&lt;/a&gt;. Once a board has passed or failed, pull the
card, reflash, bung it in another board, rinse and&amp;nbsp;repeat.&lt;/p&gt;
&lt;p&gt;This means the life of an &lt;span class="caps"&gt;SD&lt;/span&gt; card in my possession boils down to one of two&amp;nbsp;possibilities:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;If it&amp;#8217;s lucky, it gets stuck in a &amp;#8220;long running&amp;#8221; Pi serving something in my
house. This means 24x7 duty for many years, but usually relatively light&amp;nbsp;duty.&lt;/li&gt;
&lt;li&gt;If it&amp;#8217;s unlucky, it goes in the drawer and for much of the year it stays
there. But, before each release, it&amp;#8217;ll get hauled out and for a few days be
brutally tortured with tens of gigabytes written to it over and over&amp;nbsp;again.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If I have a card fail on me, it&amp;#8217;s inevitably during a release. This time was no
different, and I had a fancy gold-coloured &amp;#8220;SanDisk Extreme&amp;#8221; die. Rather than
one of the usual failure modes (fails to read entirely, or silently ignores
writes), this one wrote the candidate image happily but then reported tons of
I/O errors during boot. A little odd, but not&amp;nbsp;unprecedented.&lt;/p&gt;
&lt;p&gt;What was strange was that this card was barely more than 1½ years old. This is
an unusually short life-span, in my experience. Brutal though I am to these
test cards, they usually last 4 or more years. There was no time to investigate
during the release, so I tossed it in the &amp;#8220;dead cards&amp;#8221; drawer and moved on.
However, the release is now done, and I&amp;#8217;ve taken another&amp;nbsp;look.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="aaaa"&gt;
&lt;h2&gt;Aaaa!&lt;/h2&gt;
&lt;p&gt;When you insert an &lt;span class="caps"&gt;SD&lt;/span&gt; card into a Pi, if you&amp;#8217;re watching the kernel log (and I
often am in some window) you&amp;#8217;ll typically see something like the following&amp;nbsp;appear:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;
[344239.702588] mmc0: cannot verify signal voltage switch
[344239.771565] mmc0: new ultra high speed SDR104 SDHC card at address 59b4
[344239.771898] mmcblk0: mmc0:59b4 USD00 29.5 GiB
[344239.773131]  mmcblk0: p1 p2
[344239.773418] mmcblk0: mmc0:59b4 USD00 29.5 GiB
&lt;/pre&gt;
&lt;p&gt;What does all this&amp;nbsp;mean?&lt;/p&gt;
&lt;dl class="docutils"&gt;
&lt;dt&gt;mmc0: cannot verify signal voltage&amp;nbsp;switch&lt;/dt&gt;
&lt;dd&gt;Basically noise; just a warning that the signal voltage was switched but we
can&amp;#8217;t be sure it was successful (hardware&amp;nbsp;limitation).&lt;/dd&gt;
&lt;dt&gt;mmc0: new ultra high speed &lt;span class="caps"&gt;SDR104&lt;/span&gt; &lt;span class="caps"&gt;SDHC&lt;/span&gt; card at address&amp;nbsp;59b4&lt;/dt&gt;
&lt;dd&gt;The interface has noticed a new &lt;em&gt;ultra high speed&lt;/em&gt; (ooooh!) card which
supports &lt;span class="caps"&gt;SDR104&lt;/span&gt; signalling at &amp;#8220;address 59b4&amp;#8221;. Typically an interface only
has a single card slot, but technically it can support several. This is the
&amp;#8220;address&amp;#8221; of the card within that&amp;nbsp;interface.&lt;/dd&gt;
&lt;dt&gt;mmcblk0: mmc0:59b4 &lt;span class="caps"&gt;USD00&lt;/span&gt; 29.5&amp;nbsp;GiB&lt;/dt&gt;
&lt;dd&gt;Mostly a repeat of the prior information. This says the kernel&amp;#8217;s created a
new &amp;#8220;mmcblk0&amp;#8221; device representing the card with address &amp;#8220;59b4&amp;#8221; on the
&amp;#8220;mmc0&amp;#8221; interface, and it&amp;#8217;s about 29.&lt;span class="caps"&gt;5GB&lt;/span&gt; in&amp;nbsp;capacity…&lt;/dd&gt;
&lt;dt&gt;mmcblk0: p1&amp;nbsp;p2&lt;/dt&gt;
&lt;dd&gt;… and it&amp;#8217;s got two&amp;nbsp;partitions.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Incidentally, the above is from a Raspberry Pi branded &lt;span class="caps"&gt;SD&lt;/span&gt; card. Let&amp;#8217;s see what
the broken SanDisk Extreme&amp;nbsp;reports:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;
[341496.190074] mmc0: cannot verify signal voltage switch
[341496.266122] mmc0: new ultra high speed SDR104 SDXC card at address aaaa
[341496.266891] mmcblk0: mmc0:aaaa SN64G 59.5 GiB
[341496.268624]  mmcblk0: p1 p2
[341496.269098] mmcblk0: mmc0:aaaa SN64G 59.5 GiB (quirks 0x00004000)
&lt;/pre&gt;
&lt;p&gt;Huh. That &amp;#8220;aaaa&amp;#8221; address looks a bit&amp;nbsp;odd.&lt;/p&gt;
&lt;p&gt;This may be complete coincidence, but having come across fakes in the past,
sometimes dodgy cards have &amp;#8220;suspicious&amp;#8221; (read: low entropy) fields in their
registers. Serial numbers filled with zeros and the like. Querying other things
(&lt;span class="caps"&gt;CID&lt;/span&gt;, manufacturers &lt;span class="caps"&gt;ID&lt;/span&gt;, etc) under &lt;tt class="docutils literal"&gt;/sys/block/mmcblk0/device&lt;/tt&gt; yields nothing
terribly suspicious here, but nonetheless, this feels a little odd so let&amp;#8217;s dig
a bit&amp;nbsp;further.&lt;/p&gt;
&lt;p&gt;Rather than throwing my dead cards in the bin, in recent years I&amp;#8217;ve taken to
keeping them in a drawer. Most still have &lt;em&gt;some&lt;/em&gt; function, and I wondered if I
could spot any patterns in their failure&amp;nbsp;modes.&lt;/p&gt;
&lt;p&gt;In the drawer I&amp;#8217;ve got a &amp;#8220;SanDisk Ultra&amp;#8221; card (this is their &amp;#8220;bog standard&amp;#8221;
range with grey rather than gold colouring on the case) which failed a year ago
after a suspiciously short life-span. What does it report on&amp;nbsp;insertion?&lt;/p&gt;
&lt;pre class="code literal-block"&gt;
[341732.375548] mmc0: cannot verify signal voltage switch
[341732.448272] mmc0: new ultra high speed SDR104 SDHC card at address aaaa
[341732.448560] mmcblk0: mmc0:aaaa SD32G 29.7 GiB
[341732.450888]  mmcblk0: p1 p2
[341732.451108] mmcblk0: mmc0:aaaa SD32G 29.7 GiB (quirks 0x00004000)
&lt;/pre&gt;
&lt;p&gt;Hmm. Another &amp;#8220;aaaa&amp;#8221;. Still, maybe that&amp;#8217;s just the address that SanDisk cards
use generally? Let&amp;#8217;s try another SanDisk Ultra branded card which has so far
worked&amp;nbsp;reliably:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;
[345859.140220] mmc0: cannot verify signal voltage switch
[345859.209840] mmc0: new ultra high speed SDR104 SDXC card at address 59b4
[345859.210384] mmcblk0: mmc0:59b4 SD64G 59.4 GiB
[345859.212228]  mmcblk0: p1 p2
[345859.212795] mmcblk0: mmc0:59b4 SD64G 59.4 GiB (quirks 0x00004000)
&lt;/pre&gt;
&lt;p&gt;So, the &amp;#8220;aaaa&amp;#8221; address appears common to two cards both purportedly from
SanDisk, both of which failed suspiciously&amp;nbsp;early.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="aaaamazon"&gt;
&lt;h2&gt;Aaaamazon&lt;/h2&gt;
&lt;p&gt;Being more curious now I went and dug out my order history to see when and
where these were purchased. I&amp;#8217;m not 100% certain of which batch the &lt;span class="caps"&gt;32GB&lt;/span&gt;
&amp;#8220;Ultra&amp;#8221; card came in. However, I can say with confidence that both were
purchased from Amazon, both from the &amp;#8220;SanDisk Store&amp;#8221; on there, and at least 6
months elapsed between the purchase of the &lt;span class="caps"&gt;32GB&lt;/span&gt; &amp;#8220;Ultra&amp;#8221; card (latest February
2023) and the &lt;span class="caps"&gt;64GB&lt;/span&gt; &amp;#8220;Extreme&amp;#8221; card (July&amp;nbsp;2023).&lt;/p&gt;
&lt;p&gt;What to&amp;nbsp;do?&lt;/p&gt;
&lt;p&gt;Well, not much. It&amp;#8217;s another fake from Amazon (which more and more resembles an
online tat-store in my experience). Still, I figured in the interests of being
a conscientious consumer, I should leave a review cautioning others that even
buying from the official &amp;#8220;SanDisk Store&amp;#8221; is not a cast-iron guarantee of
quality. I spent 5 minutes throwing together a quick précis of the above (&amp;#8220;aaaa
reported by kernel&amp;#8221;, &amp;#8220;substantially shorter lifespan than other SanDisk cards&amp;#8221;,
etc.&amp;nbsp;etc.)&lt;/p&gt;
&lt;p&gt;And I would&amp;#8217;ve left it at that. But for the email that just&amp;nbsp;arrived…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Please edit and resubmit your&amp;nbsp;review&lt;/p&gt;
&lt;p&gt;Hello Dave Jones, We could not post your review because it does not meet
our community guidelines. Please edit and resubmit your review. Before you
do, make sure it meets all of our&amp;nbsp;guidelines.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Intriguing. I wonder which &amp;#8220;community guidelines&amp;#8221; I&amp;#8217;ve violated. Unfortunately,
while they&amp;#8217;ve linked to their guidelines (which are pretty much as one would
expect) they haven&amp;#8217;t specified which one I violated, and the review is
apparently gone. So I&amp;#8217;ve no&amp;nbsp;clue.&lt;/p&gt;
&lt;p&gt;Naturally, this leaves me feeling less-than-confident in the positively stellar
review ratings alongside this&amp;nbsp;product.&lt;/p&gt;
&lt;img alt="" class="align-center" src="https://waldorf.waveform.org.uk/images/sd-card-reviews.png" /&gt;
&lt;p&gt;Though, again, hilariously skewed reviews are hardly a new feature of Amazon
either. More importantly: can I still stand by my former advice? Probably&amp;nbsp;not.&lt;/p&gt;
&lt;blockquote&gt;
eBay, Amazon, Alibaba, whoever. If it&amp;#8217;s a large marketplace, I&amp;#8217;ve had fakes
from it (certainly from the aforementioned big three). Ideally, buy from
your local electronics vendor (&lt;a class="reference external" href="https://shop.pimoroni.com/products/microsd-card-with-raspberry-pi-os?variant=31703694245971"&gt;Pimoroni&lt;/a&gt; or &lt;a class="reference external" href="https://thepihut.com/products/sandisk-microsd-card-class-10-a1"&gt;The Pi Hut&lt;/a&gt; for me)
&lt;span class="strike"&gt;but failing that, look for the larger vendors on the big
marketplaces&lt;/span&gt;.&lt;/blockquote&gt;
&lt;hr class="docutils" /&gt;
&lt;table class="docutils footnote" frame="void" id="iso" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-1"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;span class="caps"&gt;ISO&lt;/span&gt; because this used to be limited to &lt;span class="caps"&gt;ISO&lt;/span&gt; &lt;span class="caps"&gt;CD&lt;/span&gt; images. Though we still
make &lt;span class="caps"&gt;ISO&lt;/span&gt; images for various platforms, we&amp;#8217;re just testing raw disk images
for the Pi.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
</content><category term="misc"></category><category term="sd"></category><category term="reliability"></category><category term="amazon"></category></entry><entry><title>Dealing the (SD) Cards</title><link href="https://waldorf.waveform.org.uk/2023/dealing-the-sd-cards.html" rel="alternate"></link><published>2023-09-12T00:00:00+01:00</published><updated>2025-02-27T23:04:13+00:00</updated><author><name>Dave Jones</name></author><id>tag:waldorf.waveform.org.uk,2023-09-12:/2023/dealing-the-sd-cards.html</id><summary type="html">&lt;p class="first last"&gt;A brief guide to finding reliable &lt;span class="caps"&gt;SD&lt;/span&gt; cards for the&amp;nbsp;Pi&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Updated&lt;/strong&gt; to remove large outlet recommendations, and fix&amp;nbsp;footnote&lt;/p&gt;
&lt;p&gt;It came to my attention recently that many people don&amp;#8217;t quite know what to look
for in a micro-&lt;span class="caps"&gt;SD&lt;/span&gt; card for use in a Pi. As mercilessly torturing micro-&lt;span class="caps"&gt;SD&lt;/span&gt; cards
is something of a hobby round here I thought I&amp;#8217;d write a quick guide to what to
look&amp;nbsp;for.&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;img alt="A variety of micro-SD cards arranged in an arc, adorned by various logos (SanDisk, Samsung, Transcend, Team), in a variety of capacities from the tiny (512MB) up to the moderately large (64GB). In a smaller arc below are a selection of &amp;quot;full-sized&amp;quot; SD card adapters, one of which bears the Raspberry Pi logo." src="https://waldorf.waveform.org.uk/images/sdcards2.webp" /&gt;
&lt;p class="caption"&gt;A small selection of the &lt;span class="caps"&gt;SD&lt;/span&gt; cards that have graced my desk over the years,
ranging from the rubbish to the really rather&amp;nbsp;good.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="vegas-standard"&gt;
&lt;h2&gt;Vegas&amp;nbsp;Standard&lt;/h2&gt;
&lt;p&gt;There have been many standards for &lt;span class="caps"&gt;SD&lt;/span&gt; cards to conform to over the years, but
the vast majority of them are concerned with &lt;em&gt;sequential&lt;/em&gt; transfer rates. These
started with the so-called &lt;a class="reference external" href="https://en.wikipedia.org/wiki/SD_card#Class"&gt;speed classes&lt;/a&gt;, where Class 4 implied that a card
could sustain a write speed of &lt;span class="caps"&gt;4MB&lt;/span&gt;/sec to the card, Class 6 implied &lt;span class="caps"&gt;6MB&lt;/span&gt;/sec and
so&amp;nbsp;on.&lt;/p&gt;
&lt;p&gt;Later there were the &lt;abbr title="Ultra High Speed"&gt;&lt;span class="caps"&gt;UHS&lt;/span&gt;&lt;/abbr&gt; speed classes, where U1 was
equivalent to the older Class-10, a sustained write speed of &lt;span class="caps"&gt;10MB&lt;/span&gt;/sec to the
card. U3 implied &lt;span class="caps"&gt;30MB&lt;/span&gt;/s sustained write speed. Why a new class system? Because
&lt;span class="caps"&gt;UHS&lt;/span&gt; also required a specific bus speed (confusingly designated &lt;span class="caps"&gt;UHS&lt;/span&gt;-I, then
&lt;span class="caps"&gt;UHS&lt;/span&gt;-&lt;span class="caps"&gt;II&lt;/span&gt;, etc). Hence, a U1 card must manage &lt;span class="caps"&gt;10MB&lt;/span&gt;/sec &lt;em&gt;minimum&lt;/em&gt; but the
corresponding bus speed could top out at &lt;span class="caps"&gt;104MB&lt;/span&gt;/s allowing considerably faster
read speeds (depending on bus&amp;nbsp;compatibility).&lt;/p&gt;
&lt;p&gt;Later still came the video speed classes. These still use the &lt;span class="caps"&gt;UHS&lt;/span&gt; bus
interfaces, but demand higher minimum sequential write speeds. V10 requires
&lt;span class="caps"&gt;10MB&lt;/span&gt;/s minimum, V60 requires &lt;span class="caps"&gt;60MB&lt;/span&gt;/s minimum and so on. Here&amp;#8217;s a nice little
table outlining the minimums required by each of these&amp;nbsp;classes.&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="37%" /&gt;
&lt;col width="16%" /&gt;
&lt;col width="22%" /&gt;
&lt;col width="25%" /&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;Minimum write performance&lt;/th&gt;
&lt;th class="head"&gt;Speed Class&lt;/th&gt;
&lt;th class="head"&gt;&lt;span class="caps"&gt;UHS&lt;/span&gt; Speed Class&lt;/th&gt;
&lt;th class="head"&gt;Video Speed Class&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="caps"&gt;2MB&lt;/span&gt;/s&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-class-2.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; Class 2 logo, a &amp;#8220;2&amp;#8221; within a stylized &amp;#8220;C&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;td&gt;&amp;#8212;&lt;/td&gt;
&lt;td&gt;&amp;#8212;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="caps"&gt;4MB&lt;/span&gt;/s&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-class-4.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; Class 4 logo, a &amp;#8220;4&amp;#8221; within a stylized &amp;#8220;C&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;td&gt;&amp;#8212;&lt;/td&gt;
&lt;td&gt;&amp;#8212;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="caps"&gt;6MB&lt;/span&gt;/s&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-class-6.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; Class 6 logo, a &amp;#8220;6&amp;#8221; within a stylized &amp;#8220;C&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;td&gt;&amp;#8212;&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-video-6.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; video 6 logo, a stylized &amp;#8220;V&amp;#8221; almost like a square root symbol
followed by a &amp;#8220;6&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="caps"&gt;10MB&lt;/span&gt;/s&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-class-10.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; Class 10 logo, a &amp;#8220;10&amp;#8221; within a stylized &amp;#8220;C&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-UHS-1.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; &lt;span class="caps"&gt;UHS&lt;/span&gt; 1 logo, a &amp;#8220;1&amp;#8221; within a stylized &amp;#8220;U&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-video-10.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; video 10 logo, a stylized &amp;#8220;V&amp;#8221; almost like a square root symbol
followed by a &amp;#8220;10&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="caps"&gt;30MB&lt;/span&gt;/s&lt;/td&gt;
&lt;td&gt;〃&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-UHS-3.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; &lt;span class="caps"&gt;UHS&lt;/span&gt; 3 logo, a &amp;#8220;3&amp;#8221; within a stylized &amp;#8220;U&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-video-30.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; video 30 logo, a stylized &amp;#8220;V&amp;#8221; almost like a square root symbol
followed by a &amp;#8220;30&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="caps"&gt;60MB&lt;/span&gt;/s&lt;/td&gt;
&lt;td&gt;〃&lt;/td&gt;
&lt;td&gt;〃&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-video-60.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; video 60 logo, a stylized &amp;#8220;V&amp;#8221; almost like a square root symbol
followed by a &amp;#8220;60&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="caps"&gt;90MB&lt;/span&gt;/s&lt;/td&gt;
&lt;td&gt;〃&lt;/td&gt;
&lt;td&gt;〃&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-video-90.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; video 90 logo, a stylized &amp;#8220;V&amp;#8221; almost like a square root symbol
followed by a &amp;#8220;90&amp;#8221;&lt;/object&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Got all that? Good. Now you can forget&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;As I mentioned above all of this is to do with &lt;em&gt;sequential&lt;/em&gt; access. This is
very useful in a camera where you&amp;#8217;re recording video frame after video frame
(or still image cameras that do … erm … exactly the same thing only much slower
with considerably larger frames!). However, this doesn&amp;#8217;t remotely resemble the
access pattern of an operating system on an &lt;span class="caps"&gt;SD&lt;/span&gt; card which will typically entail
hundreds of small writes to small files spread across a multitude of&amp;nbsp;sectors.&lt;/p&gt;
&lt;p&gt;In other words these classes will tell you next to &lt;em&gt;nothing&lt;/em&gt; about the
performance of your card in a Raspberry Pi. For that you need guarantees about
the minimum &lt;em&gt;random&lt;/em&gt; access performance. Luckily, the recent &lt;span class="caps"&gt;SD&lt;/span&gt; specifications
have a standard for that too: the application performance&amp;nbsp;classes.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="poker-face"&gt;
&lt;h2&gt;Poker&amp;nbsp;Face&lt;/h2&gt;
&lt;p&gt;At the time of writing, two application classes are defined: A1 which is
fairly common on decent cards, and A2 which is still somewhat &amp;#8220;premium&amp;#8221;. Their
minimum guarantees are as&amp;nbsp;follows:&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="36%" /&gt;
&lt;col width="38%" /&gt;
&lt;col width="26%" /&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;Minimum read performance&lt;/th&gt;
&lt;th class="head"&gt;Minimum write performance&lt;/th&gt;
&lt;th class="head"&gt;Application class&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;1500 &lt;span class="caps"&gt;IOPS&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;500 &lt;span class="caps"&gt;IOPS&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-app-1.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; video application-performance logo, a stylized &amp;#8220;A&amp;#8221; followed by
a &amp;#8220;1&amp;#8221; with &amp;#8220;app performance&amp;#8221; in capitals below&lt;/object&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;4000 &lt;span class="caps"&gt;IOPS&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;2000 &lt;span class="caps"&gt;IOPS&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;object data="https://waldorf.waveform.org.uk/images/SD-app-2.svg" style="height: 1em;" type="image/svg+xml"&gt;The &lt;span class="caps"&gt;SD&lt;/span&gt; video application-performance logo, a stylized &amp;#8220;A&amp;#8221; followed by
a &amp;#8220;2&amp;#8221; with &amp;#8220;app performance&amp;#8221; in capitals below&lt;/object&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Note that these guarantee both write &lt;em&gt;and read&lt;/em&gt; minimums. Further, they&amp;#8217;re not
concerned with bytes transferred, but with &lt;a class="reference external" href="https://en.wikipedia.org/wiki/IOPS"&gt;&lt;span class="caps"&gt;IOPS&lt;/span&gt;&lt;/a&gt;, or I/O operations per
second. The exact meaning of &lt;span class="caps"&gt;IOPS&lt;/span&gt; is rather loose across storage generally but
here it means the number of block sized (&lt;span class="caps"&gt;4KB&lt;/span&gt;) read or write commands that can
be carried out per second. Even this is relatively fuzzy because the controller
in an &lt;span class="caps"&gt;SD&lt;/span&gt; card is free to batch operations together. Erasure is almost always
batched into &amp;#8220;extents&amp;#8221; of blocks, and writes can be generally&amp;nbsp;too.&lt;/p&gt;
&lt;p&gt;In addition to the above requirements, A1 and A2 both require a minimum of
&lt;span class="caps"&gt;10MB&lt;/span&gt;/s sequential write speed (equivalent to the old Class 10 cards). This may
&lt;em&gt;appear&lt;/em&gt; excessive. After all, if A1 only demands that a card handle 500x &lt;span class="caps"&gt;4KB&lt;/span&gt;
writes per second, that only equates to &lt;span class="caps"&gt;2MB&lt;/span&gt;/s? However, remember that cards are
free to batch operations together. Cards that do &lt;em&gt;not&lt;/em&gt; conform to one of the
application classes may well display &lt;span class="caps"&gt;10MB&lt;/span&gt;/s sequential writes to one large file
by batching together smaller writes that are all in sequence. However, if asked
to perform many small &lt;span class="caps"&gt;4KB&lt;/span&gt;/s writes to a multitude of blocks, the performance
suddenly drops off a&amp;nbsp;cliff.&lt;/p&gt;
&lt;p&gt;In my experience, any reputable card with an A1 mark performs &amp;#8220;well&amp;#8221; on a Pi.
A2 cards from a given vendor perform better than A1 cards from that same
vendor, but I&amp;#8217;ve also had A1 cards from vendor A beat A2 cards from vendor B.
But when I say &amp;#8220;beats&amp;#8221;, I mean in performance benchmarks. I cannot say I ever
noticed a difference in daily&amp;nbsp;usage.&lt;/p&gt;
&lt;p&gt;To put it another way: A1 is the sweet spot right now, and A2 is &lt;em&gt;probably&lt;/em&gt; a
waste of money at this point unless you&amp;#8217;re quite sure you absolutely need the&amp;nbsp;performance.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="shooting-craps"&gt;
&lt;h2&gt;Shooting&amp;nbsp;Craps&lt;/h2&gt;
&lt;p&gt;The astute reader may have noticed my careful use of the word &amp;#8220;reputable&amp;#8221; just
before &amp;#8220;card&amp;#8221; in the prior section. &lt;a class="reference external" href="https://www.bunniestudios.com/blog/?p=918"&gt;Fakes&lt;/a&gt; are a problem, or have been in my
experience (though we&amp;#8217;re going back several years&amp;nbsp;here).&lt;/p&gt;
&lt;p&gt;Buy from well-known outlets, not minor vendors on whatever variant of
flea-bay you frequent &lt;a class="footnote-reference" href="#fleabay" id="footnote-reference-1"&gt;[1]&lt;/a&gt;. Just because it&amp;#8217;s on Amazon, doesn&amp;#8217;t mean
it&amp;#8217;s not a knock-off; &lt;span class="strike"&gt;check the actual seller&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Cheap, bulk deals are especially to be avoided. There&amp;#8217;s enough competition in
the micro-&lt;span class="caps"&gt;SD&lt;/span&gt; card market that there&amp;#8217;s usually little that can be (legitimately)
saved by buying in bulk; if the unit price is substantially below what you
could get the individual cards for, be&amp;nbsp;wary!&lt;/p&gt;
&lt;p&gt;To&amp;nbsp;summarize:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Buy well-known&amp;nbsp;brands,&lt;/li&gt;
&lt;li&gt;from reputable&amp;nbsp;vendors,&lt;/li&gt;
&lt;li&gt;avoiding bulk (or suspiciously cheap)&amp;nbsp;deals.&lt;/li&gt;
&lt;li&gt;Look for A1 or A2 on the casing &lt;a class="footnote-reference" href="#formula1" id="footnote-reference-2"&gt;[3]&lt;/a&gt;. Any modern card &lt;em&gt;without&lt;/em&gt; those
marks is likely to be rubbish for use in an &lt;abbr title="Single Board Computer"&gt;&lt;span class="caps"&gt;SBC&lt;/span&gt;&lt;/abbr&gt; like a Raspberry&amp;nbsp;Pi.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="grid col-2 docutils container"&gt;
&lt;object data="https://waldorf.waveform.org.uk/images/SD-app-1.svg" type="image/svg+xml"&gt;&lt;/object&gt;
&lt;object data="https://waldorf.waveform.org.uk/images/SD-app-2.svg" type="image/svg+xml"&gt;&lt;/object&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="the-long-game"&gt;
&lt;h2&gt;The Long&amp;nbsp;Game&lt;/h2&gt;
&lt;p&gt;I &lt;em&gt;haven&amp;#8217;t&lt;/em&gt; had any issues for the last few years, but during them I&amp;#8217;ve stuck
to buying strictly from either SanDisk or Samsung (also had a Toshiba card that
lasted many years without issue, but it&amp;#8217;s a singleton sample), and avoiding any
cheap-looking bulk&amp;nbsp;deals.&lt;/p&gt;
&lt;p&gt;This is not to say these cards last forever. But I have several Pis that run
24x7, and &amp;#8220;good&amp;#8221; cards seem quite capable of lasting at least 5 years in them,
which is &amp;#8220;good enough&amp;#8221; for my purposes (I&amp;#8217;ve had hard drives last less than
that&amp;nbsp;before!).&lt;/p&gt;
&lt;p&gt;The failure modes of micro-&lt;span class="caps"&gt;SD&lt;/span&gt; cards seem to fall into two&amp;nbsp;camps:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;completely dead &amp;#8212; the card can be detected in a reader but fails to mount
at&amp;nbsp;all&lt;/li&gt;
&lt;li&gt;going &amp;#8220;read-only&amp;#8221; &amp;#8212; the card will happily mount, and read pretty much
anything but all writes are silently thrown&amp;nbsp;away&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The latter &lt;em&gt;sounds&lt;/em&gt; preferable, and in some ways it is because if you have any
data you want to recover from it, you can do so. But it&amp;#8217;s also worse in certain&amp;nbsp;circumstances.&lt;/p&gt;
&lt;p&gt;Consider a board where the card &amp;#8220;goes read-only&amp;#8221;. It may appear to continue
operating quite happily (if it&amp;#8217;s serving a static site for instance), but all
writes to logs are being thrown away. It&amp;#8217;s also quite confusing to diagnose if
you&amp;#8217;re not specifically looking for it because the card may &lt;em&gt;appear&lt;/em&gt; to be
operating&amp;nbsp;normally.&lt;/p&gt;
&lt;p&gt;When dealing with a card I know to be old one of the first things I&amp;#8217;ll try
(assuming I can mount it at all), is &lt;tt class="docutils literal"&gt;touch foo&lt;/tt&gt;, remove and re-mount the
card, followed by &lt;tt class="docutils literal"&gt;ls&lt;/tt&gt; just to see if an empty &amp;#8220;foo&amp;#8221; file shows up. If it
doesn&amp;#8217;t, the card&amp;#8217;s almost certainly gone read-only and it&amp;#8217;s time to make a
fresh&amp;nbsp;one.&lt;/p&gt;
&lt;hr class="docutils" /&gt;
&lt;table class="docutils footnote" frame="void" id="fleabay" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-1"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;eBay, Amazon, Alibaba, whoever. If it&amp;#8217;s a large marketplace, I&amp;#8217;ve
had fakes from it (certainly from the aforementioned big three). Ideally,
buy from your local electronics vendor (&lt;a class="reference external" href="https://shop.pimoroni.com/products/microsd-card-with-raspberry-pi-os?variant=31703694245971"&gt;Pimoroni&lt;/a&gt; &lt;a class="footnote-reference" href="#pimcard" id="footnote-reference-3"&gt;[2]&lt;/a&gt; or &lt;a class="reference external" href="https://thepihut.com/products/sandisk-microsd-card-class-10-a1"&gt;The Pi
Hut&lt;/a&gt; for me) &lt;span class="strike"&gt;but failing that, look for the larger vendors on the
big marketplaces&lt;/span&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table class="docutils footnote" frame="void" id="pimcard" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-3"&gt;[2]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;span class="strike"&gt;Unfortunately, at the time of writing, Pimoroni&amp;#8217;s &lt;span class="caps"&gt;SD&lt;/span&gt;
card offering doesn&amp;#8217;t include shots of the *front* of the card. Being a
reputable company, I&amp;#8217;d be extremely surprised if they weren&amp;#8217;t good quality
A1 cards, but it&amp;#8217;d be nice to see this at least suggested visually!&lt;/span&gt; Oooh,
they&amp;#8217;re A2 cards!&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table class="docutils footnote" frame="void" id="formula1" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-2"&gt;[3]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Assuming you can make it out from the cacophany of logos. Is it
just me, or are micro-&lt;span class="caps"&gt;SD&lt;/span&gt; card cases beginning to look like the side of a
Formula 1 car?&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
</content><category term="misc"></category><category term="pi"></category><category term="sd"></category><category term="reliability"></category></entry></feed>