Ubuntu – CPU frequency control

14.04cpucpufreqkernel

I have a kubuntu 14.04 with the latest HWE kernel (3.16.0-31-generic), and a Xeon 1246v3 processor (which is basically an i7 4770 with ecc support).
The processor has base frequency of 3.5 ghz, and max turbo frequency of 3.9 ghz.

I have the following questions:

1) I have intel p-states enabled by default, which is fine, but you know that with p-states you only get two governors: performance, and powersave.
How can I manually set the maximum allowed cpu frequency?

2) As stated above, the cpu should be able to run at 3.9 only with one core loaded.
With full load on all cores, it should not be able to go over 3.5 ghz.
But if I issue the command watch -n 0 "cat /proc/cpuinfo | grep -i mhz" , I see that ALL four cores are constantly at 3.9 ghz, which should be impossible. How's that?

Thanks!

Best Answer

You can set maximum and minimum frequencies by setting /sys/devices/system/cpu/cpu**N**/cpufreq/scaling_min_freq and /sys/devices/system/cpu/cpu**N**/cpufreq/scaling_max_freq

Details are described in this document: https://software.intel.com/sites/default/files/comment/1716807/how-to-change-frequency-on-linux-pub.txt

Edit: You can reach the same using cpufreq-set in cpufrequtils package: https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq-set.html

Related Question