runeks
Posts: 20
Joined: Mon Jul 23, 2012 11:34 am

Re: SD Card Benchmarks

Mon Jul 30, 2012 4:27 pm

I got my Pi, and my SD card which is a SanDisk Ultra 16GB Class 6 (SDSDH-016G-U46). I also says "30 MB/s - 200x" on the packaging.
So I managed to build iozone on the Pi and run some tests from the Pi itself. Here are the results (using the command iozone -e -I -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2):

Code: Select all

                                                            random  random
              KB  reclen   write rewrite    read    reread    read   write
           51200       4     931    1056     4499     4502    3724     601
           51200     512    6926    5974    21761    21755   21552    1846
           51200   16384    3913    6652    22303    22304   22295    6961
I also ran the the same test on my Ubuntu PC with the SD card connected to a USB reader (Sony MRW68E). Here are the results from that run:

Code: Select all

                                                            random  random
              KB  reclen   write rewrite    read    reread    read   write
           51200       4    1485    1415     3897     3893    3463     790
           51200     512    5092    4789    15611    15606   15512    1662
           51200   16384    3649    4807    15844    15858   15851    5116
So in short. The results look as follows on the Pi vs my PC:

Code: Select all

512KB block size:
   Sequential read:  Pi 21.8 MB/s, PC 15.6 MB/s
   Random read:      Pi 21.6 MB/s, PC 15.5 MB/s
   Sequential write: Pi 6.93 MB/s, PC 5.09 MB/s
   Random write:     Pi 1.85 MB/s, PC 1.66 MB/s

4KB block size:
   Sequential read:  Pi 4.50 MB/s, PC 3.90 MB/s
   Random read:      Pi 3.72 MB/s, PC 3.45 MB/s
   Sequential write: Pi 1.03 MB/s, PC 1.49 MB/s
   Random write:     Pi 0.60 MB/s, PC 0.79 MB/s
Now I did the test twice on the Pi, getting practically identical results on both runs. On the PC I only did it once though.

So it seems there are some differences between measuring on the Pi and a other devices, the most being a 30% difference, as far as I can see (sequential 4KB write).

Below is a link to a build of the iozone3 package for Raspbian in case anyone is interesting in benchmarking the SD card in the Pi directly using iozone. I'm not sure why it isn't available in the Raspbian repositories. It built fine for me, and it works fine as well (it's from non-free though).

https://dl.dropbox.com/u/15710882/iozon ... _armhf.deb

velola
Posts: 15
Joined: Mon Jul 30, 2012 12:02 pm

Re: SD Card Benchmarks

Mon Jul 30, 2012 6:01 pm

Using your build and running
runeks wrote:iozone -e -I -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2
gives me
Can not open temp file: iozone.tmp
open: Invalid argument
I tried to run as root and tried to create the temp file manually. No success :?:

runeks
Posts: 20
Joined: Mon Jul 23, 2012 11:34 am

Re: SD Card Benchmarks

Mon Jul 30, 2012 8:48 pm

What directory are you in when you run the command? It will test the speeds of whatever medium hosts the current directory. Or at least that's what it's supposed to do.

What version of Raspbian are you running? I'm running the newest (2012-07-15-wheezy-raspbian) version.

EDIT: Also, what file system are you using on the medium you are trying to test? I'm using ext4. Try executing without the -I option:

Code: Select all

iozone -e -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2

Maarten
Posts: 26
Joined: Sun Oct 23, 2011 6:42 pm

Re: SD Card Benchmarks

Mon Jul 30, 2012 9:34 pm

Threw iozone on my Pi for kicks (simply from the repository) running RaspBMC, gives the following results;

Code: Select all

              KB  reclen   write rewrite    read    reread    read   write    
           51200       4    6605   12603    16821    16913    2190     317
           51200     512   14079   14505    13446    13668   13325    2986
           51200   16384    9491   11914    12720    12618   16791   14863
So... erm... yeah :D Are we collecting this kind of data somewhere?

runeks
Posts: 20
Joined: Mon Jul 23, 2012 11:34 am

Re: SD Card Benchmarks

Mon Jul 30, 2012 9:46 pm

I would certainly suggest we do. But then we would need to all use the same command line options. The previous poster who had errors might throw off the benchmark if he is unable to use the -I option. We should also state (as precisely as possible) what SD card we have in our Pi's.

I have a picture in my head of a graph showing the random read and write speeds of a bunch of SD cards where - if we have multiple results for the same card - we use all the available data to show the average, and the minimum and maximum value for each measurement.

velola
Posts: 15
Joined: Mon Jul 30, 2012 12:02 pm

Re: SD Card Benchmarks

Tue Jul 31, 2012 1:36 am

runeks wrote:What directory are you in when you run the command? It will test the speeds of whatever medium hosts the current directory.
Good snipe there and thanks for reading the manual for me ;) I was running in /tmp – obviously not the right place for iozone...

The benchmark is running right now. From what I can see so far, my microSD is not of the faster sort :roll:

Code: Select all

              KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read   fwrite frewrite   fread  freread
           51200       4    1603    1831     4798     5027 tbc...
Lets hope it will be through in the morning.

velola
Posts: 15
Joined: Mon Jul 30, 2012 12:02 pm

Re: SD Card Benchmarks

Tue Jul 31, 2012 1:53 am

Finished sooner than expected. So here is the result for my 'SanDisk Class 4 8GB microSD HC' (I don't have more info on that card; bought it a few years ago for my freerunner):

Code: Select all

Command line used: iozone -e -I -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2
        ...

KB     reclen   write rewrite    read    reread    read   write
51200       4    1603    1831     4798     5027    4946      42
51200     512   14342   15371    21872    21892   21866    6242                                                          
51200   16384    6439   16022    22377    22376   22379   15534

portets
Posts: 188
Joined: Sat Oct 29, 2011 6:24 am

Re: SD Card Benchmarks

Tue Jul 31, 2012 1:53 am

http://elinux.org/RPi_Performance#SD_card has some sd card benchmarks people organized a while back. Since then, sd card performance and compatibility has improved.

I also don't know which way is better for measuring sd card performance.

runeks
Posts: 20
Joined: Mon Jul 23, 2012 11:34 am

Re: SD Card Benchmarks

Wed Aug 01, 2012 2:55 pm

To help identifying our SD Cards, can people post the output of the following command when they post results (from the Pi itself):

Code: Select all

head /sys/block/mmcblk0/device/{cid,csd,scr,*rev,manfid,oemid,name,serial}
This should help us figure out whether two seemingly identical SD Cards really are the same. The info for my SanDisk Ultra 16GB is the following:

Code: Select all

==> /sys/block/mmcblk0/device/cid <==
035344534431364780a05c4cd100b900

==> /sys/block/mmcblk0/device/csd <==
400e00325b59000076b27f800a404000

==> /sys/block/mmcblk0/device/scr <==
0235800100000000

==> /sys/block/mmcblk0/device/fwrev <==
0x0

==> /sys/block/mmcblk0/device/hwrev <==
0x8

==> /sys/block/mmcblk0/device/manfid <==
0x000003

==> /sys/block/mmcblk0/device/oemid <==
0x5344

==> /sys/block/mmcblk0/device/name <==
SD16G

==> /sys/block/mmcblk0/device/serial <==
0xa05c4cd1

velola
Posts: 15
Joined: Mon Jul 30, 2012 12:02 pm

Re: SD Card Benchmarks

Wed Aug 01, 2012 11:29 pm

Here we go:

'SanDisk Class 4 8GB microSD HC'

Code: Select all

==> /sys/block/mmcblk0/device/cid <==
03534453553038478020edc277008400
==> /sys/block/mmcblk0/device/csd <==
400e00325b5900003cdc7f800a404000
==> /sys/block/mmcblk0/device/scr <==
0235000000000000
==> /sys/block/mmcblk0/device/fwrev <==
0x0
==> /sys/block/mmcblk0/device/hwrev <==
0x8
==> /sys/block/mmcblk0/device/manfid <==
0x000003
==> /sys/block/mmcblk0/device/oemid <==
0x5344
==> /sys/block/mmcblk0/device/name <==
SU08G
==> /sys/block/mmcblk0/device/serial <==
0x20edc277
see above for benchmark (http://www.raspberrypi.org/phpBB3/viewt ... 64#p137164).

Rabjerg
Posts: 31
Joined: Fri Jun 29, 2012 7:56 am

Re: SD Card Benchmarks

Thu Aug 02, 2012 4:56 am

Image

CN Memory, 16gb Class 10
On the back it says: ADK52-123ME

hywelc
Posts: 1
Joined: Thu Aug 02, 2012 8:03 pm

Re: SD Card Benchmarks

Thu Aug 02, 2012 8:19 pm

Here are the results for the 7 cards I had round the house

Image

Image

So it looks like I should use the play.com 4GB card class 4 then do people think ??

LeroyZ84
Posts: 31
Joined: Fri Jul 27, 2012 9:23 pm

Re: SD Card Benchmarks

Fri Aug 03, 2012 7:29 am

SanDisk 8 GB SDHC Card Extreme Pro Class 10 (95MB/s UHS-I)
Type: SDSDXPA-008G-X46
OS XP proff

Image

Expected better results with this card,
optimized for performance, ntfs, disabled virusscanner, did nothing on the machine (Compaq 6710b Laptop)

Gegs
Posts: 1
Joined: Fri Aug 03, 2012 6:00 pm

Re: SD Card Benchmarks

Fri Aug 03, 2012 6:18 pm

Not entirely sure what to make of the results thus far. Would I be partially correct in saying that it seems that class 6 Sandisk SD cards are among the top? It seems they have decent random 4k read/write speeds when compared to anything else.

One question I do have for existing pi owners (mine's being shipped) is whether or not there is any real world performance gain between different SD cards. If so, what sort of experiences may differ and to what extent? Would application responsiveness be noticeably effected?

pmackinney
Posts: 2
Joined: Wed Jul 18, 2012 1:16 pm

Re: SD Card Benchmarks

Fri Aug 03, 2012 8:22 pm

Are SD cards enough slower than USB to make it worth migrating your root system to a USB stick?
Any instructions for doing this without reinstalling?

Feel free to direct me to another thread, this feels a bit off-topic. FWIW, I have a 2G SanDisk(4) and a 16G Kensington(4), both work fine. Haven't bothered to bench them because they seem to be well-represented.

jukimatori
Posts: 1
Joined: Sun Aug 05, 2012 12:31 pm

Re: SD Card Benchmarks

Sun Aug 05, 2012 12:41 pm

Hi all.

First thanks to runeks for the iozone package.

Here is my results (SDCard: Transcend SDHC 32 Go Classe 10 (TS32GSDHC10E)) :
# iozone -e -I -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2

Code: Select all

	Iozone: Performance Test of File I/O
	        Version $Revision: 3.397 $
		Compiled for 32 bit mode.
		Build: linux 

	Include fsync in write timing
	O_DIRECT feature enabled
	Auto Mode
	File size set to 51200 KB
	Record Size 4 KB
	Record Size 512 KB
	Record Size 16384 KB
	Command line used: iozone -e -I -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2
	Output is in Kbytes/sec
	Time Resolution = 0.000001 seconds.
	Processor cache size set to 1024 Kbytes.
	Processor cache line size set to 32 bytes.
	File stride size set to 17 * record size.
                                                            random  random    bkwd   record   stride                                   
              KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read   fwrite frewrite   fread  freread
           51200       4    1245    1400     4260     4262    4087      17                                                          
           51200     512    9142   10954    21317    21355   21316    719                                                          
           51200   16384   10590   12694    21149    21188   21184   10662
That seems not to bad but I'm a bit worried about the last "17" on the first line...

The card CID:

Code: Select all

 man:0x000074 oem:0x4a45 name:SDC   hwrev:0x1 fwrev:0x0
I'm using the PI card since few days only but it seems really slow to me (I'm using it only on text mode for now and even a simple "aptitude update" is taking a lot of time... (about 2minutes)).

Have fun anyway.

Minor_Miner
Posts: 7
Joined: Sat Jul 07, 2012 7:41 pm

Re: SD Card Benchmarks

Sun Aug 12, 2012 1:09 am

This is my first post on these forums, so take it easy on me. :)

I just got an 8 gig Micro SDHC card, a Sandisk Mobile Ultra Class 6, with an advertised speed of 30 megs a second, and put it through some benchmarks on my desktop's built in card reader.

Here's the results:

-----------------------------------------------------------------------
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo
Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

Sequential Read : 19.536 MB/s
Sequential Write : 9.192 MB/s
Random Read 512KB : 19.131 MB/s
Random Write 512KB : 3.747 MB/s
Random Read 4KB (QD=1) : 3.789 MB/s [ 925.0 IOPS]
Random Write 4KB (QD=1) : 1.385 MB/s [ 338.0 IOPS]
Random Read 4KB (QD=32) : 3.776 MB/s [ 921.9 IOPS]
Random Write 4KB (QD=32) : 1.070 MB/s [ 261.3 IOPS]

Test : 50 MB [E: 0.0% (0.0/7572.0 MB)] (x3)
Date : 2012/08/11 21:01:43
OS : Windows 7 Home Premium Edition SP1 [6.1 Build 7601] (x64)
Sandisk Mobile Ultra 8GB Class 6
--------------------------------------------------------------------------------------------------------

I'm pretty happy with those 4K random writes. This card was benched the first time I put it in my computer, and nothing was done to it before the test. I hope this helps!

Mister Fab
Posts: 23
Joined: Mon Aug 06, 2012 7:20 am
Location: France - Toulouse

Re: SD Card Benchmarks

Wed Aug 22, 2012 8:23 am

Extrememory SDHC 8GB Class 10

Image

rgx
Posts: 1
Joined: Sun Aug 26, 2012 10:03 am

Re: SD Card Benchmarks

Sun Aug 26, 2012 10:32 am

Here are my results for a Sandisk Class 4 SDHC 8 GB card SDSDB-008G-B35. The test was run on a Zenbook with Ubuntu, via USB 2.0 card reader.

Code: Select all

                                                            random  random    bkwd   record   stride                                   
              KB  reclen   write rewrite    read    reread    read   write    read
           51200       4    4059    4561     8628     7859    4698     244                                                          
           51200     512    5331    5184    19621    20078   19700    1784                                                          
Usable but somewhat disappointing, would have been nice to reach 1MB/s. Let's hope the manufacturers will offer a line of cards for random read/write. If they can have several logos and classes for photo and video (Class 2, 4, 6, 10, UHS-1, and Ultra, Extreme, Extreme HD, Extreme Pro) so why not an Ultra Pi.

lenovox201
Posts: 3
Joined: Mon Aug 27, 2012 2:21 am

Re: SD Card Benchmarks

Mon Aug 27, 2012 2:47 am

xkxx wrote:sandisk extreme has the reputation of the only sd card that is suitable for serious server use. if this one doesn't work for raspi i'll definitely yell at someone.
I'm sorry to report that it doesn't work. I tried a SanDisk Extreme Class 10 16GB card and it wouldn't work in the Pi.

carlosfm
Posts: 132
Joined: Fri Oct 21, 2011 3:23 pm
Location: Lisbon, Portugal

Re: SD Card Benchmarks

Mon Aug 27, 2012 9:46 pm

I have a 16GB Sandisk Extreme Class 10 45MB/s working fine on my Pi.
Actually, it's the fastest and most reliable card I have for my Pi (I have 4 from different brands, all class 10).

Do not spend extra money on the Extreme 95MB/s, you would need USB3 to take advantage of it.
The Pi has USB2, so even the Extreme 45MB/s will never be used at it's full potential.
35MB/s was the maximum I've measured with USB2, on a PC.
Do you Pi?

Frepa
Posts: 1
Joined: Thu Aug 30, 2012 9:17 am

Re: SD Card Benchmarks

Thu Aug 30, 2012 11:04 am

I have been playing with iozone on the pi, running raspbian. iozone -a runs lots of tests for different file sizes and block sizes. As expected, performance is much better with cache than without (using the flags -e -I). Now I wonder: Does the small-block random write speed have a large influence on how the card works in practice, given that the cache helps so much? What about the random read speed?

I posted some quick instructions for building iozone on raspbian here, together with some more detailed results. http://itsacleanmachine.blogspot.fi/201 ... ry-pi.html

The iozone -a benchmark takes over one hour to complete. Should one worry about wearing out the SD-card with writes?

And finally the results of the "standard" test on my card, SDHC 8G, Class 4 from Sandisk. From a German Mediamarkt, 8 euro.

Code: Select all

./iozone -e -I -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2
   KB  reclen   write rewrite    read    reread    read   write 
 51200       4     913     991     3279     3278    3061     457                                                          
 51200     512    5292    5370    11305    11304   11218    1319                                                          
 51200   16384    5122    5442    11442    11442   11442    5406 
A picture of the card is here: http://itsacleanmachine.blogspot.com/20 ... ry-pi.html

rdatoc
Posts: 4
Joined: Wed Sep 05, 2012 10:21 pm

Re: SD Card Benchmarks

Thu Sep 06, 2012 12:57 am

Fredrik, thanks for blogging that info about installing and running iozone. I was curious if an SSD would make much difference, specially for operations that read and/or write a lot of small files (compiling, serving web pages, etc). As I happened to have a 128GB Crucial M4 that I was going to upgrade my PC with, I did some benchmarks to compare it with my SD card (which does ~500k random 4k writes in CrystalDiskMark). FYI, the ext4 partition on the Crucial was properly aligned (2048 sectors/1 MiB).

Sandisk Class 4 MicroSDHC 8GB:

Code: Select all

                                          random  random
reclen   write rewrite    read    reread    read   write
     4    1346    1576     1430     1430    1177     604
   512    4665    5386    14448    14451   14044    4509
 16384    5206    5545    14592    14598   14483    5456
Crucial M4 128GB:

Code: Select all

                                          random  random
reclen   write rewrite    read    reread    read   write
     4    3966    5079     5212     5215    5132    5017
   512   29810   30282    29326    29374   29199   30290
 16384   31857   31639    31318    31355   31246   31761
For those curious about file sizes between 4k and 512K

Sandisk Class 4 MicroSDHC 8GB:

Code: Select all

                                          random  random
reclen   write rewrite    read    reread    read   write
     8    2196    2383     2389     2389    2141    1077
    16    3304    3209     4334     4333    3861    1729
    32    4990    4741     6938     6901    6195    2617
    64    5210    4871     9547     9481    8808    2655
   128    5529    5316    11756    11756   11121    3350
   256    5476    5349    13404    13403   12893    3651
Crucial M4 128GB:

Code: Select all

                                          random  random
reclen   write rewrite    read    reread    read   write
     8    7017    8557     8867     8873    8097    7975
    16   11755   13260    13549    13649   12671   13210
    32   17230   19466    19416    19416   18573   19430
    64   23053   24688    24288    24299   23605   24301
   128   25477   26640    25919    25960   25860   26534
   256   28229   28753    28139    28165   27731   28782
It would be interesting to compare a laptop HDD as well but I'm afraid I might run out of power on my USB hub (5v, 2.0A) which the Pi and SSD are plugged into. I could run the Pi on a separate power supply but I think I'll leave that for later. Also considering doing a kernel compilation benchmark, which would have to be run overnight (per the Wiki, 8-11 hours on the Pi).

Finally one last table showing the speedup of an SSD vs SD, with the caveat that I've made relatively few runs of iozone on each device, and that this compares the best values out of those runs.

Code: Select all

                                          random  random
reclen   write rewrite    read    reread    read   write
    4      3.0     3.3     3.7       3.7     4.4     8.4
    8      3.2     3.6     3.8       3.8     3.8     7.5
   16      3.6     4.2     3.2       3.2     3.3     7.7
   32      3.5     4.2     2.8       2.9     3.0     7.5
   64      4.5     5.1     2.6       2.6     2.7     9.2
  128      4.7     5.1     2.3       2.3     2.4     8.0
  256      5.2     5.4     2.1       2.2     2.2     7.9
  512      6.4     5.7     2.1       2.1     2.1     6.8
16384      6.2     5.8     2.2       2.2     2.2     5.9

rdatoc
Posts: 4
Joined: Wed Sep 05, 2012 10:21 pm

Re: SD Card Benchmarks

Thu Sep 06, 2012 4:36 am

Posted a reply with my SD and SSD benchmarks but it seems to have fallen into a black hole...

User avatar
stevepdp
Posts: 287
Joined: Fri Oct 28, 2011 7:41 am
Location: Norfolk, UK

Re: SD Card Benchmarks

Thu Sep 06, 2012 5:27 am

rdatoc wrote:Posted a reply with my SD and SSD benchmarks but it seems to have fallen into a black hole...
All new accounts must have their first post approved by a mod.
Jam games and post-mortems: stevepdp.dev/games.html

Return to “General discussion”