Overclocking CPU on Ubuntu
Overclocking is not a recommended approach to improve the performance of the Ubuntu system if it is used in daily operations as this would affect the stability of the system. While since gaming in Linux becomes possible as more and more video games distributors release video games in Linux, one may wish to get better performance from the overclocked CPU by the trade off of the potentially loss in stability. This page describes the way to overclock the Ubuntu system.
Please be warned that overclocking may introduce permanent damages to your system, particularly by increasing the voltages. Do this at your own risks!
The only way to overclock the CPU is from the configuration of the BIOS. You need all of the below if you wish to overclock the CPU:
- An overclockable CPU (such as Intel G3258 or i7-4770K)
- An overclockable mainboard (such as one with Intel Z97 chipset)
- An up-to-date mainboard BIOS recognizes the CPU
When all is ready, go to the BIOS configuration page by press <DEL> (or some other key) when the system boot up. Change the CPU overclocking settings such as "CPU frequency", "CPU multiplier". Save the changes and reboot the system.
If you are lucky, the system should boot up as normal. If the system has no response, you may need to reset the BIOS (By reboot few times, short the reset pin etc) and test other overclocking settings.
Most frequency checking utilities does not show the overclocked frequency correctly.
1. Install linux-tools-common
# apt-get install linux-tools-common
2. Install MSR module
# modprobe msr
3. Open a terminal, run CPU intensive application (such as openssl speed test)
# openssl speed
4. Open another terminal, run turbostat to show the actual frequency
# turbostat cor CPU %c0 GHz TSC SMI %c1 %c3 %c6 %c7 CTMP PTMP %pc2 %pc3 %pc6 %pc7 Pkg_W Cor_W GFX_W 100.00 4.39 3.19 0 0.00 0.00 0.00 0.00 83 83 0.00 0.00 0.00 0.00 53.31 44.71 0.00 0 0 100.00 4.39 3.19 0 0.00 0.00 0.00 0.00 83 83 0.00 0.00 0.00 0.00 53.31 44.71 0.00 1 1 100.00 4.39 3.19 0 0.00 0.00 0.00 0.00 75
Column "GHz" is the actual frequency the CPU running at. Column "TSC" is "timestamp counter" the CPU reported normally running at. As above shown, the CPU is reported normally running at 3.19GHz while is being overclocked at 4.38GHz.
Column "CTMP" is the core temperature of the CPU core. The core temperature can be used to project the Tcase temperature to see if the CPU is overheat or not. Below is a rough projection for overheat estimation:
CTMP = Tcase + 15C
Tcase temperature of Intel CPU can be checked at Intel ARK page. In this example, Maximum Tcase of the CPU is 72C, as a result Maximum CTMP is projected be roughly 87C. The reported reading 83C is below the threshold.
In case the CTMP is too high, you may wish to lower the overclocking frequency or acquire a better CPU cooling fan to avoid overheating.