Following an installation of Ubuntu 14.04 LTS on a server using an Intel Xeon E3 chip, I observed that CPU performance was inconsistent with the reference specification.
Discovery
To confirm, I used a combination of data obtained from various operating system sources, specifically /proc/cpuinfo, i7z, and turbostat.
The Intel Xeon chip in question, has an operating frequency above 3.4GHz–/proc/cpuinfo indicated each logical core was running at an average of 800Mhz–use the following:
1 2 3 4 5 6 7 8 9 |
|
It’s likely your environment doesn’t have i7z installed. Install it from the repository.
1 2 3 4 5 6 7 8 9 |
|
The i7z utility has a number of known issues. This only reinforces the need to use multiple resources to ensure as accurate a reading of the CPU frequency as possible.
Once loaded, you will see that this utility is ncurses-based–compare the CPU’s “true” frequency with the “Actual Freq (Mult.)” (second column). For me, i7z once again reported an abysmal average of 800Mhz. Use [ctrl]+[c] to break out.
Finally, turbostat. The turbostat utility is available as a part of the linux-tools-common package. Using dpkg-query is especially helpful when dealing with unknown packages, to see what was installed.
1 2 3 4 5 6 7 8 9 |
|
1 2 3 4 5 6 7 8 9 |
|
To use:
1 2 3 4 5 6 7 |
|
Compare “Bzy_MHz” to “TSC_Mhz”. As expected, Bzy_MHz was reporting an average of 800Mhz.
What do we do about it?
Disable ondemand
Ubuntu 14.04 LTS (still) uses upstart, therefore:
1
|
|
Install cpufrequtils
Similar to i7z, the environment doesn’t natively come with the cpufrequtils package. Install from the repository.
1 2 3 4 5 6 7 8 |
|
Create the config
1 2 3 4 5 |
|
Restart
1
|
|
Once the server has restarted, you can now use the first three (3) methods above to confirm that the CPU frequency scaling has been corrected.
In fact, there is now a fourth method available, specifically the utility “cpufreq-info” as we’re now using cpufrequtils.
1 2 3 4 5 6 7 8 9 10 |
|
Hope this helps!