Wednesday, June 4, 2014

Svchost.exe high CPU usage and WBEM issues

Recently my windows 7 desktop at work felt painfully slow and any file access on my local drives would crawl, & explorer would constantly flash "Not Responding". Looking at task manager & resource monitor I saw a high cpu usage with svchost.exe and excessive disk usage with something similar to

C:\Windows\System32\wbem\Repository\MAPPING3

This basically means the WMI respository is hosed and causes major performance issues within windows, rendering the machine practically unusable. After googling the interwebs I came across this solution from Scott Hanselman.

Lately I've been seeing one particular svchost.exe sucking CPU. There always a number of in-proc running inside of each of the many svchost (Service Host) instances. Using ProcEx, I figured out the PID of the specific instance. Then, I right clicked within ProcEx, hit Properties, and under the Threads tab noticed that wbemcore.dll was working REALLY hard.

Crap, time to re-schmutz WMI's repository. So, I stop WMI from the command line with :

net stop winmgmt

Then I deleted the Repository directory in c:\windows\system32\wbem\ then started again with

net start winmgmt

Then I re-stored/compiled all the .mof (Managed Object Format) files with a batch file containing this one line:

for %%i in (*.mof,*.mfl) do Mofcomp.exe %%i

Now I'm back in business.



These steps fixed my performance issues and everything's back to normal.

No comments:

Post a Comment