User avatar
geerlingguy
Posts: 35
Joined: Sun Feb 15, 2015 3:43 am
Location: St. Louis, MO, USA
Contact: Website Twitter

Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 7:13 pm

I just wanted to post some test results here, since the only topics I've found dealing with microSD card overclocking seemed to be a bit scattered about, and there were no simple "step 1, step 2, step 3" guides to testing and benchmarking microSD performance on the Pi 2/Pi 3.

tl;dr: I finally received a Pi 3 a couple days ago, and wanted to test overclocking the microSD reader on it for my nicer UHS-1/UHS-3 cards (like the Samsung Evo+ and Pro+, and the SanDisk Extreme), and I've published instructions and benchmarks on my blog here: http://www.jeffgeerling.com/blog/2016/h ... berry-pi-3.

WARNING: If you care about your microSD card's contents, or don't know what you're doing, it's safest to not overclock.

With that out of the way, you need to do two things to set up the overclock (assuming you have the latest Raspbian version installed):
  • Add a dtoverlay in config.txt:

    Code: Select all

    sudo bash -c 'printf "dtoverlay=sdhost,overclock_50=100\n" >> /boot/config.txt'
  • Reboot the Pi.
Reboot the Pi, and you should now have an overclocked microSD reader.

There's a simple benchmark that tests large file operations that I've seen elsewhere; you can run it quickly with:

Code: Select all

curl http://www.nmacleod.com/public/sdbench.sh | sudo bash
The benchmark I typically use (which tests 4K read/write using iozone) is:

Code: Select all

curl https://raw.githubusercontent.com/geerlingguy/raspberry-pi-dramble/master/setup/benchmarks/microsd-benchmarks.sh | sudo bash
The above scripts that you might be inclined to run through sudo bash are coming from either GitHub or someone's personal site... so always vet code before you run it on your own machine, and consider not using it if your Pi and the data on it is important to you :)
Last edited by geerlingguy on Wed Mar 16, 2016 8:11 pm, edited 1 time in total.
My personal site: http://jeffgeerling.com/

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 7:23 pm

Just adding...

Code: Select all

dtoverlay=sdhost,overclock_50=100
...to config.txt should work fine in a standard Raspbian Jessie install without having to do anything else.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

User avatar
geerlingguy
Posts: 35
Joined: Sun Feb 15, 2015 3:43 am
Location: St. Louis, MO, USA
Contact: Website Twitter

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 7:27 pm

GTR2Fan wrote:Just adding...

Code: Select all

dtoverlay=sdhost,overclock_50=100
...to config.txt should work fine in a standard Raspbian Jessie install without having to do anything else.
On my Pi 3 with Raspbian Lite (even after apt-get upgrade), I had to download the .dtb... I'm wondering if on regular Raspbian it gets placed correctly, but something's missing on Lite? Also, afaict, 'sudo rpi-update' isn't available on Lite either.

I hate using regular Raspbian for benchmarking because it's such a heavy image.
My personal site: http://jeffgeerling.com/

Nickcn
Posts: 200
Joined: Sat Mar 05, 2016 8:18 pm
Location: USA

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 7:36 pm

deleted
Last edited by Nickcn on Mon May 16, 2016 3:23 am, edited 1 time in total.

DirkS
Posts: 9956
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 7:36 pm

geerlingguy wrote:On my Pi 3 with Raspbian Lite (even after apt-get upgrade), I had to download the .dtb... I'm wondering if on regular Raspbian it gets placed correctly, but something's missing on Lite? Also, afaict, 'sudo rpi-update' isn't available on Lite either
Just checked and sdhost-overlay.dtb *is* included in the latest Jessie Lite image (2016-02-26)...

rpi-update is not installed by default anymore

User avatar
geerlingguy
Posts: 35
Joined: Sun Feb 15, 2015 3:43 am
Location: St. Louis, MO, USA
Contact: Website Twitter

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 8:08 pm

DirkS wrote:Just checked and sdhost-overlay.dtb *is* included in the latest Jessie Lite image (2016-02-26)...

rpi-update is not installed by default anymore
I'm cloning from 2016-02-26-raspbian-jessie-lite.img, which I downloaded from https://www.raspberrypi.org/downloads/raspbian/, and the sdhost-overlay.dtb is present, but not the sdtweak one... AH! Just now realized sdhost is all you need. D'oh!

I'll update the instructions.
My personal site: http://jeffgeerling.com/

User avatar
Trixster
Posts: 261
Joined: Sat Jul 07, 2012 3:53 pm

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 8:32 pm

In my experience adding "dtoverlay=sdhost,overclock_50=100" stops the wifi adapter on an rpi3 from working.

Instead use "dtoverlay=sdtweak,overclock_50=100", assuming you have sdtweak in overlays. I had to copy it over from my openelec image.

User avatar
geerlingguy
Posts: 35
Joined: Sun Feb 15, 2015 3:43 am
Location: St. Louis, MO, USA
Contact: Website Twitter

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 8:38 pm

Trixster wrote:In my experience adding "dtoverlay=sdhost,overclock_50=100" stops the wifi adapter on an rpi3 from working.

Instead use "dtoverlay=sdtweak,overclock_50=100", assuming you have sdtweak in overlays. I had to copy it over from my openelec image.
Hmm, sounds like the issue that's been reported here, then: viewtopic.php?p=928516#p928516

So is sdtweak going to be added to the overlays? @PhilE's post from that thread, two days ago:
PhilE wrote:It's in the very latest firmware (sudo rpi-update) but may not have been built into a Raspbian update yet.
I'm not using the built-in WiFi at this time, so haven't tested with it at all. I used it for some benchmarking, but not in tandem with the sd overclocking.
My personal site: http://jeffgeerling.com/

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 8:42 pm

Reading a few posts up from that one by PhilE makes it look as though a fix for the Pi3 is already available for dtoverlay=sdhost,overclock_50=100 via rpi-update and waiting to be pushed to main. I mistakenly thought that it was already properly sorted for the Pi3 in main. It looks as though it will be very soon. Apologies for any confusion caused.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

DirkS
Posts: 9956
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Raspberry Pi 3 microSD card overclock

Wed Mar 16, 2016 9:08 pm

geerlingguy wrote:[So is sdtweak going to be added to the overlays? @PhilE's post from that thread, two days ago:
It's in the 'next' branch of the firmware repo:
https://github.com/raspberrypi/firmware ... t/overlays

ziddey
Posts: 19
Joined: Thu Mar 10, 2016 7:42 am

Re: Raspberry Pi 3 microSD card overclock

Thu Mar 17, 2016 4:44 am

Just use the dtparam:
dtparam=sd_overclock=100

Note: for rpi3, you'll need to rpi-update.

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: Raspberry Pi 3 microSD card overclock

Thu Apr 28, 2016 12:21 am

ziddey wrote:Just use the dtparam:
dtparam=sd_overclock=100

Note: for rpi3, you'll need to rpi-update.
No you don't.

it is in the apt-get update, apt-get upgrade, and all current Jessie dist versions since April or so.
DNPNWO

User avatar
MartinPi
Posts: 83
Joined: Sun Nov 29, 2015 4:45 pm

Re: Raspberry Pi 3 microSD card overclock

Mon May 30, 2016 9:50 am

GTR2Fan wrote:Just adding...

Code: Select all

dtoverlay=sdhost,overclock_50=100
...to config.txt should work fine in a standard Raspbian Jessie install without having to do anything else.
What about Ubuntu Mate? Wish to overclock the card reader on it.
Raspberry Pi 3 32GB with 32-inch Monitor
Rasberry Pi Zero 32GB

cruster
Posts: 118
Joined: Mon Sep 01, 2014 7:56 pm

Re: Raspberry Pi 3 microSD card overclock

Tue Nov 01, 2016 5:31 pm

ziddey wrote:Just use the dtparam:
dtparam=sd_overclock=100

Note: for rpi3, you'll need to rpi-update.
Gosh! What a difference on my Sandisk Extreme. Thank you so much! :D

pimate2
Posts: 2
Joined: Tue Dec 05, 2017 1:26 pm
Location: Canada

Re: Raspberry Pi 3 microSD card overclock

Tue Dec 05, 2017 5:02 pm

ziddey wrote:
Thu Mar 17, 2016 4:44 am
Just use the dtparam:
dtparam=sd_overclock=100

Note: for rpi3, you'll need to rpi-update.
Thank you!

rpi-update was not required on latest Stretch.

AnythingIsFine
Posts: 2
Joined: Thu Apr 19, 2018 6:40 pm

Re: Raspberry Pi 3 microSD card overclock

Thu Apr 19, 2018 7:07 pm

Hello,

I'm unable to overclock my microSD card reader to 100MHz on my Raspi 3 B Plus.
I have edited the

Code: Select all

/boot/config.txt 
file 4 times, each time adding only 1 of the below lines and rebooted, yet it never seems to be able to boot up.

#1.

Code: Select all

dtoverlay=sdhost,overclock_50=100
, it would not boot up.
#2.

Code: Select all

dtoverlay=sdhost,overclock_50=83
, it would not boot up.
#3.

Code: Select all

dtoverlay=sdtweak,overclock_50=83
, it would not boot up.
#3.

Code: Select all

dtparam=sd_overclock=100
, it would not boot up.

After editing the config.txt it looks like the pi is unable to read/find microSD card, as I have no entries in my systemlog or dmesg that would hint what's happening.

* Has anyone encountered this issue and if not can someone with the same SW and HW setup please try to reproduce this ?

HW:
Raspberry Pi 3 B Plus board
Samsung Evo Plus 32GB microSD card
2.5A at 5.1 V official Raspberry PSU

OS:
Raspbian Strech 9.4 Lite and latest firmware as of 2018-04-19 (version c1f3e94f22866aa26e41b4d107e6e3741b917a98)

Thanks!

Return to “General discussion”