Turn off CPU Throttling

Some CPU’s use CPU throttling to reduce the speed of the CPU when it is not in heavy use (to reduce power consumption). In some cases you might want to turn this off, e.g., when measuring CPU performance for the ATLAS libraries.

On CentOS, you turn CPU throttling off in two steps: (must be run as root)


/etc/init.d/cpuspeed stop
for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do echo performance > $i ; done

The first line, only stops the internal daemon that regulates the CPU speed. The 2nd line (the for loop) ensures that, all CPUs switch to performance mode (instead of possible running in ondemand mode).

You switch back by simply starting the cpuspeed daemon again:

/etc/init.d/cpuspeed start

Comments are closed.