Howto:Increase the minimum CPU speed in PC with Linux OS

From FlightGear wiki
Jump to navigation Jump to search

This note was born from the observation that in a Laptop PC with Ubuntu operating system, which is equipped with an Intel i7-8700K @ 3.7GHz with 6 physical cores, the clock speed remains rather low (800 MHz), even in the presence of a potentially high workload, such as that due to the execution of FGFS. It was difficult to understand why, but after several reading and trying I managed to fix the problem, taking the frame rate from 10fps to 30fps. My hope is that through this guide others will be able to solve this insidious problem.

Noticing the problem

It is not always easy to understand the problem as it is not clear to many that CPUs can continuously vary their clock speed, and even change the working CPU in function of a better temperature distribution. Modern CPUs work with cloks that are at the physical limit of physical reduction of the internal components, the CPU I use as an example is 14 nm, and has a voltage of 1-1.4V. It seems almost a miracle that such high CPUs can dissipate up to 100W while maintaining a temperature below 90 ° C, but the technology of the operating systems allows these aspects to be managed well through a continuous analysis of temperatures and workload. Manufacturers claim that these technologies are used to achieve energy savings, it is only partially true, the most important thing for them is that with careful management of consumption, the machine can obtain overall better performance.

But these energy management algorithms are based on working models that do not always coincide with the needs of a simulation program like FGFS that operates on only one or two CPUs.

To understand this, you need to observe how the CPU speed behaves when running Flightgear!

The programs to know exactly the actual CPU clock in Linux are different, the simplest and always present in the Ubuntu and Debian distribution is CPU-X https://x0rg.github.io/CPU-X/ or the more complex, but more complete, s-tui https://github.com/amanusk/s-tui It is installed with the command: sudo apt install s-tui stress.