Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure RPi/RPi2 platform with optimal CPU and IO settings #4200

Merged
merged 1 commit into from
Jun 16, 2015
Merged

Configure RPi/RPi2 platform with optimal CPU and IO settings #4200

merged 1 commit into from
Jun 16, 2015

Conversation

MilhouseVH
Copy link
Contributor

The following settings are (or are about to become) the default on other distributions (Raspbian, OSMC etc.) and it is recommended they should also be the default for OpenELEC too:

echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

The existing values are:

rpi22:~ # cat /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
0
rpi22:~ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
rpi22:~ # cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
50
rpi22:~ # cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
355000
rpi22:~ # cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
1

up_threshold is also being set (to 50) by the cpufreq-threshold service - if this is only for the benefit of the RPi/RPi2, then this service could be eliminated (I can squash removal into this PR, if desired).

This should be OK for master.

@popcornmix
Copy link

I can confirm these are the planned default settings for raspbian.

It should improve general performance a little by engaging turbo mode more often.

The io_is_busy setting is important for the new "sdhost" driver which is currently optionally available (by adding dtoverlay=sdhost to config.txt), but we'd like to switch to it being the default after further testing.

Without that setting "sdhost" performance can be reduced when not in turbo mode.

@stefansaraev
Copy link
Contributor

ack from me

up_threshold is also being set (to 50) by the cpufreq-threshold service

not sure, it's probably good for imx6/wetek, too. I'd keep it as is for now.

@MilhouseVH
Copy link
Contributor Author

I'd keep it as is for now.

Fortunately it's using the same value that the RPi/RPi2 needs, but it's easy to see how it could become a problem if a different value is required. In future perhaps it should be moved to platform_init for imx6/wetek.

@stefansaraev
Copy link
Contributor

Fortunately it's using the same value that the RPi/RPi2 needs

thats right, I'll take care when this PR is merged. just ping me ;)

@MilhouseVH
Copy link
Contributor Author

Thanks, will do.

BTW, to see the impact of io_is_busy (aka turbo) at higher core overclocks when using the new sdhost driver, I posted the results of a very simple benchmark here, documenting the performance of the old and new driver at different clock settings, with and without turbo.

@sraue
Copy link
Contributor

sraue commented Jun 16, 2015

@MilhouseVH can you change the copyright line in both files :-) other than that if it works it has my ok

@MilhouseVH
Copy link
Contributor Author

Done, good catch. :)

Yes, tested on both RPi and RPi2 - both working as expected.

sraue added a commit that referenced this pull request Jun 16, 2015
Configure RPi/RPi2 platform with optimal CPU and IO settings
@sraue sraue merged commit 6f27fa2 into OpenELEC:master Jun 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants