- 100% CPU Usage in Windows 10? Here’s How to Fix it
- WMI Provider Host Using 100% CPU
- Disable Superfetch (or Windows Search)
- Reset Your Power Plan
- Check Your Power Supply
- Disable Third-Party Antivirus Software
- OS thread scheduling and cpu usage relations
- 2 Answers 2
- Getting a per thread CPU statistics
- 4 Answers 4
100% CPU Usage in Windows 10? Here’s How to Fix it
We’ve all been there. You turn on your PC, and instead of getting straight to work, you’re faced with horrific slowdown and loud-running fans. Hit Ctrl + Shift + Escape , and you will see that your CPU usage is inexplicably at 100%.
It’s a common problem that’s, luckily, not usually too hard to solve. Here are several fixes for the 100% CPU usage problem.
WMI Provider Host Using 100% CPU
The WMI (Windows Management Instrumentation) Provider Host is a core service on Windows 10 that links up with various software on your PC to send it information about your operating system. In other words, it’s a very important process, and you shouldn’t disable it lightly. If, however, you see in the Task Manager Processes tab that it’s using a lot of CPU, then of course you should do something about it.
The first thing you can try is restarting the WMI service. Go to the Services app. (You can get there quickly by typing services in a Start menu search). Scroll down to Windows Management Instrumentation, right-click it, then click Restart.
If that doesn’t work, then the next solution is a little more intricate but also has the potential to offer more long-term solutions for your CPU woes.
If your 100% CPU usage is being caused by the WMI Provider Host process in Task Manager, then you can delve deeper into the problem. Press Win + R ,then open “eventvwr.” Here in the pane on the left, go to “Applications and Service Logs -> Microsoft -> Windows -> WMI-Activity -> Operational.” This will show you all the processes that the WMI Provider Host is dealing with.
Check the middle column, “Operational,” look for errors in the service, then under the “General” tab below that, check the “ClientProcessId” number. This should help you zoom in on the app or process clogging up your WMI Provider Host service.
Go back to Task Manager, click the “Details” tab, then sort the processes by “PID.” Find the process with the error, right-click it and click “Open file location.” This will give you an idea of what software the process is attached to and whether you can reinstall it, uninstall it, update its drivers and so on.
There may be multiple errors like this in the WMI Provider Host, in which case you should repeat the above process to address the different errors. It’s also possible that just one app/process has been hogging your CPU all this time, in which case you should be good to go after you’ve dealt with the culprit.
Disable Superfetch (or Windows Search)
Superfetch is a process by which Windows 10 learns which apps you use most often, then pre-fetches them for you so they load quicker each time you use them. It’s a constant background process that doesn’t usually cause problems, but it doesn’t always play nice with older devices.
To find out whether Superfetch (or another service) is hogging your CPU, open Task Manager ( Ctrl + Shift + Escape ), click “More details,” then click “CPU” to order processes by how much CPU they’re using.
If you see that a “Service Host” like Superfetch or something else is using a lot of CPU, you can try right-clicking it and clicking “End process.”
Alternatively, to disable it permanently (or until Windows switches it on again, which can happen after you update the OS), press Win + R , type services , then in the Services window scroll down to Superfetch.
Right-click Superfetch, click Properties, then in its Properties window click the drop-down next to “Startup type,” click “Disabled,” and OK.
You can technically do this to any service that’s hogging CPU, but some services are system-critical, so you need to be careful. Another culprit of high CPU usage is “Windows Search,” which you can safely disable, too.
Reset Your Power Plan
Twiddling around in Windows’s power options can have a substantial effect on your PC performance. If you’re set to “High performance” – particularly if you made tweaks to the “plan settings” – then it’s possible that you’re overloading your CPU. (Again, older devices are susceptible to this.)
Type power plan in the Start search ,bar then click “Choose a power plan.” If you’re on “High performance” or “Power Saver,” then switch to “Balanced.”
For extra certainty, click “Change plan settings,” then on the new screen click “Restore default settings for this plan.”
Check Your Power Supply
This one’s an issue that can affect both desktop and laptop Windows 10 users. If you have a faulty power supply (the mains cable on a laptop, the PSU in a desktop), then it can automatically start undervolting your CPU to preserve power. When undervolted, your CPU can function at only a fraction of its full power, hence the possibility of this manifesting as 100% CPU usage on Windows 10.
To solve this on a laptop is quite simple: unplug your laptop from the power cable, then click the battery icon at the bottom-right corner of your Windows 10 desktop -> Battery Settings -> Power & Sleep Settings -> Additional power settings, and select High Performance. If the issue was with your power supply, the CPU usage should return to normal in the task manager ( Ctrl + Shift + Esc ).
On a desktop things can be a little more complicated, as you’ll need to physically remove the PSU from your PC and test a different one. We recommend going through our other tips listed below before trying this.
Disable Third-Party Antivirus Software
This one may be a bit contentious, but our view here is that if you’re using antivirus software on Windows 10, then you’re probably putting unnecessary strain on your CPU (particularly if its older). It doesn’t usually hurt to have the extra security, but you probably don’t need it.
Every year we write an in-depth feature about Windows 10’s onboard security software, Windows Defender, and every year it gets better and better. At this point, it’s more or less on par with the best antivirus software out there.
Don’t be afraid to disable your third-party antivirus software to see if it helps your CPU usage. If it does, then uninstall it, because Windows Defender should really have you covered.
With high CPU usage, it may be running pretty hot, too, so we’ve put together a bunch of ways you can bring the CPU temperature down. The WSAPPX process can also cause high CPU usage, so click through for our guide on how to address that.
Related:
Content Manager at Make Tech Easier. Enjoys Android, Windows, and tinkering with retro console emulation to breaking point.
OS thread scheduling and cpu usage relations
As I know, for threads scheduling, Linux implements a fair scheduler and Windows implements the Round-robin (RR) schedulers: each thread has a time slice for its execution (correct me if I’m wrong).
I wonder, is the CPU usage related to the thread scheduling?
For example: there are 2 threads executing at the same time, and the time slice for system is 15ms. The cpu has only 1 core.
Thread A needs 10ms to finish the job and then sleep 5ms, run in a loop.
Thread B needs 5ms to finish the job and then sleep 10ms, also in a loop.
Will the CPU usage be 100%?
How is the thread scheduled? Will thread A use up all its time and then schedule out?
One More Scenario: If I got a thread A running, that is then blocked by some condition (e.g network). Will the CPU at 100% affect the wakeup time of this thread? For example, a thread B may be running in this time window, will the thread A be preempted by the OS?
2 Answers 2
So the CPU usage will be 100%?
Ideally speaking, the answer would be yes and by ideally I mean , you are not considering the time wasted in doing performing a context switch. Practically , the CPU utilization is increased by keeping it busy all of the time but still there is some amount of time that is wasted in doing a context switch(the time it takes to switch from one process or thread to another).
But I would say that in your case the time constraints of both threads are aligned perfectly to have maximum CPU utilization.
And how is the thread scheduled? Will thread A use up all its time and then schedule out?
Well it really depends, in most modern operating systems implementations , if there is another process in the ready queue, the current process is scheduled out as soon as it is done with CPU , regardless of whether it still has time quantum left. So yeah if you are considering a modern OS design then the thread A is scheduled out right after 10ms.
As i know that Linux implements a fair scheduler and Windows System implements the Round-robin (RR) schedulers for threads scheduling,
Both Linux and Windows use priority-based, preemptive thread schedulers. Fairness matters but it’s not, strictly speaking, the objective. Exactly how these scheduler work depends on the version and the flavor (client vs. server) of the system. Generally, thread schedulers are designed to maximize responsiveness and alleviate scheduling hazards such as inversion and starvation. Although some scheduling decisions are made in a round-robin fashion, there are situations in which the scheduler may insert the preempted thread at the front of the queue rather than at the back.
each thread has a time slice for its execution.
The time slice (or quantum) is really more like a guideline than a rule. It’s important to understand that a time slice is divisible and it equals some variable number of clock cycles. The scheduler charges CPU usage in terms of clock cycles, not time slices. A thread may run for more than a time slice (e.g., a time slice and a half). A thread may also voluntarily relinquish the rest of its time slice. This is possible because the only way for a thread to relinquish its time slice is by performing a system call (sleep, yield, acquire lock, request synchronous I/O). All of these are privileged operations that cannot be performed in user-mode (otherwise, a thread can go to sleep without telling the OS!). The scheduler can change the state of the thread from «ready» to «waiting» and schedule some other ready thread to run. If a thread relinquishes the rest of its time slice, it will not be compensated the next time it is scheduled to run.
One particularly interesting case is when a hardware interrupt occurs while a thread is running. In this case, the processor will automatically switch to the interrupt handler, forcibly preempting the thread even if its time slice has not finished yet. In this case, the thread will not be charged for the time it takes to handle the interrupt. Note that the interrupt handler would be indeed utilizing the CPU. By the way, the overhead of context switching itself is also not charged towards any time slice. Moreover, on Windows, the fact that a thread is running in user-mode or kernel-mode by itself does not have an impact on its priority or time slice. On Linux, the scheduler is invoked at specific places in the kernel to avoid starvation (kernel preemption implemented in Linux 2.5+).
So the CPU usage will be 100%? And how is the thread scheduled? Will thread A use up all its time and then schedule out?
It’s easy to answer these questions now. When a thread goes to sleep, the other gets scheduled. Note that this happens even if the threads have different priorities.
If i got a thread running, and blocked by some condition(e.g network). Will the CPU 100% will affect the wakeup time of this thread? For example, another thread may running in its time window and will not schedule out by the OS?
Linux and Windows schedulers implement techniques to enable threads that are waiting on I/O operations to «wake up quickly» and get higher chances of being scheduled soon. For example, on Windows, the priority of a thread waiting on an I/O operation may be boosted a bit when the I/O operation completes. This means that it can preempt another running thread before finishing its time slice, even if both threads had the same priorities initially. When a boosted-priority thread wakes up, its original priority is restored.
Getting a per thread CPU statistics
How do I get the current usage of CPU for each thread in a specific application? Is it possible to get that information from somewhere or using some tool?
4 Answers 4
For a quick answer use SysInternal’s Process Explorer. Double click on a process to open the details dialogue. the threads tab gives a sortable list of all threads including context switch delta and CPU time.
Perfmon (Performance Monitor) should give you the details you want.
The following assumes Windows 2000, XP or Server 2003. I haven’t checked but I think the performance monitor is a bit different in Vista, Windows 7 & Server 2008.
To run the Performance Monitor, go to Start > Control Panel > Administrative Tools > Performance
To add a graph for each thread of an application, right-click on the graph and choose Properties. You might want to remove any of the defaults that it comes with to give you a cleaner graph.
Click the «Add. » button and make sure «Use Local Computer Counters» is checked (unless you want to monitor a different server, in which case, go ahead and choose that option).
Under «Performance Object» choose «Thread»
Select the counter «% Processor Time», and then select all of the threads you wish to monitor (control+click to select multiple). Click «Add» and then «Close».
Back in the properties, you can customise the graph however you wish, by assigning colours, patterns, etc. Click OK.
You might need to start the graphing, if you do, then clicking the red STOP sign so that it’s not enabled will start the graph.