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
mt7622: switch default CPU governor to ondemand #4983
Conversation
Not configuring If you just change the default governor, can edit it manually |
@nasbdh9 - I test built it and did not get an error. I added that line back and adjusted the PR. |
|
@nasbdh9 - I am confused. I think I will re-scope this PR to only change the default governor rather than doing that plus refreshing the default config. |
looks good now |
This PR should be placed on hold until there is a proper fix for the potential to freeze on boot due to a firmware bug. See: https://forum.openwrt.org/t/belkin-rt3200-linksys-e8450-wifi-ax-discussion/94302/1490 EDIT: #5025 fixes the potential to freeze issue. |
I thought schedutil was meant to be an improvement over ondemand. Shouldn't we use that one? |
@nbd168 - It depends on use case in my experience. For example, I get consistently lower throughput to wireless clients using schedutil on my RT3200 vs using ondemand albeit, I have ondemand tuned to be more sensitive:
Speed test downloading to iPhone 13 on 5GHz radio:
I didn't capture the |
It would be interesting to know how both of these compare with 'performance'. Has any analysis been done to consider the effects of the scheduler on SQM and/or the CAKE algorithm? Couldn't that be more significant than considering raw throughput at these high levels? |
You can try it... I use a RPi4 for my routing and have the SQM there. |
@graysky2 we should REALLY understand why userspace was set in the first place... userspace locks the freq to a fixed value and the freq needs to be changed from userspace... So we have some scripts that does that? Does this target have problem with some freq? From me this change is ok but it would be worth to investigate why it wasn't done from the start. |
@graysky2 yes i remember that commit, i didn't remember if it was exactly related to mt7622... if that's the reason than OK FOR ME to use ondemand again... problem of schedutil is that it requires correct driver use and stuff to handle bw request and afaik not a lot of target does that... (so this is why in some condition you have worse perf... the driver never say what is the correct amount of work that is currently or will do...) |
I also prefer ondemand. See tests against schedutil above. |
But surely it's not just about raw performance; schedutil may offer a better performance to power ratio or so? I mean how meaningful is it just to compare throughput and conclude that ondemand is better? |
think is that these are router and even at max freq they don't consume that much... reality is that using a too much conservative or power aware sched may result in worse perf as it can react to peak traffic slowly. An user can totally use a custom gov if he really wants tho :D |
Hmm. But from some internet searching looks like schedutil is technically superior? Albeit I've not studied this in great detail. |
@lynxthecat it is for everything else like normal system and phones.... it's not for router with legacy driver and basic cpuscaling and idle state... as I said to make schedutil works correctly it needs to be aware of the task so one of the reason of ondemand giving better perf than schedutil is the fact that the driver doesn't really comunicate to the system the amount of load that will generate. |
The most common CPU governor in the OpenWRT project is currently ondemand (see below). Switch mt7622 over to it as well. Audit the code by running the following and then analyzing the results: find -name 'config-5.*' -print0 | xargs -0 grep 'CONFIG_CPU_FREQ_DEFAULT_GOV.*=y' ondemand: 16 performance: 5 schedutil: 5 userspace: 2 Build system: x86_64 Build-tested: ramips/mt7621 Signed-off-by: John Audia <graysky@archlinux.us>
The most common CPU governor in the OpenWRT project is currently ondemand (see below). Switch mt7622 over to it as well. This commit also updates the default config.
Audit the code by running the following and then analyzing the results:
find -name 'config-5.*' -print0 | xargs -0 grep 'CONFIG_CPU_FREQ_DEFAULT_GOV.*=y'
ondemand: 16
performance: 5
schedutil: 5
userspace: 2
Signed-off-by: John Audia graysky@archlinux.us