Readers need to understand that is is ATLAS that is annoying here.
Please know that with modern processors the CPU will scale down frequency on its own and as a function of the idle states it goes into when not busy, even in performance mode.
If you want to "pin" the CPU frequencies at maximum then disable all idle states >= 0, in addition to setting performance mode.
NOTE: This will create a lot of waste heat from your processor make sure your system can handle it.
Example:
Starting conditions:
doug@s15:~/idle$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
intel_cpufreq
intel_cpufreq
intel_cpufreq
intel_cpufreq
intel_cpufreq
intel_cpufreq
intel_cpufreq
intel_cpufreq
doug@s15:~/idle$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
performance
performance
performance
performance
performance
performance
performance
Step 1: How many idle states does my system have?
doug@s15:~/idle$ ls -l -d /sys/devices/system/cpu/cpu*/cpuidle/state*
drwxr-xr-x 2 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu0/cpuidle/state0
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu0/cpuidle/state1
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu0/cpuidle/state2
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu0/cpuidle/state3
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu0/cpuidle/state4
drwxr-xr-x 2 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu1/cpuidle/state0
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu1/cpuidle/state1
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu1/cpuidle/state2
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu1/cpuidle/state3
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu1/cpuidle/state4
drwxr-xr-x 2 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu2/cpuidle/state0
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu2/cpuidle/state1
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu2/cpuidle/state2
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu2/cpuidle/state3
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu2/cpuidle/state4
drwxr-xr-x 2 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu3/cpuidle/state0
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu3/cpuidle/state1
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu3/cpuidle/state2
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu3/cpuidle/state3
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu3/cpuidle/state4
drwxr-xr-x 2 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu4/cpuidle/state0
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu4/cpuidle/state1
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu4/cpuidle/state2
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu4/cpuidle/state3
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu4/cpuidle/state4
drwxr-xr-x 2 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu5/cpuidle/state0
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu5/cpuidle/state1
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu5/cpuidle/state2
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu5/cpuidle/state3
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu5/cpuidle/state4
drwxr-xr-x 2 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu6/cpuidle/state0
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu6/cpuidle/state1
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu6/cpuidle/state2
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu6/cpuidle/state3
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu6/cpuidle/state4
drwxr-xr-x 2 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu7/cpuidle/state0
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu7/cpuidle/state1
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu7/cpuidle/state2
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu7/cpuidle/state3
drwxr-xr-x 3 root root 0 Jul 3 11:41 /sys/devices/system/cpu/cpu7/cpuidle/state4
O.K. I have 5 idle states, 0-4:
Step 2: Disable states 1-4 (I use scripts run as sudo):
doug@s15:~/idle$ cat idle_1-4_disable
#! /bin/bash
echo "idle disable states 1-4:"
/home/doug/idle/idle_state1_disable
/home/doug/idle/idle_state2_disable
/home/doug/idle/idle_state3_disable
/home/doug/idle/idle_state4_disable
doug@s15:~/idle$ cat idle_state1_disable
#! /bin/bash
echo "idle state 1: before:"
cat /sys/devices/system/cpu/cpu*/cpuidle/state1/disable
for file in /sys/devices/system/cpu/cpu*/cpuidle/state1/disable; do echo "1" > $file; done
echo "idle state 1: after:"
cat /sys/devices/system/cpu/cpu*/cpuidle/state1/disable
Resulting in:
doug@s15:~/idle$ sudo ./idle_1-4_disable
idle disable states 1-4:
idle state 1: before:
0
0
0
0
0
0
0
0
idle state 1: after:
1
1
1
1
1
1
1
1
idle state 2: before:
0
0
0
0
0
0
0
0
idle state 2: after:
1
1
1
1
1
1
1
1
idle state 3: before:
0
0
0
0
0
0
0
0
idle state 3: after:
1
1
1
1
1
1
1
1
idle state 4: before:
0
0
0
0
0
0
0
0
idle state 4: after:
1
1
1
1
1
1
1
1
doug@s15:~/idle$
And if we watch all this with turbostat:
doug@s15:~/idle$ sudo turbostat --quiet --Summary --show Busy%,Bzy_MHz,PkgTmp,PkgWatt,GFXWatt,IRQ --interval 15
Busy% Bzy_MHz IRQ PkgTmp PkgWatt GFXWatt
0.02 2743 438 30 3.75 0.12
0.02 2753 406 29 3.75 0.12
0.02 2806 402 29 3.75 0.12
0.02 2764 436 29 3.75 0.12
58.62 3500 70887 50 30.75 0.12 <<<< ilde state 1-4 disabled
100.00 3500 120240 55 50.39 0.12 <<<< tubostat counts idle state 0 as busy
100.00 3500 120243 58 50.95 0.12 <<<< The system is actually still idle.
100.00 3500 120241 60 51.38 0.12
100.00 3500 120248 62 51.91 0.12
100.00 3500 120241 64 52.58 0.12
100.00 3500 120244 65 52.88 0.12
100.00 3500 120252 67 53.13 0.12
100.00 3500 120251 68 53.29 0.12
100.00 3500 120242 68 53.46 0.12
100.00 3500 120268 68 53.56 0.12
100.00 3500 120260 68 53.63 0.12
100.00 3500 120267 70 53.69 0.12
If the processor temperature gets to high, then limit your upper CPU frequency limit. Intel Pstate example:
doug@s15:~/idle$ echo 60 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct
60
resulting in:
100.00 3500 120267 70 53.96 0.12
100.00 3500 120274 71 53.92 0.12
100.00 3500 120256 70 53.95 0.12
100.00 3500 120277 70 53.93 0.12
100.00 3500 120326 70 53.95 0.12
34.97 3500 42719 48 21.53 0.12
0.02 2712 378 45 4.00 0.12
0.02 2754 396 42 3.96 0.12
0.02 2724 504 40 3.92 0.12
0.02 2816 378 39 3.89 0.12
94.33 3500 113569 60 48.59 0.12
100.00 3500 120242 63 51.88 0.12
100.00 3500 120240 65 52.64 0.12
100.00 3500 120280 68 53.08 0.12
100.00 3500 120333 68 53.32 0.12
100.00 1713 120348 55 20.29 0.12 <<< Had to toggle to powersave governor
100.00 2201 120280 57 26.31 0.12 <<< And then back to performance governor
100.00 2300 120239 56 27.58 0.12 <<< Now new max is in effect.
100.00 2300 120237 56 27.53 0.12 <<< And processor temp is less
100.00 2300 120237 55 27.46 0.12
100.00 2300 120232 54 27.42 0.12
performance
in the following files:/etc/init.d/cpufrequtils
and/etc/default/cpufrequtils
then runupdate-initramfs -u -k all
then reboot.