Suggestion: use "performance" CPU frequency governor
The default "ondemand" governor maps to "powersave" on modern Intel CPUs. The powersave governor takes several hundred milliseconds to ramp to maximum frequency.
To work around this, I have in my /etc/rc.d/rc.local: Code:
/etc/rc.d/rc.cpufreq performance Disclaimer - all of my computers are AC powered. Ed |
Maybe that is useful for the Intel users, but for those having AMD processors your suggestion will make the CPU to stay at max frequency and the CPU fan to go nuts.
Also, for those with laptops, the "performance" governor will be a disaster no matter which company produced their CPUs. ;) So, how about yourself to tune your "/etc/rc.d/rc.cpufreq" and be happy with your micro-benchmarks? I talk about this well commented line: Code:
# Default CPU scaling governor to try. Some possible choices are: |
Indeed, the intel_pstate driver only supports "powersave" (default) and "performance" and I can confirm what EdGr reported, the default "powersave" is just too lazy. This "powersave" should be the equivalent of the "ondemand" governor that works under the acpi-cpufreq driver for other non-Intel CPUs, but it's not. Like the OP suggested, I always set the governor on "performance" for Intel CPUs, even on laptops, without experiencing any thermal issues, the fan is indeed spinning a little and doesn't stop, but then I'm only using new (power efficient) CPUs, past Haswell.
Good lecture: https://www.kernel.org/doc/html/v4.1...el_pstate.html + https://www.kernel.org/doc/Documenta...user-guide.txt https://www.kernel.org/doc/Documenta.../governors.txt I wrote some notes some time ago and considered disabling the intel_pstate driver and using the acpi-cpufreq instead, checking if its "ondemand" governor(algorithm) is better(faster) than the intel_pstate "powersave", but forgot about it. Thankful now about this thread, reminding me about it. Will need to go through these when I'll find some time available: https://unix.stackexchange.com/quest...r-conservative https://www.phoronix.com/scan.php?pa...linux315&num=1 |
Darth Vader - the comments in rc.cpufreq are obsolete for modern Intel CPUs.
abga - thanks for the links! On my Intel Nehalem, Sandy Bridge, and Haswell-E CPUs, there are only two governors, "performance" and "powersave". "Powersave" makes the Haswell-E desktop sluggish. "Performance" cuts its power consumption in half when idle. I have measured both. :) My Sandy Bridge laptop does not mind being run in performance mode on AC power. Unfortunately, the laptop no longer has a working battery. Ed |
ondemand works fine for me. If I am using something demanding it takes a few seconds for it to ramp up. I tried performance recently for Rise of the Tomb Raider because that was their recommendation. After the game ended the CPU frequency was still at about max on a few cores. I like how ondemand is ondemand. Plasma 5 running Firefox only requires ~1.60 Ghz on all cores so I don't need it to run at about 4 Ghz all the time.
|
When governor is set "ondemand", is there a way to follow dynamically the status change ? Or is it just to look at cpu activities ?
|
https://www.kernel.org/doc/Documenta...user-guide.txt
The current frequency of cpu 0 is at: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq You could, say, have Conky "cat" that every second. |
with conky I use
Code:
awk '/cpu MHz/{i++}i==1{printf "%.f",$4; exit}' /proc/cpuinfo |
Keep in mind the frequency adjustments are much more rapid than you can observe.
The way to measure the difference is to write a benchmark which goes from idle to full load and back to idle in less than one second. Ed |
Quote:
Code:
watch grep \"cpu MHz\" /proc/cpuinfo |
2 Attachment(s)
I did a before and after Slackware64 Current update. Here is ondemand and performance frequencies according to cpufreq-info. Plasma 5, one xterm open, and Firefox open with just this page with an i7 Ivy Bridge 3770. Performance has the CPU running ~2.20 GHz more.
One issue I came across with Rise of the Tomb Raider is that I couldn't set it back and forth from ondemand to performance on the command line. I tried /etc/rc.d/rc.cpufreq performance and it would change to performance but when I tried to set it back to ondemand the CPU still acted like it was on performance based on cpufreq-info and rc.cpufreq would report it as on performance. I was using these instructions under "More Performance Options": https://docs.slackware.com/studioware:tips_and_hints |
I have this on my laptops:
Code:
$ ls -l /etc/pm/power.d/powermgmt Code:
# Disable Ethernet Wake-on LAN to save power |
This thread can be marked as solved:
Code:
Tue Aug 28 22:05:19 UTC 2018 |
Thank you all for your answers and explanations ! :)
|
Marking thread as solved. We just got faster computers. :)
Ed |
All times are GMT -5. The time now is 03:07 PM. |