High CPU usage condition may occur on Windows 2003 when Job Objects counter is queried by a Performance Monitoring Application

Article ID: 2008368 - View products that this article applies to.
Expand all | Collapse all

Symptoms

A Persistent high CPU usage condition will be noticed in a Performance Monitoring Application (PMA) when it queries the Job Object or Job Object Details Performance Counters when the system has a large number of Job Objects in the \BaseNamedObjects namespace in the Kernel. The high CPU condition occurs regardless of whether the performance data for those objects are queried via interfaces exposed by performance monitoring libraries or via WMI interfaces.

If the performance monitoring application is terminated then the high CPU usage condition will subside.

Cause

This high CPU usage condition will occur when the PMA attempts to query all the Job Objects or Job Object Details counters and all of their attributes for all the Job Object Instances and the number of Objects in the \BaseNamedObjects namespace is large. \BaseNamedObject namespace is exposed to the performance monitoring libraries via Job Object and Job Object Details performance counters.

If a namespace is not specified when a program creates a Job Object, then in Windows 2003 those objects will be created in \BaseNamedObjects.

Job Object and Job Object Details are complex structures and querying all the attributes of a Job Object is a CPU intensive operation. The high CPU condition can happen under either of the following two circumstances.

  1. If the number of Job Objects in the \BaseNamedObjects namespace is quite large (e.g., several thousand) and an application attempts to query the performance data of all the objects for all the object attributes.
  2. If the performance data for the Job Object or Job Object Details is requested very frequently by the performance monitoring application.

For more information about the structure of a Job Object and the data set which is being queried for each individual Job Object, you can refer to the Win32_PerfFormattedData_PerfProc_JobObject Class document.

Resolution

  1. As a workaround to avoid a high CPU usage condition you can exclude the Job Object or Job Object Details counters from being queried in your PMA or reduce the frequency with which the data is being queried.
  2. You can also contact the vendor of the application which is responsible for creating a large number of Job Objects in \BaseNamedObjects and suggest that they create a their objects in a private namespace.  Creating a large number of objects in a private namespace instead of in the \BaseNamedObjects namespace will ensure that those objects are not exposed to the performance libraries or WMI interfaces, so that querying Job Object related performance data will not cause high CPU usage. They can use the following MSDN documentation for guidance. 

CreatePrivateNamespace Function

http://msdn.microsoft.com/en-us/library/ms682419(VS.85).aspx   

 

CreateJobObjects Function

http://msdn.microsoft.com/en-us/library/ms682409(VS.85).aspx  

 

Object Namespaces

http://msdn.microsoft.com/en-us/library/ms684295(VS.85).aspx    

 

Job Objects

http://msdn.microsoft.com/en-us/library/ms684161(VS.85).aspx

More Information

This problem is less likely to occur in newer Operating Systems such as Window Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2. This is because with these Operating Systems, the default namespace for application-specific objects is of the form \Sessions\<SessionID>\BaseNamedObjects. As the Job Objects which are created in these namespaces are not directly under the global \BaseNamedObjects namespace, they are not exposed to the performance libraries and will not be available for query via Performance Monitoring Tools.

The WinObj tool from Sysinternals can be used to find the number of Objects in the \BaseNamedObjects namespace.

WinObj

http://technet.microsoft.com/en-us/sysinternals/bb896657.aspx

Properties

Article ID: 2008368 - Last Review: May 22, 2013 - Revision: 4.0
Applies to
  • Microsoft Windows Server 2003 R2 Datacenter Edition (32-Bit x86)
  • Microsoft Windows Server 2003 R2 Datacenter x64 Edition
  • Microsoft Windows Server 2003 R2 Enterprise Edition (32-Bit x86)
  • Microsoft Windows Server 2003 R2 Enterprise x64 Edition
  • Microsoft Windows Server 2003 R2 Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003 R2 Standard x64 Edition
Keywords: 
KB2008368

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com