Raspberry Pi overclock the sdhost bus

Hi everyone, do we have this in OSMC?
http://forum.kodi.tv/showthread.php?tid=224025&pid=2005396#pid2005396

The whole Milhouse post is very intriguing.

I ran into this looking for something else, took a look and it seems pretty interesting.
I’ve read that the Raspberry Pi 3 uses the SD bus for WiFi as well, so overclocking it might increase the WiFi speed too.

Yes you can overclock the sdhost driver from config.txt.

I very much doubt it would affect Wifi performance though, as the SDIO bus will not be the bottleneck - it will be the wifi connection itself.

Thanks for the response!
I personally don’t care abut the wifi since I’m on Pi 2, that’s just something I picked up from the Kodi forum.
I was more interested in performance gain due to the sdhost overclock.
I’ve seen quite a few test results and it looks pretty good.
I wanted to check with you guys since I know that OSMC pretty much has up to date kernel and this should be possible.

Definitely keen to hear results from those that have tried this. Are there any plans to make this overclock accessible through the MyOSMC Pi Overclock interface?

I did these tests on a Samsung 16GB PRO Class 10 Micro SDHC.

All of this was ran on Raspberry Pi 2 running OSMC is 2016.02-3.
These are my default settings in the config.txt:

arm_freq=1000
gpu_freq=400
core_freq=500
sdram_freq=500
gpu_mem_1024=320
initial_turbo=45
force_turbo=0
over_voltage_sdram=2
over_voltage=2
disable_splash=1
dtoverlay=lirc-rpi:gpio_out_pin=17,gpio_in_pin=18
start_x=1

Running a test:

~/iozone -e -I -a -s 50M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2

Gives these results:

kB reclen write rewrite read reread rread rwrite
51200 4 1118 1516 4156 4309 4400 1851
51200 512 8065 8255 10556 10608 10586 7226
51200 16384 7210 7466 10792 10825 10815 8220

If I add these to the config.txt:

dtoverlay=sdhost
overclock_50=100

And run the test again, these are the results:

kB reclen write rewrite read reread rread rwrite
51200 4 1246 1515 4611 4627 4546 1736
51200 512 7060 8143 10477 10527 10574 7960
51200 16384 8357 8427 10183 10044 10144 8030

If I add these to the config.txt:

dtoverlay=sdtweak
overclock_50=100

And run the test again, these are the results:

kB reclen write rewrite read reread rread rwrite
51200 4 1170 1515 4650 4697 4506 1686
51200 512 7408 7942 10601 10610 10602 7946
51200 16384 8484 8563 10828 10853 10845 8507

Comparing these results I can’t say that I’m seeing any special increase in SD card performance which should be visible.
There are three possibilities:

  • I’m doing something wrong
  • My card can’t achieve better performance
  • OSMC does not support SDhost overclocking yet

Any ideas guys?
I’d love to hear @sam_nazarko opinion.

Not sure if the forum has mangled your dtoverlay line (always use the formatted text option when pasting something like config.txt) but it doesn’t look right to me. It should be something like this, with a comma.

dtoverlay=sdhost,overclock_50=100

I have not tried this on recent kernels but when sdhost was first trialled las year I saw read throughput increase of over 70% with overclock_50=90 on my Pi 2. Eg read throughput went up from about 20MB/sec to 36MB/sec.

Yeah the forum mangled it, although on my side it looks normal, not like what you quoted.
It’s one under the other, no comma.
dtoverlay=sdtweak
overclock_50=100

I was sure I would see some increase but what I achieved is basically nothing.

Separate lines is incorrect. It must be on the same line with a comma, exactly as I showed in my example. The overclock option is an additional parameter on the same dtoverlay line.

Interesting, I saw on Kodi forums that some people used one under the other, didn’t know it was an additional parameter.
I’ll fix that and test again.
Thanks @DBMandrake !

BTW be careful with how much you overclock. Unlike overclocking your CPU too much which is just likely to lead to a freeze, overclocking sdhost too much can easily corrupt your file system.

1 Like

@DBMandrake thanks for the warning!
I saw that with
core_freq=500
overclock_50=100
everything should work just fine, people had some higher overclocks which also worked.
I guess I’ll have to try it for myself and check if it’s stable.
The only thing that worries me for some reason is the update process.
I’ll have to run it with the overclock and see if it corrupts the file system or not.

This is what I managed to get with dtoverlay=sdhost,overclock_50=100:
kB reclen write rewrite read reread rread rwrite
51200 4 1191 1569 5803 5642 5337 1794
51200 512 9513 10859 16200 16113 16133 9631
51200 16384 11083 10766 16152 15354 16006 11250

Can’t say that I’m to impressed with results.
How did you measure the read throughput?
Also which sd card are you using?
I was sure this sd card would be ok but that might not be the real case.

You should be able to check overclock with:

$ sudo cat /sys/kernel/debug/mmc0/ios
clock:        50000000 Hz
actual clock:    83333333 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)
1 Like

Thanks for that popcornmix!
I can’t even tell you how much I admire your work…

I’m sure you’ve seen a ton of questions like this one, but what card would be good for Kodi on raspberry pi?
I’ve went through quite a few tests and benchmarks, and read quite a lot, in the end I can’t say I can make a reasonable choice.
I chose the current one based on benchmarks and results of random read/write.
Would you be able to recommend one?

The best numbers I’ve seen are from a Samsung EVO+

1 Like

Yeah I came across a table with some good numbers for it too.
Thanks again!