RPi | Double SDcard IO (Read/Write speeds)

I love Raspberry Pi’s and I have been using them for years. Its also the very 1st DietPi image I created.

One of my major gripes with the RPi, is the limited performance of the SDcard IO (read and write) speed:
This is a known limitation with all Raspberry Pi’s and only 17.5mb/s read and write can be achieved. Whereas, other SBC’s (eg: Odroid C1/2) can offer SDcard IO performance at 40+mb/s

You can double the read and write performance to 35mb/s on all Raspberry Pi’s:


How?
First and foremost.
Make sure you have at least a UHS-1 capable SD card. Increasing the SDcard clock speed can cause data corruption if the card isnt capable. So please backup your data before hand using dietpi-backup to another location other than the SDcard (eg: USB Drive).
I’ve personally tested on Sandisk Extreme 16GB UHS-1 and UHS-3 cards and can confirm stability. Other brand SD card milage may vary, so this is at your own risk.

Ok, let do it
Simply add the following line to /boot/config.txt. For DietPi users, this will need to be applied to the Ramdisk location /DietPi/config.txt.

#dtoverlay=sdhost,overclock_50=84 #Outdated, but may still be functional
dtparam=sd_overclock=100

What this does is increase the SDcard bus from 50mhz to 84/100mhz.

Confirm SDcard IO read/write speeds:
After rebooting your system, simply run dietpi-config and select tools from the menu to run a SDcard benchmark.

What is DietPi?
At its core, DietPi is a highly optimized minimal image with various tools, including automated installation and optimizations of optional popular software. Ensuring you get the most from your device, and the software you choose to install.
Find out more: http://DietPi.com.


Mentions:
Many thanks to GTR2FAN on the RPi forums: The Raspberry Pi 3 Model B Q&A thread - Page 15 - Raspberry Pi Forums

This worked brilliantly on one of my installations (no proof, sorry), but I must reiterate the point that it can cause problems.
I have been doing some testing (and repeated re-installing) over the last couple of days on a Pi 3 (with some older 4GB SD cards) and discovered that each time I enabled this in my configuration file, it caused the onboard wifi to disappear. :smiling_imp:

Please watch out for this…

Hi Rich,

Great find. As the internal WiFi runs off the SDIO bus (https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale/#comment-1253749), it appears the upped frequency clock kills the WiFi.

I’am not sure if this is true, but I read somewhere (rpi forums, a while back) that setting the core_freq to 250mhz might allow for the increased SD card clock and WiFi. Bit of a trade off and Its untested, but I will give this a go over the weekend and report results.

I can confirm that wifi stops working for me… unfortunately. Maybe the overclockig frequenzy could be lowered so wifi plays nice.


Edit:
changing the sdhost value to either 50, 63 or 84 does not work, even if core_freq is set to 250. :frowning:

Hi Beerenheini,

Thanks for testing and letting us know the results. Its a shame SD overclock breaks RPi 3 WiFi. I’ve got so used to having 30mb/s +, I cant use a RPi without it lol.

Hi,

on a Raspberry Pi 3, you can try:

dtoverlay=sdhost,overclock_50=100

You can try other, lower overclock settings, as long as the number is an integer divisor of the core clock (default is 400 MHz on the Pi 3), e.g. 50, 80, or 100.

http://www.jeffgeerling.com/blog/2016/how-overclock-microsd-card-reader-on-raspberry-pi-3

And if it kills your WiFi connection:

Name: sdhost
Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock.
N.B. This overlay is designed for situations where the mmc driver is
the default, so it disables the other (mmc) interface - this will kill
WiFi on a Pi3. If this isn’t what you want, either use the sdtweak
overlay or the new sd_* dtparams of the base DTBs

you should try out the new " sdtweak-overlay.dtb " like:

dtoverlay=sdtweak,overclock_50=100
:~# cat /proc/version
Linux version 4.4.16+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #899 Thu Jul 28 12:36:19 BST 2016


:~# /boot/overlays/sd*
sdhost.dtbo     sdio-1bit.dtbo  sdio.dtbo       sdtweak.dtbo

K-plan you legend :slight_smile:. Have you tried this, running stable? If so, i’ll look at adding it to dietpi-config.

Hi,

Tried? Yes, on RPi 3 and RBi Zero with a cheap Verbatim 8GB Class 10 / UHS Class 1 Micro SDHC

RPi Zero on DietPi v129 (default):
160818-0002.gif
RPi Zero on DietPi v129 (sdtweak,overclock_50=100):
160818-0004.gif
RPi 3 on DietPi v129 (default):
160818-0001.gif
RPi 3 on DietPi v129 (sdtweak,overclock_50=100):
160818-0003.gif
NEW:
RPi 3 witch ScanDisk Extreme 16GB (UHS Class 3 Micro SDHC) on DietPi v128 (default):
160819-0006.gif
RPi 3 witch ScanDisk Extreme 16GB (UHS Class 3 Micro SDHC) on DietPi v128 (sdtweak,overclock_50=100):
160819-0007.gif
It’s works as well on a RPi B with

dtoverlay=sdhost,overclock_50=84

Stable?
Not really tested. This are only my devices for huntig bugs, no productive use.


On my RPi 3 can’t test with on board wifi, because I have break the support for brcmfmac interface …


Adding it to dietpi-config?
Sure, but only with hint as experimental feature.

Sorry for bringing back to life an old thread from the summer…but I’d like to confirm a few things since the original post by Fourdee and the followup post from K-Plan have slightly different details.

To overclock the SD card I need to edit this file on my DietPi - /DietPi/config.txt

In that file (anywhere? Does it matter where I put this) I add the line:

Fourdee - dtoverlay=sdhost,overclock_50=84
k-plan   - dtoverlay=sdtweak,overclock_50=100

Which do I use? In k-plans post it mentions that

“You can try other, lower overclock settings, as long as the number is an integer divisor of the core clock (default is 400 MHz on the Pi 3), e.g. 50, 80, or 100.”

This seems to say that I need to use only values of 50, 80 or 100…and not 84? When can I use Fourdee’s suggestion of 84 and when should I not?

and when do I need to install the sdtweak-overlay.dtb? I don’t use wifi on my Pi 3 so do I only add this if I want to use wifi?

Lastly…if DietPi uses Ramlog anyway so there is no writes to the card when using dietpi…will overclocking the SD parms in config.txt greatly improve performance due to increased Read speeds?

Thank you.

This seems to say that I need to use only values of 50, 80 or 100…and not 84? When can I use Fourdee’s suggestion of 84 and when should I not?

From what I remember during testing. I got the same results with 84/100mhz using Sandisk extreme uhs-3. But to confirm clocks, check dmesg for mmc entries.

In that file (anywhere? Does it matter where I put this) I add the line:

Anywhere is fine.

Which do I use? In k-plans post it mentions that

Either should work fine.

and when do I need to install the sdtweak-overlay.dtb? I don’t use wifi on my Pi 3 so do I only add this if I want to use wifi?

Setting dtoverlay=sdhost,overclock_50=84 does everything for you. To enable WiFi again, simply disable the line and reboot.

Lastly…if DietPi uses Ramlog anyway so there is no writes to the card when using dietpi…will overclocking the SD parms in config.txt greatly improve performance due to increased Read speeds?

Loading times are vastly reduced. Desktop users should notice a major improvement. Generally, the RPi will feel much more responsive.

Excellent! Thanks very much for these explanations Fourdee.