There are many people who defend GNU / Linux as an operating system for your computers because it is free and open source unlike Windows. However, although in general it is a very stable operating system, it is not without problems, and one of them is precisely high CPU consumption, especially in older systems. or with low consumption processors which, curiously, are the most used this operating system given its low requirements.
Finding the culprit for high CPU consumption in Linux
As we mentioned in the introduction, usually the problem is with an application not performing as it should, taking all of the system’s CPU resources and preventing the rest of the applications from working properly. So the first thing to do is find the culprit, and for that you need to open the app System monitor
By default, processes will appear ordered according to their CPU consumption with precision, so that the applications that consume the most resources will appear at the top. If any of the apps are using 100% (or almost) of the CPU for no apparent reason, they are likely to be responsible for your problems.
The Top command includes support for both restarting and “removing” an app, but if it’s a critical app that you don’t want to close, prevent it from causing problems. , you can first try to change the priority. In Linux, you can assign priorities from +19 to -20, and the higher the number, the lower its priority. In Top, press the “R” key then enter the PID of the problematic application (you have the PID in the first column). Try setting a value of +5 to start with, and if that doesn’t reduce CPU usage, try +10 or +15 instead.
If the app is unresponsive or changing the priority doesn’t work, you can still “kill” it. To do this, also press the K key at the top; then you will be asked to enter the PID of the app we are going to send the kill command to, and after that it will disappear.
If the problem was that an application was not functioning properly and consuming all CPU resources, you should have terminated it.
If the problem persists, update all
If the problem persists every time you run the application again, it is best to update it as well as the operating system itself. To do this, open a terminal and simply run the following command:
sudo apt update && sudo apt -y update
Let it finish (it might take a few minutes depending on what you need to update), then try running the problematic app again to see if it is having problems again.
If so, then it is possible that the problem is due to an incorrect setting in the configuration of the app itself, so the quickest solution is to uninstall and reinstall it or look for an alternative.