Originally posted by MrCooper
View Post
Announcement
Collapse
No announcement yet.
AMD Ryzen 3 CPUFreq Governor Benchmarks On Linux 4.13
Collapse
X
-
-
Originally posted by sdack View PostThe ondemand governor gives you more power savings when a CPU is idle or nearly idle. It will leave the frequency at a low setting during those times and only when the load goes above the threshold will it switch up. schedutil bounces around too much for my taste and even when a machine seems idle will schedutil switch up the frequently for the smallest tasks, even when that's just the mail tool checking for new incoming mail for example.
With a tweaked sampling_down_factor of the ondemand governor will a CPU then also remain at a high frequency for longer even when the load briefly falls off. schedutil would here switch down only to switch up again. While schedutil is in theory the more dynamic method can a tweaked ondemand scheduler give you a better result all round. Too much switching of the frequency introduces micro delays, which isn't very desirable. Tweaking the ondemand scheduler reduces these transitions to as few as you actually need and can thereby give you stronger power-savings during idle times as well as a higher performance during high load times.
The real issue with the ondemand scheduler are its default settings. So will it at default only switch the frequency up when the load climbs above 95%. That's a rather high threshold, which many tasks often don't always reach or at least not consistently to also benefit from a CPU's maximum frequency. Thus lowering the threshold to a fair 50% puts it right into the middle of the scale. The sampling_down_factor determines how quickly it switches down again and when this gets increased does it lower the amount of frequency changes and it gives intense loads more of the high frequency you want them to have. In my case does a factor of 10 equal 0.1s or 100ms (default is 10ms), meaning, I get at most 10 frequency changes per second and not 100.
schedutil is a good all-rounder, which works best when you have frequently changing loads, but with little idle times and also few maximum load times. Personally is this not what I experience. My computers are often idle (0%-2% load) or they run lots of jobs (95-100%). So it's much more black&white for me. Hence do I find the ondemand scheduler to be the best, because when tweaked does it fit my needs the best.
Comment
-
Originally posted by kaseki View PostAs a point of curiosity, because it isn't in "preferences" (at least under Mint MATE) where are you changing the default settings? Thanks.
https://github.com/torvalds/linux/bl...pm/cpufreq.rst
The governors are controlled through sysfs, meaning, you'll get access to their parameters by looking into /sys/devices/system/cpu/. If you have the sysfsutils installed can you make entries into /etc/sysfs.conf for it to change entries in sysfs at boot-time. Otherwise, as mentioned above, do you need to make your own script, which does this for you. The values can be read simply with 'cat' and changed by echo'ing a value into them. Some examples:
# show the current governor for CPU #0
$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
ondemand
# show the available governors for CPU #0
$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors
ondemand performance schedutil
# change the governor for CPU #0 to 'performance'
$ echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
When you have the ondemand governor installed will you find a directory with its paramaters there, too:
$ ls /sys/devices/system/cpu/cpufreq/ondemand/
ignore_nice_load min_sampling_rate sampling_down_factor up_threshold
io_is_busy powersave_bias sampling_rate
# show the current threshold for the ondemand governor
$ cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
95
# change the threshold down to 50%
$ echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# show the sampling rate (in usecs)
$ cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
10000
# show the sampling rate modifier / factor for changing down the frequency
$ cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
1
# increase the factor to 10 to make it 100,000 usecs (or 0.1s) so the frequency stays up for longer
$ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Hope this explains it for you. Note that you can actually mix governors. So you can set CPU #0 to schedutil and CPU #1 to #7 to ondemand for example. What you cannot do is to have different parameters for the ondemand governor for each CPU. They all share the same parameters and changing them changes them for every CPU where you're using ondemand.Last edited by sdack; 24 August 2017, 02:12 PM.
- Likes 2
Comment
Comment