Programs take a lot of CPU load. How to reduce CPU load: main causes and methods of solving problems

Most often in our practice, the main reason for CPU load reaching 100% is overheating. Many users do not know that dust getting into the radiators of cooling systems can significantly reduce the performance of devices. When the processor overheats, it goes into throttling mode, starts skipping clock cycles, and performance decreases.

To check the processor for overheating, look at the temperature of the processor without load and under load. We compare these temperatures with the maximum permissible declared by the processor manufacturer. The maximum permissible temperature can be found on the processor manufacturer's website in the specifications.

Viral activity

When there are a lot of viruses on a computer, this also reduces system performance. Viruses, like regular programs, consume processor resources, this can lead to 100% CPU load. I talk a lot about virus removal in my YouTube channel, and be sure to read and follow. After completely cleaning your computer from viruses, there will be no problem with CPU load!

Driver problems

Another reason for CPU load is system interrupts, in other words a problem with the drivers. I recommend doing the following: boot your computer in safe mode and see if there is an increased load on the processor. If there is no load, there is a very high probability that the reason is in the drivers, because in safe mode the drivers are not loaded! The simplest solution to this problem is to remove all the drivers and then install one driver at a time and see if the CPU load appears, as soon as the download starts - you have found the culprit.

Most often, the culprit here is network cards + universal drivers from Microsoft, which are installed immediately when installing Windows. I recommend downloading and updating all drivers from the official website of your equipment manufacturer. I showed how to do this.


Elementarily weak percentage that doesn’t work ツ

For some reason, many people think that their ancient processor should still run fine and without any brakes. But this is not so, now digital technologies are developing very quickly and sometimes budget processors of just two or three years ago are no longer capable of anything today. Even if you have a top-end processor from 10 years ago, this does not mean that it can cope with modern tasks. Perhaps this is where the heavy load on your processor lies, think about it. If you are not sure, ask other owners of the same processor how it works for them in the same tasks. Often they bring computers to us and say: my video on the Internet has started to slow down. We look at why this is happening and it turns out that the new video codec does not support the old processor. We explain this to the client, but he doesn’t believe it and motivates it by the fact that 2 weeks ago everything was working for him, but now it’s slowing down. The problem was that the site on which he watched the video had switched to a new video encoding method, which heavily loaded the old processors, but gave a higher-quality video image.

Autoload full of junk

Another problem that occurs for inexperienced users is that startup is heavily clogged with unnecessary applications. After all these applications are loaded (the computer will take a very long time to load), they load the processor with their activity. Startup needs to be cleaned, you can even remove everything from there except the antivirus and programs that you actually use. You can do this through the program in the startup section or write MSCONFIG in the search and go to the startup section and disable what is unnecessary.

Antivirus activity

The hard drive is loading the processor

The hard drive can load the processor up to 100% under some conditions. Most often this is due to the fact that the disk begins to fail. I wrote about this in detail in the article -. Follow all the recommendations and your disk and processor will probably stop loading up to 100%.

Problems with peripheral equipment

Disconnect everything from your laptop or PC, leave the bare minimum (mouse, keyboard, monitor). Then connect all the necessary devices one by one and check the processor’s reaction. Perhaps this way you will find the culprit of this problem. I also recommend paying attention to the device manager to see if there are any installed devices with yellow or red icons; this means either there are no drivers or they are not working correctly. As I wrote above, this can create a load on the processor.

A huge number of running processes

Everything can be simple and trivial, perhaps you just launched too many applications at the same time and the processor simply can’t handle it all. The processor may be powerful, but everything has a limit. Open the task manager (CTRL+ALT+DEL) sort processes by load per percent and stop/disable the heaviest processes. If you don’t know which process is responsible for what, you can look up information on the Internet. I will show you more in the video on this page.

Some processes cannot be tracked through a regular task manager (these may be viral processes), then download and check all processes with it, you can also check the process for a digital signature, as well as for viral activity!

Svchost.exe is loading the processor!

With the svchost.exe process, not everything is so simple, there are 2 options: either it is a viral activity or a system process that actually loads the processor. If the load is created by a virus process, then most often it can be seen through Process Explorer; it will be launched as an administrator or from your account. It is enough to simply stop the process and clean it from viruses. If svchost.exe is really a system process, then try disabling automatic Windows updates in services and also try turning off the antivirus, it may conflict with other software.

In the vastness of the RuNet, I found another interesting method, but you can use it only at your own peril and risk! Find the Prefetch folder, located in the C:\WINDOWS\Prefetch section and delete it. Then find the Tasks folder (C:\WINDOWS\system32\Tasks), open it and delete all files from it. Now launch the task manager, delete the entire svchost.exe task tree, and then restart the computer. I talked about this folder in the article about the load on the screw.

Lack of power supply

Well, the last thing that can cause an unnatural load on the processor is the power supply. If the power supply does not supply enough power to the computer, the processor can be loaded up to 100% of simple tasks. I recommend checking the power supply and all computer hardware using .

  • Translation

The metric that we call “processor load” is actually not understood entirely correctly by many people. What is “CPU load”? Is it how busy our processor is? No, that's not true. Yes, yes, I’m talking about the same classic CPU load that is shown by all performance analysis utilities - from the Windows task manager to the top command in Linux.

What does “the processor is now 90% loaded” mean? You might be thinking it looks something like this:

But in reality it looks like this:

"Idle" means that the processor is capable of executing some instructions, but is not doing so because it is waiting for something - such as I/O from RAM. The percentage of real and idle work in the figure above is what I see day after day in real applications running on real servers. There is a significant chance that your program spends its time in much the same way, and you don’t know about it.

What does this mean for you? Understanding how much time the processor actually performs certain operations, and how much time it just waits for data, sometimes makes it possible to change your code, reducing the exchange of data with RAM. This is especially true in the current realities of cloud platforms, where automatic scaling policies are sometimes directly tied to CPU load, which means that every extra cycle of “idle” work costs us very real money.

What is CPU load actually?

That metric that we call “CPU load” actually means something like “non-idle time”: that is, this is the amount of time that the processor spent in all threads except the special “Idle” thread. The kernel of your operating system (whatever it is) measures this amount of time when context switching between threads of execution. If the command execution thread switches to a non-idle thread that has been running for 100 milliseconds, then the operating system kernel counts this time as the time spent by the CPU on performing real work in this thread.

This metric first appeared in this form simultaneously with the advent of time-sharing operating systems. The programmer's manual for the computer in the Apollo lunar module (an advanced time-sharing system at that time) called its idle thread with the special name "DUMMY JOB" and the engineers compared the number of commands executed by this thread with the number of commands executed by worker threads - this gave them an understanding of CPU load.

So what's wrong with this approach?

Today, processors have become much faster than RAM, and waiting for data has begun to take up the lion's share of what we used to call “CPU time.” When you see a high percentage of CPU usage in the output of the top command, you may think that the bottleneck is the processor (the hardware on the motherboard under the heatsink and cooler), when in fact it will be a completely different device - the banks of RAM.

The situation even gets worse over time. For a long time, processor manufacturers were able to increase the speed of their cores faster than memory manufacturers increased memory access speeds and reduced latency. Somewhere in 2005, processors with a frequency of 3 Hz appeared on the market and manufacturers concentrated on increasing the number of cores, hypertrading, multi-socket configurations - and all this set even greater demands on data exchange speed! Processor manufacturers tried to somehow solve the problem by increasing the size of processor caches, faster buses, etc. This, of course, helped a little, but did not radically change the situation. We are already waiting for memory most of the time to “load the processor” and the situation is only getting worse.

How to understand what the processor is actually doing?

Using hardware performance counters. On Linux they can be read using perf and other similar tools. Here, for example, is a measurement of the performance of the entire system for 10 seconds:

# perf stat -a -- sleep 10 Performance counter stats for "system wide": 641398.723351 task-clock (msec) # 64,116 CPUs utilized (100.00%) 379,651 context-switches # 0.592 K/sec (100.00%) 51,546 cpu-migrations # 0.080 K/sec (100.00%) 13,423,039 page-faults # 0.021 M/sec 1,433,972,173,374 cycles # 2.236 GHz (75.02%) stalled-cycles-frontend stalled-cycles-backend 1,118,336,816,068 instructions # 0.78 insns per cycle (75.01%) 249,644,142,804 branches # 389,218 M/sec (75.01%) 7,791,449,769 branch-misses # 3.12% of all branches (75.01%) 10.003 794539 seconds time elapsed
The key metric here is " number of instructions per clock cycle" (insns per cycle: IPC), which shows how many instructions the processor executed on average for each clock cycle. Simplified: the larger this number, the better. In the example above, this number is 0.78, which, at first glance, does not seem so bad result (78% of the time useful work was performed?) But no, on this processor the maximum possible IPC value could be 4.0 (this is due to the way modern processors receive and execute instructions. That is, our IPC value (equal to 0.78) is only). 19.5% of the maximum possible instruction execution speed. And in Intel processors starting with Skylake, the maximum IPC value is already 5.0.

In the clouds

When you work in a virtual environment, you may not have access to real performance counters (this depends on the hypervisor used and its settings). Here's an article on how it works in Amazon EC2.

Data interpretation and response

If you have IPC< 1.0 , then I congratulate you, your application is idle waiting for data from RAM. Your strategy for optimizing performance in this case will not be to reduce the number of instructions in the code, but to reduce the number of accesses to RAM and more active use of caches, especially on NUMA systems. From a hardware point of view (if you can influence it), it would be wise to choose processors with larger cache sizes, faster memory and bus.

If you have IPC > 1.0, then your application suffers not so much from waiting for data, but from an excessive number of executing instructions. Look for more efficient algorithms, don't do unnecessary work, cache the results of repeated operations. Using the Flame Graphs construction and analysis tools can be a great way to gain insight. From a hardware perspective, you can use faster processors and increase the number of cores.

As you can see, I drew the line at an IPC value of 1.0. Where did I get this number from? I calculated it for my platform, and if you don’t trust my estimate, you can calculate it for yours. To do this, write two applications: one should load the processor 100% with a thread of executing instructions (without actively accessing large blocks of RAM), and the second should, on the contrary, actively manipulate data in RAM, avoiding heavy calculations. Measure the IPC for each of them and take the average. This will be the approximate turning point for your architecture.

What Performance Monitoring Tools Should Really Show

I believe every performance monitoring tool should show the IPC value next to the CPU load. This is done, for example, in the tiptop tool for Linux:

Tiptop - Tasks: 96 total, 3 displayed screen 0: default PID [ %CPU] %SYS P Mcycle Minstr IPC %MISS %BMIS %BUS COMMAND 3897 35.3 28.5 4 274.06 178.23 0.65 0.06 0.00 0.0 java 1319+ 5.5 2.6 6 87.32 125.55 1.44 0.34 0.26 0.0 nm-applet 900 0.9 0.0 6 25.91 55.55 2.14 0.12 0.21 0.0 dbus-daemo

Other reasons for the incorrect interpretation of the term “CPU load”

The processor may perform its work more slowly not only because of the loss of time waiting for data from RAM. Other factors may include:
  • CPU temperature fluctuations
  • Variation of processor frequency with Turboboost technology
  • Variation of processor frequency by the OS kernel
  • The problem of average calculations: 80% of the average load on a measurement period per minute may not be a disaster, but it can also hide jumps up to 100%
  • Spinlocks: The CPU is busy executing instructions and has a high IPC, but in reality the application is spinlocked and not doing any real work

conclusions

CPU utilization has become a significantly misunderstood metric today: it includes the amount of time it waits for data from RAM, which can take even longer than executing actual commands. You can determine the actual CPU load using additional metrics such as instructions per clock (IPC). Values ​​less than 1.0 indicate that you are limited by the speed of data exchange with memory, and larger values ​​indicate that the processor is heavily loaded with a stream of instructions. Performance tools should be improved to display IPC (or something similar) directly next to CPU load, giving the user a full understanding of the situation. With all this data, developers can take some steps to optimize their code in exactly the areas where it will bring the most benefit.

Quite often, users complain about 100 percent processor load. In this case, the computer often begins to become “dull” and does not allow it to work normally. The most interesting thing is that even if you reinstall Windows, the situation does not change in all cases. What to do, what to do?

There can actually be many reasons, so let’s look at the most likely ones.

If you launch Task Manager and see some program that is using up your CPU, stop it immediately and uninstall or reinstall it. Most likely, it simply conflicts with some other application or, alternatively, it could be a virus. Accordingly, in this case you need to use an antivirus with the databases updated to the latest version and scan the system. It is also highly advisable to use an anti-virus utility like, which can find malicious files that the antivirus does not always detect.

But when it comes to third-party programs, everything is much simpler. It's much worse when the download is associated with one of the Windows processes. Most often we are talking about, which I talked about in some detail some time ago.

The bottom line is this: svchost.exe allows services in the form of dll files to execute their code in their address space, so in the task manager the user can see several running copies of svchost.exe.

This is normal. Of course, with the exception when a certain virus is hiding under the guise of a process. Remember that svchost.exe never runs as a user and you will not be able to find it in startup. If this happens, then you have a malicious file or program that is not related to Windows.

Let's say that you haven't found any virus. Why does the processor load? Most often this is due to the fact that you have not installed updates for the Windows operating system. How is this related? In fact, everything is simple: as soon as the user connects to the Internet, the system queries the service which updates have appeared and which ones have already been installed. This is not the simplest process and essentially involves scanning the system, as is the case with an antivirus, for example. Therefore, scanning will occur almost constantly until you deign to install updates.

What should those who do not want to install updates do? The only option is this, which is highly not recommended. But if you still decide to take this step, then go to the control panel and select “Windows Update”. In the window that opens, click “Settings”.

In the new window, in the “Important updates” subsection, select “Do not check for updates (not recommended)”, then click OK.

Restart your computer, then go to the task manager and check the processor load.

Another possibility is a process conflict. In this case, we can also talk about the svchost.exe process, but it has nothing to do with the update. It may happen that a process is associated with a service that needs to be disabled. In some cases, rolling back drivers or reinstalling them to a more recent version for certain services helps.

In the vastness of the RuNet, this method was found - remove the network cable from the socket and insert it back. It’s not clear why it helps, but there are a lot of positive responses.

Of course, you shouldn’t forget about the processor itself - it can simply overheat. In this case, you need to find out what exactly is the matter. It may be time to replace the thermal paste.

CPU load is one of the most common and difficult problems. 100% of the processor's work is taken by unknown services and processes. This makes using the computer extremely difficult. Why is this happening? Let's try to figure it out...


Owners of personal computers, after some time after continuous use of the device, observe deterioration in performance, delayed response and other problems. The most common reasons that can lead to such problems include the complete load of the processor by unknown running processes. The easiest way in this case is to restart the computer. In some cases, this action may be effective. You can also recommend reinstalling the system, but this is a last resort method that belongs to standard recommendations.

Common Causes of Increased CPU Load

There are a lot of users who are truly concerned about this issue. They are all looking for a way to solve this problem without using radical measures. First of all, it is necessary to understand the reason that could lead to this problem. You can turn to specialized forums for help. Issues related to this computer behavior are often discussed there. There are several most common cases:

— disturbances in the functioning of the system;
— processor overheating;
- insufficient cooling.

How to identify the problem?

To determine the cause of the processor loading at 100%, you need to perform some diagnostic procedures. Once the cause has been determined, a number of steps will need to be taken to eliminate it. The following will describe in detail what needs to be done in each specific case.

How to determine the program that loads the processor?

First of all, if your computer suddenly begins to respond poorly to commands and slow down, you need to open the task manager. To perform this action, you can use the key combinations Ctrl+Alt+Del or Ctrl+Shift+Esc. You can also call up the context menu in the taskbar and find the corresponding item. In the window that opens, you must select a detailed view. Tabs will appear, from which you need to select “Processes”. In this tab you need to see when the processor load is 100%.

The tab will display a complete list of all processes running in the system at a given time. They are all sorted alphabetically by default. To identify the process that might be causing the problem, you need to select the CPU Usage column. Sometimes it happens that a fairly massive program that requires significant resources is not unloaded correctly after closing. As a result, even after closing it, many processes may remain in operation, and the load on the processor will remain accordingly. To solve the problem, just click on the “End task” button.

In this case, rebooting the system may also work, as was recommended at the beginning of the article. During the reboot, all tasks are removed. In addition, this frees up additional resources that you may not notice on your own. The list of processes may contain unknowns that did not exist before. Such processes can also affect system loading. This behavior is typical of viruses. For this reason, it is good to know the names and characteristics of all the processes that run in the system. This way you can periodically check the list of running processes for suspicious activity.

System malfunctions

The previously described method does not allow us to accurately determine the reason why the processor is loaded at 100%. What to do in this case? In the task manager you can often see a situation where the entire load falls on the “System inactivity” item. In this case, you will not be able to cancel the task. It is recommended to run the utility, which is distributed free of charge by Microsoft. The Process Explorer utility allows you to obtain advanced information shown in the Task Manager. In this case, 100% CPU load may occur due to system interrupts. In the program they are designated as Interrupts. It is difficult to say what the reason for this behavior is unless we take decisive action.

What can load the processor?

Incorrectly described drivers often lead to this problem. To identify this problem, you need to boot the system in safe mode. If after this the processor does not experience the same load, then most likely the problem lies with the drivers. In this case, you need to look for new versions that are provided directly by the manufacturer of the laptop or computer. Viruses in the system can also cause similar problems.

In this case, you need to scan your computer using antivirus software. Also, CPU usage at 100% can occur as a result of problems with connected devices. How to be in this case? You can give one simple piece of advice: just disconnect everything from the computer, leave only the minimum set consisting of a monitor, mouse and keyboard. Take a look at Device Manager and check it for any problems. If these recommendations do not help solve the problem, you will have to reinstall the operating system. It is good if there are rollback points to restore to the moment when the system functioned normally.

Overheating and dust accumulation

Sometimes you can determine the reason why the processor is 100% loaded by the loud operation of the cooler and elevated processor temperature. These signs, as a rule, indicate that it is time to clean your laptop or computer from accumulated dust.

Hello.

One of the most common reasons why a computer slows down is CPU load, sometimes by incomprehensible applications and processes.

Not long ago, on a friend’s computer, I had to deal with an “incomprehensible” CPU load, which sometimes reached 100%, although there were no open programs that could load it like that (by the way, the processor was a fairly modern Intel inside Core i3). The problem was solved by reinstalling the system and installing new drivers (but more on that later...).

Actually, I decided that this problem was quite popular and would be of interest to a wide range of users. In the article I will give recommendations that will help you figure out why the processor is loaded and how to reduce the load on it. So…

1. Question No. 1 - what program is the processor loaded with?

To find out what percentage of the processor is loaded, open the Windows task manager.

Buttons: Ctrl+Shift+Esc (or Ctrl+Alt+Del) .

By the way, very often the problem arises in the following way: you were working, for example, in Adobe Photoshop, then you closed the program, but it remained in the processes (or this happens all the time with some games). As a result, they “eat” resources, and not small ones. Because of this, the computer starts to slow down. Therefore, very often the first recommendation in such cases is to restart the PC (since in this case such applications will be closed), or go to the task manager and remove such a process.

2. Question No. 2 - there is CPU load, but there are no applications and processes that load them! What to do?

When setting up one of the computers, I encountered an incomprehensible CPU load - there is a load, but there are no processes! The screenshot below shows how it looks in the task manager.

On the one hand, it’s surprising: the “Display processes of all users” checkbox is turned on, there is nothing among the processes, and the PC load jumps by 16-30%!

To see all processes that load your PC - run the free utility Process Explorer. Next, sort all processes by load (CPU column) and see if there are any suspicious “elements” there (the task manager does not show some processes, unlike Process Explorer).

Link to office Process Explorer website: https://technet.microsoft.com/ru-ru/bb896653.aspx

Process Explorer - system interrupts and DPCs load the processor by ~20%. When everything is in order, usually the CPU load associated with Hardware interrupts and DPCs does not exceed 0.5-1%.

In my case, the culprit turned out to be system interrupts and DPCs. By the way, I will say that sometimes fixing the PC load associated with them is quite a troublesome and complicated task (besides, sometimes they can load the processor not only by 30%, but by 100%!).

The fact is that the CPU is loaded due to them in several cases: problems with drivers; viruses; the hard drive does not operate in DMA mode, but in PIO mode; problems with peripheral equipment (for example, printer, scanner, network cards, flash and HDD drives, etc.).

1. Problems with drivers

The most common reason for CPU usage is system interrupts. I recommend doing the following: boot the PC in safe mode and see if there is a load on the processor: if there is none, the reason is very high in the drivers! In general, the easiest and fastest way in this case is to reinstall the Windows system and then install one driver at a time and see if the CPU load appears (as soon as it appears, you have found the culprit).

Most often, the culprit here is network cards + universal drivers from Microsoft, which are installed immediately when installing Windows (sorry for the tautology). I recommend downloading and updating all drivers from the official website of your laptop/computer manufacturer.

Plus, sometimes check your computer with third-party programs (which look for advertising modules adware, mailware, etc.): more about them.

3. Hard disk operating mode

The operating mode of the HDD can also affect the loading and performance of the PC. In general, if the hard drive is not operating in DMA mode, but in PIO mode, you will immediately notice it with terrible “brakes”!

4. Problems with peripheral equipment

Disconnect everything from your laptop or PC, leave the bare minimum (mouse, keyboard, monitor). I also recommend paying attention to device Manager, whether there will be any installed devices with yellow or red icons (this means either there are no drivers or they are not working correctly).

How to open device manager? The easiest way is to open the Windows Control Panel and type the word “dispatcher” into the search bar. See screenshot below.

Device Manager: there are no drivers for devices (disk drives), they may not work correctly (and most likely not work at all).

3. Question No. 3 - can the processor load be caused by overheating and dust?!

The reason why the processor may be overloaded and the computer will start to slow down may be due to overheating. Typically, characteristic signs of overheating are:

  • Increased hum of the cooler: the number of revolutions per minute increases because of this the noise from it becomes stronger. If you have a laptop: then by passing your hand next to the left side (usually there is a hot air outlet on laptops) you will be able to notice how much air is blown out and how hot it is. Sometimes the hand doesn’t tolerate it (this is not good)!
  • braking and slowdown of the computer (laptop);
  • refusal to boot with errors indicating failures in the cooling system, etc.

For example, in the AIDA 64 program, to view the processor temperature, you need to open the “ Computer/sensor«.

AIDA64 - processor temperature 49 degrees. C.

How do you know which temperature is critical for your processor and which is normal?

The easiest way is to look at the manufacturer's website; this information is always indicated there. It is quite difficult to give general figures for different processor models.

In general, on average, if the processor operating temperature is not higher than 40 degrees. Ts. - everything is fine. Above 50g. C. - may indicate problems in the cooling system (for example, an abundance of dust). However, for some processor models this temperature is the normal operating temperature. This especially applies to laptops, where limited space makes it difficult to organize a good cooling system. By the way, on laptops and 70 gr. C. - may be normal temperature under load.

Cleaning from dust: when, how and how many times?

In general, it is advisable to clean your computer or laptop from dust 1-2 times a year (although a lot depends on your room, some have more dust, some have less...). Once every 3-4 years it is advisable to replace the thermal paste. Both operations are not complicated and can be performed independently.

To avoid repetition, I will provide a couple of links below...

How to clean your computer from dust and replace thermal paste:

Cleaning a laptop from dust, how to wipe the screen:

PS

That's all for today. By the way, if the measures suggested above did not help, you can try reinstalling Windows (or even replacing it with a newer one, for example, changing Windows 7 to Windows 8). Sometimes, it’s easier to reinstall the OS than to look for the cause: you’ll save time and money... In general, you sometimes need to make backup copies (when everything works well).