Raspberry Pi Model B UnixBench results using a UHS-I card

Here’s the UnixBench v5.1.3 result of my Raspberry Pi (model B). I’m using a SanDisk Extreme Pro UHS-1 card (up to 95MB/s) in the RPi’s SD card slot and the RPi is running Debian “Squeeze”.

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com

1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: rpi: GNU/Linux
   OS: GNU/Linux -- 3.1.9+ -- #138 PREEMPT Tue Jun 26 16:27:52 BST 2012
   Machine: armv6l (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   17:22:06 up 3 days, 18:33,  1 user,  load average: 0.36, 0.13, 0.11; runlevel 2

------------------------------------------------------------------------
Benchmark Run: Sat Jul 14 2012 17:22:06 - 17:50:25
0 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables        1258319.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                       29.7 MWIPS (9.8 s, 7 samples)
Execl Throughput                                223.1 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks         26948.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks            8150.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks         64959.4 KBps  (30.0 s, 2 samples)
Pipe Throughput                              123432.0 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  15023.0 lps   (10.0 s, 7 samples)
Process Creation                                634.1 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                    436.1 lpm   (60.1 s, 2 samples)
Shell Scripts (8 concurrent)                     56.1 lpm   (60.9 s, 2 samples)
System Call Overhead                         253373.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    1258319.6    107.8
Double-Precision Whetstone                       55.0         29.7      5.4
Execl Throughput                                 43.0        223.1     51.9
File Copy 1024 bufsize 2000 maxblocks          3960.0      26948.5     68.1
File Copy 256 bufsize 500 maxblocks            1655.0       8150.0     49.2
File Copy 4096 bufsize 8000 maxblocks          5800.0      64959.4    112.0
Pipe Throughput                               12440.0     123432.0     99.2
Pipe-based Context Switching                   4000.0      15023.0     37.6
Process Creation                                126.0        634.1     50.3
Shell Scripts (1 concurrent)                     42.4        436.1    102.9
Shell Scripts (8 concurrent)                      6.0         56.1     93.5
System Call Overhead                          15000.0     253373.7    168.9
                                                                   ========
System Benchmarks Index Score                                          62.3

8 thoughts on “Raspberry Pi Model B UnixBench results using a UHS-I card

  1. RPi’s MMC/SD card controller (EMMC) is _N_O_T_ the limiting factor. It can handle all UHS-I speed modes up to 104 MB/s (SDR104, see chapter 5 on page in http://www.raspberrypi.org/wp-.....herals.pdf).

    There is a clock input for the EMMC named “clk_emmc” (see page 65) provided by the clock manager module which togheter with the clock divider CLK_FREQ8/CLK_FREQ_MS2 (see pages 74 and 75) determines the clock of the interface to the card. The EMMC can use DMA to transfer its data to memory, too. Thus if the kernel device driver sets the clock and divider correctly and uses DMA, then the full speed of the card can be used.

    Using dd to write to the card via file system layer may lead to much lower transfer rates than the direct transfer rates (down to less than the half in the best case). Most newer files systems (e.g. ext4) use a journal by default. When data are written to the file system then

    1) First they are written to the journal.
    2) A background process/thread reads the journal data
    3) and writes them again to the final destination in the file system.

    So even if the whole journal is cached in the memory then the data are written at least two times which alone reduces the transfer rate to one half. If the journal data are not in the cache any longer then thay must be read again to the memory before they are written to their final destination. Additionally, metadata are read from and written to the card during this process. Further inappropriate block sizes of the file system can greatly reduce transfer rates. The file system should be explicitly created/tuned to use a block size equal to the erase block size of the respective flash memory or multiples (2, 4, 8, …) of them. For ext file systems this can be done by using the -b option together with the stride and stripe parameter. Also a bad alignment of partitions/file system blocks can significantly decrease the transfer performance.

    Results would be much more relevant if we write/read directly to the raw device (/dev/mmcblk0). This can be done by using a root partition on an USB device and by using the bootable SD card for boot time only. This way the bootable SD card can be removed after system has booted and a the SD card under test can be inserted instead and benchmarked then.

    I intend do this with an UHC-I card as soon as I will find some time and have ordered and gotten such a card.

    Regards,

    linuxball

  2. I have a Sandisk Extreme 32GB rated at 45MB/s and got the same ~20MB/s buffered reading speed as well. The card fares a much better reading speed closer to the advertised speed in an USB-3.0 card reader.

    In short, get an SD card that can do 20MB/s for current generation of RPi is the best bang of bucks.

  3. Brian, it looks like the limiting factor is the RPi’s bus/SD card controller whatever, which maxes out at around 20MB/s when using the provided Debian “Squeeze” OS image. On my notebook, the card performs around 3 times better for these tests.

  4. Am I reading those results correctly? A write speed of 26.3 MB/s for 1K size chunks and 63.4 MB/s for 4K sized chunks? The dd result by Jan would seem to indicate a mere 20.6 MB/s, but was Jan’s result using the SanDisk Extreme Pro UHS-1 card? Also a bs of 64K is another factor. Seems to be an apples and oranges thing. Although, I’d have half expected a better rating at 64K. SanDisk advertises a 90 MB/s rating for that card. I’d be curious to see the much cheaper Extreme, which boasts a 45 MB/s, rating. I’m considering one for my Pi.

  5. And here’s the result of the rather popular sequential disk write (dd) test:
    dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
    16384+0 records in
    16384+0 records out
    1073741824 bytes (1.1 GB) copied, 52.0759 s, 20.6 MB/s

    That looks pretty low to me. Maybe the SD card controller on the RPi can’t handle the UHS-1 speed?

Comments are closed.