Windows Server 2022, high CPU use from "taskhostw.exe"

Eric Wendt 5 Reputation points

Hello, we've been a little puzzled at trying to track down what may be causing a high CPU usage from a particular application.

We've recently built out new DC servers under the Windows Server 2022 OS. In all of these servers, we've noticed the CPU usage is always at 100%. Upon investigating, I see that the "taskhostw.exe" application is consume at least 85% or more on a consistent basis.

Now, I understand that this application is a 'handler' for multiple services that feed into it; the problem is pinpointing what service is consuming so much of the CPU.


Even after clean reboots, the problem persists.

I've seen it suggested to check the properties of this app and then the "Threads" tab to see what .dll file is being referenced, but as you can see, none exist: Screenshot_3.png

Also, I have seen it suggested that perhaps the "StorageSense" task is to blame (Task Scheduler > Task Scheduler Library > Microsoft > Windows > DiskFootprint): Screenshot_4.png

But I have stopped this task before and did not see any difference.

I should note that Windows Defender is turned off as we have our own security from a third-party vendor, so one might naturally assume it would be Defender running in the background scanning.

These are critical servers so with the exception of outside business hours, constant restarts during the day isn't feasible.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
11,707 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Wesley Li-MSFT 4,436 Reputation points Microsoft Vendor


    In addition to TaskManager and Process Explorer, there are several tools that can help you check for threads that are causing high CPU usage.

    One such tool is ProcDump, which can be used to take memory dumps during CPU spikes. Then you can inspect the call stacks of all threads.

    Another tool you can use is perfmon, which allows you to monitor your system's performance and keep checking for threads that are hogging the most CPU.

    Of course, if it is outside of working hours and the server can be restarted, you can also try to collect user mode dumps to analyze the root cause.

    If the response is helpful, please click "Accept Answer" and upvote it.

  2. David Llewellyn 0 Reputation points

    I am seeing the same and believe it is the StorageSense scheduled task that is responsible. I suspect the task kicks off and the taskhostw.exe process is started by this. I don't think stopping the scheduled task would stop the taskhostw.exe process, as it appears to be a runaway at that point. To be sure if the StorageSense task is related, I would recommend disabling the task from running for a period and see if the issue stops for that particular server. If not, then it is something else and you can re-enable the scheduled task. I am using GPO to disable StorageSense on my servers for the time being:

    gpedit - Change Computer Configuration > Administrative Templates > System > Storage Sense > Allow Storage Sense to Disabled.

  3. Shawn Doné 0 Reputation points

    Hi David, Yes, I too have noticed that undoing the checkbox and adjusting the areas within gpedit have not made any difference. I also added, in the same gpedit location, a "disabled" state to the "Allow Storage Sense Temp FIles cleanup" thinking that might help as well but I have not seen any changes. I'm at another dead end on my side. Keep me posted and I will do the same. Shawn

    0 comments No comments