Overclocking SD cards on the Raspberry Pi

Warning: Overclocking SD cards can corrupt your data and possibly damage your SD card!

If you want better SD card speed and have an UHS-1/3-capable SD card, you can make the Pi run it with more than the standard of 50 Mhz. I tried this with a Rasperry Pi 0 (the non-W variant) and a Verbatim 8GB SD-HC Class 10 micro SD card (Model #44081) and settled at 80 MHz to be safe.

Some results using Jeff Gerlings benchmark suite:

SD clock in MHzRead speed in MB/s
50 (default)21.62
8026.51
10034.64
hdparm -t /dev/mmcblk0 (buffered disk reads, ~60-100 MB read)
SD clock in MHzCopy speed in MB/s
50 (default)14.4
8018.9
10017.2
dd if=/dev/zero of=~/test bs=8k count=50k conv=fsync (419430400 bytes (419 MB, 400 MiB) written)
SD clock in MHzwriterewritereadrereadrandom
read
random
write
50 (default)11731257519850854565666
8011321262576457654969699
10012031293590757565113688
iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2

Enable SD card overclocking by editing /boot/cofig.txt and add:

# Overclock SD card. Check with "sudo cat /sys/kernel/debug/mmc0/ios"
dtparam=sd_overclock=80

Make sure your overclock value is a fraction of your Pi’s core frequency (e.g. Rasperry Pi 0 core clock = 400MHz -> 400 / 5 = 80 Mhz). You can find the default core frequencies (“core_freq”) here.
You can print the current SD card hardware state with “sudo cat /sys/kernel/debug/mmc0/ios”:

clock:        50000000 Hz
actual clock:    100000000 Hz
vdd:        21 (3.3 ~ 3.4 V)
bus mode:    2 (push-pull)
chip select:    0 (don't care)
power mode:    2 (on)
bus width:    2 (4 bits)
timing spec:    2 (sd high-speed)
signal voltage:    0 (3.30 V)
driver type:    0 (driver type B)

Published by HorstBaerbel

Software developer by trade and interest, but I venture into the electronics- and diy-world from time to time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: