Grüezi YouTubers.
Here is the guy with the Swiss accent.
With a new episode around sensors and microcontrollers.
If you use Raspberry or Orange Pi computers, or any other small Linux board, you need SD
cards.
And because it is handy to have different cards for different projects, you need lots
of them…
In this video, I will try to find out how you can do this without spending more than
necessary.
I will try to answer the following questions: 1.
Does the size of the SD card has an implication on its speed?
2.
Do "better" or more expensive cards from the same supplier have an advantage?
3.
Is it better to buy clones or original SD cards?
In my evaluation, I will solely concentrate on performance on a Raspberry Pi 3.
I cannot measure the lifetime of such cards and if there is a difference between originals
and clones.
Most of my project cards anyway are not used in long-term applications.
So, I assume, that I will not have problems with defective SD cards.
Please comment, if you know anything about this aspect of the cards.
For this comparison, I used Samsung cards because Samsung is one of the biggest suppliers
and I happened to have already a few cards from this brand.
But I hope, they will not explode…
I will test 16, 32, and 64GB versions.
Smaller cards from original manufacturers are no more easily available.
The "Clone" cards come from Banggood, where I bought a few from different brands.
Here, I will only test 8 and 16 GB versions, because I think, for Raspberry projects this
is the most commonly used size.
So, let's start!
Here, you see the selection of my cards: I start with the originals: The cheapest series
is called "EVO".
Its description says: Grade 1, Class 10, UHS-I compatible, and up to 48MB/s transfer speed.
But, what does this mean?
Let's start with UHS-I.
This is the definition of the physical SD card interface.
UHS-II and UHS-III cards use additional pins of the SD card.
So, your device must support these standards, otherwise your card will use the normal interface
and will not perform at its top level.
And you would spend money for nothing.
All Raspberrys only have UHS-I interfaces.
The next is the speed specification.
There are three kinds of specifications, which are somehow overlapping: Speed Class, UHS
speed class, and video speed class.
The original speed class went only up to class 10.
Instead of extending it to higher values, they introduced a parallel new class, the
UHS speed class (not to be mixed with UHS-I interface).
UHS speed class 1 is the same as the old class 10.
Complicated enough?
No?
In order to increase complexity, they introduced a third class, the "video speed class".
Original speed class 10 is similar to V10.
Complicated enough now?
Still not?
Our card has "up to 45 MB/s" transfer speed.
Which would be above the UHS class 3.
But its spec is only class 10 or UHS 1, which means 10 MB/s.
Why that?
There are two reasons: 1.
Because it depends on how you use your SD card.
If you read from it or write to it.
And if you read or write large junks of data like video files or small junks like the update
of a database field.
2.
Class 10 specifies a minimal value of 10 MB/s, and the Samsung "marketing spec" states
the maximum of 48MB/s.
And even more: Because SD cards are not specified for the usage in microcontrollers, these values
only cover large files, not writing of data base fields and other common tasks of Raspberries.
So, we cannot depend on these numbers and we have to measure ourselves.
Because of this complexity, we need a first summary:
There are three hardware interface standards.
In this video, we only use UHS-I, because the Raspberry SD card slot only supports this
standard.
Then, we have three different speed classifications, which are similar and overlapping.
Most of the cards in this test are class 10 or UHS I or V10, which are similar or even
the same.
The standards define a minimum speed, the supplier print maximum speeds on their packages,
maybe because they think, consumers are stupid and believe the big numbers.
And finally, no one specifies the usage of their cards in operating system environments,
because they do not allow this usage.
So, lets continue with our own tests.
I purchased a bunch of SD cards.
It costed me a fortune, but for science, we sacrifice a lot…
As said before, most of the branded cards are from Samsung.
They manufacture different series with different speeds and also different prices.
And you get different sizes in all their series.
Here you see the cards I will use in this test: They cover all series, and many sizes.
Except 8GB, which these days is not easy to get anymore from these big suppliers, at least
not in Switzerland.
With this material, we can check, if the speeds of the different series with the same card
size varies.
And we also can test if there are differences in the same series between different sizes.
And of course, we will compare these branded cards with no-names from our usual source…
I purchased two 8GB cards from Tohaoll and Wansenda and three 16GB cards from Netac,
Mixza, and MicroSD Fortunately, other makers did already some
tests.
So, I can try to confirm their measurements, and, if so, use their results to extend my
list.
One who did extensive testing is "pidramble.com".
He used hdparm, dd and izone to do the testing.
hdparm gives basic raw throughput stats for buffered reads.
dd simply copies data from one place to another on the same disk.
Here, we make sure, we copy enough data that the files are really written to the file system,
not only to the memory cache.
Iozone seems to be a very robust filesystem benchmark tool, which does a lot of useful
tests that make sure you're getting a broad overview of read and write performance for
a variety of block sizes and situations.
In order to get comparable results, I use the same test procedure as he did.
Fortunately, he created a small script which installs the needed tools and perform all
tests on a Raspi.
I enhanced this procedure with the usual tests on a PC.
First, I used Crystal Diskmark 4 to test the sequential read and write performance as well
as the read and write of small 4k junks.
You find the results in the overview slide.
I will provide a link in the description.
I also measure the time Etcher needs to write a Raspbian Jessie image to the card.
This is also a task we quite often perform if we work with Raspberries.
Etcher, by the way, is the new tool to write images to SD cards.
I used it without verification.
The test procedure is quite simple, but (unfortunately) quite time consuming.
After testing each card with Crystal Diskmark in a USB3 card reader on the PC, I transferred
a new Raspbian jessie image to the SD card, started it up in a Raspberry 3, installed
the Linux benchmark tools, and executed the benchmarks.
And here is the result of such a test: First, the buffered read, then, the dd copy, and
third, the random read and write.
Now, let's discuss the results.
The first question is always: Are the results of my measurements valid?
To check this, I measured one card three times.
For that experiment, I used the most expensive card in the test: The Samsung Pro+ 32GB.
The results of hdpharm are comparable.
In the overview table, you will see, that this parameter is not very important, because
it is quite similar for most cards.
The fastest and slowest dd file copy speeds differ 20% and the random write speeds also
differ about 10%.
Summarized, the measurements are not very accurate and we probably should not compare
them up to the second decimal place…
If we compare the results with the slowest card in the test, however, we see quite a
difference.
So, the measured results should provide usable results to answer our questions from the beginning
of the video.
The next question is: Are my results comparable with the ones published on the internet?
To check that, I select a card where I have the most results, the EVO 16GB.
BTW: From now on, I scale all results to a scale from 0 to 100 where 100 is the fastest
and zero is the slowest result.
To create an overall index, I sum up the results of all tests.
We find quite big differences between the tests in the internet.
But the differences seem to be quite random.
For example, these two results are the same, and here, these, too.
But the totals differ too much for my taste.
So, I will not use the tests from the internet and concentrate on my own measurements.
But I will provide the results of the internet as an additional information for you.
Like that, at least I have the same conditions for all my tests.
So, we answered the technical questions and finally can start to answer our real question
1: Is there a difference between the different card sizes in the same series?
For this test, I used three EVO+ cards, and here is the result: The 32GB card is much
better in all aspects than the other two.
The 64GB card is slower than the other cards in most aspects.
Just the loading of the Raspbian image is faster.
Maybe the 64GB card is optimized for writing of large sequential files?
Let's check the two cards of the normal EVO series.
Here, the 32 GB card is much faster than the 16 GB version.
Unfortunately, I do not have more 32GB cards to compare.
So, I cannot confirm that the 32GB cards are always faster.
The next question is: Is it worthwhile to spend the money for a better (and more expensive)
card from the same supplier?
For the 16GB cards, the EVO+ version is considerably faster than the normal EVO card.
But the 32GB EVO and the EVO+ cards are very similar in speed.
The Pro+, however is quite a bit faster.
And if we compare the loading time for the jessie image, the PRO+ is more than 4 times
faster than the slowest 16GB EVO.
So, it really seems, that the newer cards are optimized for writing of large sequential
files.
Which is understandable with all these new 4k cameras which produce a lot of data…
Summarizing our results: 1.
Does the size of the SD card has an implication on its speed?
If you look at the overall result, we find the bigger cards in the higher rankings, though.
But not always as the Sandisk Extreme 8GB shows.
I think, it is not worthwhile to buy a too big card.
If you want to spend the money, it is better to spend it for a card of the higher series.
2.
Do "better" or more expensive cards from the same supplier have an advantage?
My tests suggest, that this is generally the case, however not in each discipline.
For me, it is questionable if the speed difference is worth the money.
3.
What about the clones?
Is it better to buy clones or original SD cards?
The verdict here is quite clear: Most of the clones are at the bottom of the ranking.
However, there are two exceptions: The Microdrive 16GB and the Black card without a name.
So, if you are lucky and you get a good one, it might be ok.
If not, the cards are really not worth the money.
Especially the random write measurements are horrible, even for the two "better" ones.
And this value is quite important for logging and for database applications on small microcontrollers
. And there is an additional problem with "clone
cards": Who is the manufacturer of the cards?
You should find the manufacturer in a field called CID.
The first two places of this long number should point you to the manufacturer.
If you look at the Samsung cards, they are all start with 1b.
The no-names have very strange numbers, which are not very trustworthy for me (123456 looks
like a really bad password).
So, even if you order a Microdrive SD card today, because I measured decent values, it
is not clear, if you get a card with the same properties as the seller maybe changed his
manufacturer in the meantime…
And you will still read 123456, but the speed values might be really slow.
A last thing: As I already mentioned before: There are many rumors out there concerning
lifetime of SD cards.
I did not find dependable information about this topic.
And because the manufacturers do not specify our usage pattern, I think, this will not
change in the near future.
I hope, this video was useful or at least interesting for you.
If true, then like.
Bye
Không có nhận xét nào:
Đăng nhận xét