[TEST] New Raspberry Pi SD card driver

I get a “cannot find” error with iozone. Should it be iozone3 in the apt-get? sudo apt-get install iozone3

Based on iozone3 and the command @shadow posted, here are my results using 16GB SanDisk Ultra Plus:

Block Size 4k Write 1.26074 Rewrite 1.28516 Read 6.80566 Reread 6.81055 Random Read 5.18359 Random Write 0.764648
Block Size 512k Write 13.1777 Rewrite 13.29 Read 22.0938 Reread 22.085 Random Read 21.8555 Random Write 2.3252

Then assuming “sdhost” quoted by @DBMandrake is the new driver, here is a comparison summary:

4k results

+--------------+----------+--------------+-----------+---------------+
| category     | 32GB EVO | 32GB Samsung | 8GB Noobs | 16GB SD Ultra |
+--------------+----------+--------------+-----------+---------------+
| write        | 1.16     | 1.62         | 1.83      | 1.26          |
| rewrite      | 3.05     | 1.86         | 1.70      | 1.29          |
| read         | 8.46     | 7.53         | 6.17      | 6.81          |
| reread       | 8.47     | 7.48         | 6.19      | 6.81          |
| random read  | 8.45     | 7.47         | 4.97      | 5.18          |
| random write | 2.92     | 2.48         | 1.18      | 0.76          |
+--------------+----------+--------------+-----------+---------------+

512k results

+--------------+----------+--------------+-----------+---------------+
| category     | 32GB EVO | 32GB Samsung | 8GB Noobs | 16GB SD Ultra |
+--------------+----------+--------------+-----------+---------------+
| write        | 18.92    | 19.78        | 4.30      | 13.18         |
| rewrite      | 19.04    | 20.14        | 4.99      | 13.29         |
| read         | 22.38    | 22.00        | 20.76     | 22.09         |
| reread       | 22.36    | 21.99        | 20.68     | 22.09         |
| random read  | 22.36    | 22.00        | 20.64     | 21.86         |
| random write | 20.31    | 20.33        | 4.93      | 2.33          |
+--------------+----------+--------------+-----------+---------------+

Does it mean anything that my “random write” speeds are so low (e.g. 2.33 MB/s in the 512k case)? The write / rewrite speeds seemed better than Noobs, but then the random write is much slower.

Hi,
applied new Raspberry PI SD card driver here, first sensations boot faster and more fluid on video:

Raspberry PI2
Samsung 8 evo Micro SD HC 8GB class 10 UHS-1

Iozone:

Block Size 4k Write 1.13965 Rewrite 1.51172 Read 5.55273 Reread 5.64062 Random Read 5.08594 Random Write 1.16406
Block Size 512k Write 4.46191 Rewrite 5.91992 Read 21.0049 Reread 21.0254 Random Read 20.6416 Random Write 3.93359

I found a card that had some adverse results in some areas with the new sdhost driver.
Unlike my 32GB version of the same card line this one had a bad reaction in the 4k sizes but better in 512k

This one is my Samsung EVO 64GB
Old: Block Size 4k Write 3.37207 Rewrite 3.49902 Read 8.16699 Reread 8.17285 Random Read 8.12891 Random Write 3.52051
New: Block Size 4k Write 3.25781 Rewrite 3.39258 Read 7.62598 Reread 7.63086 Random Read 7.71484 Random Write 3.41211
Old: Block Size 512k Write 11.8779 Rewrite 12.0498 Read 18.6592 Reread 18.6709 Random Read 18.603 Random Write 12.097
New: Block Size 512k Write 14.4082 Rewrite 15.0742 Read 22.2803 Reread 22.2783 Random Read 22.252 Random Write 14.957

I did multiple tests with the same rough numbers in a boot and the more tests with reboots in between.

I’ve made two runs each time, there are results:

before driver update:


first run:
Block Size 4k Write 1.69434 Rewrite 2.19922 Read 5.84961 Reread 5.88281 Random Read 4.49805 Random Write 0.75293
Block Size 512k Write 11.1133 Rewrite 6.87305 Read 18.5371 Reread 18.3516 Random Read 18.3662 Random Write 2.79883

second run:
Block Size 4k Write 1.98828 Rewrite 2.36426 Read 5.77832 Reread 6.20605 Random Read 4.37305 Random Write 1.13086
Block Size 512k Write 8.56934 Rewrite 8.97852 Read 18.3271 Reread 13.2969 Random Read 18.1875 Random Write 3.16406

after:


first run:
Block Size 4k Write 1.7334 Rewrite 2.17969 Read 7.31641 Reread 7.26953 Random Read 4.99512 Random Write 0.806641
Block Size 512k Write 8.65723 Rewrite 8.10742 Read 22.2441 Reread 21.8535 Random Read 22.0332 Random Write 2.55859

second run:
Block Size 4k Write 1.83301 Rewrite 2.4209 Read 7.15625 Reread 6.71582 Random Read 5.27637 Random Write 0.798828
Block Size 512k Write 13.0352 Rewrite 11.8789 Read 22.2764 Reread 22.2832 Random Read 22.0957 Random Write 3.69043

I will write down SDCARD type and name, when I get hold of RPi2. I can’t figure out how to get sdcard info via ssh.

edit: card is SDHC I SanDisk Ultra 32GB class 10:

Hi everyone. Thanks for the feedback so far.

@JGrana I’m obtaining a card of the same type as yours, and I’ll see how it behaves.

1 Like

Has anyone else tested a sdxc card like my 64gb one. Maybe that’s why it has worse performance with the new driver.

Is there any point to test this with an nfs install?

No

Thought so, just making sure :slight_smile:

@JGrana I’ve received the card, and it is showing occasional failures, so I have a chance of finding and fixing the problem.

@shadow It’s possible that the performance drop at the 4K transfer size is due to the new driver being configured to use DMA for all transfers, whereas the old driver used PIO for small blocks. This is just a configuration change, and the evidence suggests that a non-zero value for the threshold improves some of the 4K numbers. Once I’ve decided on the best threshold (it’s a tradeoff between setup time and transfer speed) I’ll update the driver.

Thanks for the update Phil. Good luck!

already installed to card SanDisk Micro SDHC 8GB Ultra Class 10 on RPi1 and looks good… no issues,… so some testing will be done in few days, thanks for work guys :smile:

You didn’t mention the overclocking ability of the new sdhost driver but I decided to test for fun and it does work great

The card is my 32GB Samsung EVO

mmc: Block Size 4k Write 1.27637 Rewrite 2.68652 Read 7.23047 Reread 7.48535 Random Read 7.10352 Random Write 2.85352
sdhost 50: Block Size 4k Write 1.16113 Rewrite 3.05273 Read 8.45703 Reread 8.46777 Random Read 8.44531 Random Write 2.91895
sdhost 63: Block Size 4k Write 1.48633 Rewrite 3.21582 Read 8.66992 Reread 8.67969 Random Read 8.68066 Random Write 3.44434
sdhost 84: Block Size 4k Write 3.20117 Rewrite 3.95215 Read 8.69531 Reread 8.71094 Random Read 8.70996 Random Write 3.57031
sdhost 100 Block Size 4k Write 3.91211 Rewrite 4.03516 Read 9.20703 Reread 9.21875 Random Read 9.20215 Random Write 4.07617

mmc: Block Size 512k Write 17.2607 Rewrite 17.4854 Read 18.5693 Reread 18.5615 Random Read 18.5498 Random Write 17.5684
sdhost 50: Block Size 512k Write 18.9219 Rewrite 19.0361 Read 22.3799 Reread 22.3604 Random Read 22.3584 Random Write 20.3086
sdhost 63: Block Size 512k Write 24.4775 Rewrite 25.2744 Read 27.9014 Reread 27.9033 Random Read 27.8984 Random Write 25.8408
sdhost 84: Block Size 512k Write 30.7549 Rewrite 32.332 Read 36.7646 Reread 36.7676 Random Read 36.7588 Random Write 32.8369
sdhost 100 Block Size 512k Write 35.6953 Rewrite 37.709 Read 43.7188 Reread 43.7061 Random Read 43.7139 Random Write 38.5928

What settings are you using to overclock it and have you done any long term stability tests ? Being able to complete a speed test benchmark doesn’t mean that you won’t experience instability or data corruption on a long term basis.

I have the Pi 2 CPU over clocked with the highest settings preset in osmc settings then just over clocked the sdhost in config.txt I have left it on 100 and it was fine for the few hours I tested it. I will leave it and report in a couple days or if a problem occurs.

Ok. Here is sdhost overclocked to 90 on my Samsung 32GB (recommended multiple given that my core frequency is 450 as my Pi can’t run reliably on our Turbo preset)

sdhost 90:

Block Size 4k Write 2.6709 Rewrite 2.83691 Read 9.10156 Reread 9.08691 Random Read 9.02539 Random Write 2.49707
Block Size 512k Write 22.0723 Rewrite 25.9238 Read 38.7051 Reread 38.709 Random Read 38.71 Random Write 32.3916

sdhost default:

Block Size 4k Write 3.0166 Rewrite 2.83203 Read 7.55762 Reread 7.58496 Random Read 7.53711 Random Write 2.91895
Block Size 512k Write 16.2861 Rewrite 18.2373 Read 21.8896 Reread 21.9932 Random Read 22.0068 Random Write 19.8418

Quite a big increase for most figures, although interesting that 4K write actually slows down… lets see if it runs stable though…

Yeah, but I BET you get crashes.

Yep, seeing some random Kodi crashes when trying to enter movies with it set to 90. No errors in the log.

Cavet Emptor.

Did I call it or what?

Not so fast :smile:

Just got the same crash without overclocking sdhost and using a completely different brand of SD card…hmm. I’m thinking its skin related as I only recently changed to Refocus.

Sorry for the red herring people.