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. However, 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, accepting the trade off of the potential loss in stability. This page describes how to overclock the Ubuntu system.
Please be warned that overclocking may introduce permanent damages to your system, particularly by increasing the voltages. Do so at your own risk!
The CPU can be overclocked in the configuration of the BIOS. You need all of the below if you wish to overclock the CPU:
- An overclockable CPU
- An overclockable motherboard
- An up-to-date motherboard BIOS which recognizes the CPU
When all is ready, go to the BIOS configuration page by press <DEL> (or some other key, which will be displayed to you at boot) when the system boot up. Find and change the CPU overclocking settings, which should be named as "CPU frequency", "CPU multiplier", or similar. 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 rebooting a few times, shorting the reset pin, Googling, etc.) and test other overclocking settings.
Most Linux tools do not show the correct overclocked frequency. Fortunately, Intel released an official tool, turbostat, for this purpose. Below are the installation steps:
1. Check the current kernel version, and install the required package.
# uname -r X.XX.XX-XX-generic # apt-get install linux-tools-X.XX.XX-XX linux-cloud-tools-X.XX.XX-XX
2. Install the MSR module.
# modprobe msr
3. Open a terminal; run a CPU intensive application, here the 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.39GHz.
Column "CTMP" is the core temperature of the CPU core. The core temperature can be used to estimate the Tcase temperature to see if the CPU is overheating or not. Below is a rough formula for temperature estimation:
CTMP = Tcase + 15C
The Tcase temperature of Intel CPU can be checked at Intel ARK page. In this example, Maximum Tcase of the CPU is 72°C, as a result Maximum CTMP is projected be roughly 87°C. The reported reading 83°C is below the threshold.
If the CTMP is too high, you may wish to lower the overclocking frequency or acquire a better CPU cooling fan to avoid overheating.