3

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!

MadHatter
  • 501

3 Answers3

4

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

3

Question 1: How can I manually set the maximum allowed cpu frequency?

For example, to set the maximum frequency to 60 percent of either 3.5 GHz (turbo disabled) or 3.9 GHz (turbo enabled):

echo "60" | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct

Question 2: I see that ALL four cores are constantly at 3.9 ghz, which should [NOT] be impossible. How's that?

They are not all active at the same time. There is only 1 PLL, and all CPUs are always at the same frequency. If you are seeing 3.9GHz, then only 1 CPU was in the C0 state at the time the sample was taken.

Doug Smythies
  • 16,146
1

everything mentioned here above works if your kernel has the correct modules loaded :

# CPU frequency control Driver
modprobe acpi_cpufreq
modprobe mperf
# CPU Frequency scaling modules
modprobe cpufreq_conservative
modprobe cpufreq_ondemand
modprobe cpufreq_performance
modprobe cpufreq_powersave
modprobe cpufreq_stats
modprobe cpufreq_userspace
modprobe freq_table