Svchost.exe takes up 100% of the CPU
Wednesday, June 6th, 2007If your computer has been moving slow lately, particularly after you log in, it may be because of a problem with the Windows Automatic Updates client. To check for this, open Task Manager (Ctrl-Shift-Esc) and look in the Processes tab. Sort by CPU usage and see if svchost.exe is at the top - if so, the problem is almost certainly related to Windows Updates.
You may be wondering what svchost.exe is and what it has to do with Windows Updates. Svchost.exe is a Windows executable that most Windows operating system components use to run services. A service is any program that runs constantly (unlike regular applications that you open and close), has to register itself with Windows and is listed under Control Panel -> Administrative Tools -> Services (switch to Classic View if you can’t find Administrative Tools). For example, whenever a program crashes you will see a dialog box pop up asking if you would like to send an error report to Microsoft. This “feature” is provided by Microsoft’s Error Reporting Service, which incidentally runs as svchost.exe.
The Windows Update client has two parts - one a stand-alone executable that runs when it’s time to check for updates (wuauclt.exe) and the Automatic Updates service that runs as svchost.exe. When you first start up your computer and log in, the stand-alone executable runs to check for updates but uses the service as well. This typically takes less than a minute and should not max out CPU usage for an extended period of time.
So what’s the fix? There’s quite a bit of information out on the Web about this and Microsoft has released a couple updates, but if your computer is really locked up you may have a hard time actually installing them. In fact I had to kill the svchost.exe process using Task Manager on one computer just to install the update (and that’s not an action I would recommend unless you really know what you are doing). The first thing you may need to do is temporarily fix the problem:
- Open My Computer and go to Tools -> Folder Options…, then the View tab. Verify that Show Hidden Files is selected and that the two options starting with Hide are unchecked.
- Click OK and then browse to C:\Windows\SoftwareDistribution\Download, delete everything in the folder but not the folder itself, and then go to the Windows Update site and try to get the latest updates. The files you deleted should start to reappear, that is normal.
- If that does not work, go to Start -> Run…, type in net stop wuauserv, and hit Enter.
- In Windows Explorer, browse to C:\Windows\SoftwareDistribution\DataStore and delete DataStore.edb (this will remove update history from Windows Update).
- Go to Start -> Run…, type in net start wuauserv, hit Enter and go to the Windows Update site and try to get the latest updates.
- If that does not work, repeat step #3 and then delete all files and folders under C:\Windows\SoftwareDistribution but not the folder itself, then repeat step #5.
Once your computer is in a usable state, download and install the appropriate update from this page:
http://support.microsoft.com/kb/927891
then download and install the latest Windows Update Client here:
http://download.windowsupdate.com/v7/windowsupdate/redist/standalone/WindowsUpdateAgent30-x86.exe
You may need to restart after the installation and the first time Windows Update runs afterward it may still use a lot of CPU but after that it should be fine.