Resource Consumption Issues

If your WMI-based management application or script is running successfully but very slowly, consider whether WMI is using an excessive amount of computer resources (such as memory or CPU time). In the worst cases, WMI resource consumption issues can cause the computer to respond slowly.

The Processes tab of Windows Task Manager (TaskMgr.exe) is an effective tool to confirm whether WMI is consuming excessive resources. In the Image Name column, review WinMgmt.exe to see if it is using a large percentage of CPU or a large amount of CPU Time. The Mem Usage column is also useful, but you should add the VM Size column to add virtual memory consumption to the display (by clicking Select Columns on the View menu). WMI usually uses 8 to 10 MB of memory or virtual memory.

Note

  • On computers running Windows XP or an operating system in the Windows Server 2003 family, the WMI service is run in a Svchost process.

The most common cause of WMI resource expenditure issues are WMI providers not running as designed. This is especially true for non-standard providers. Check to see if there are any known problems with the non-standard providers that are installed on your computer. A later version of the provider might be available.

Another common cause of WMI resource consumption issues is queries run against the CIM Repository. If the queries request a large amount of data or are poorly formed, WMI can use considerable resources to return the results. Queries built into your management application should be well tested so that they do not cause problems. However, any custom queries that you or other administrators have created might cause this problem. Also, resource consumption will be high if your queries are not run asynchronously.

Providers do not always run in the context of WinMgmt.exe. This is especially true with Windows XP and operating systems from the Windows Server 2003 family. If you suspect that a process consuming excessive resources might be running a WMI provider, you can use Tlist.exe (with the process identifier as the parameter) to list the DLLs that are loaded in that process. If you suspect a specific provider, you can use Tlist -m providerDLLname to determine which process it is running in. Tlist is part of the Windows 2000 Support Tools, which is available on the Windows 2000 product CD. Providers.vbs, shown in the "Verifying the State of the CIM Repository" section earlier in this appendix, lists the DLL for each provider.

For More Information

Did you find this information useful? Please send your suggestions and comments about the documentation to smsdocs@microsoft.com.