ApplicationPool.Cpu ApplicationPool.Cpu ApplicationPool.Cpu ApplicationPool.Cpu Property


Gets CPU usage parameters for the current application pool.

 property Microsoft::Web::Administration::ApplicationPoolCpu ^ Cpu { Microsoft::Web::Administration::ApplicationPoolCpu ^ get(); };
public Microsoft.Web.Administration.ApplicationPoolCpu Cpu { get; }
member this.Cpu : Microsoft.Web.Administration.ApplicationPoolCpu
Public ReadOnly Property Cpu As ApplicationPoolCpu

Property Value


The following example checks the value of the Microsoft.Web.Administration.ApplicationPoolCpu.Limit property. If the property is set to a value greater than 25, the example resets the value to 25. This code example is part of a larger example provided for the ApplicationPool class.

// Set the CPU limit to a maximum of 25.
if (applicationPool.Cpu.Limit > 25)
    applicationPool.Cpu.Limit = 25;


You can use the properties and methods of the object returned by this property to configure CPU usage parameters for the current application pool. To set default values for all application pools on the server, use the ApplicationPoolDefaults object.


The property values of the ApplicationPoolCpu object will not be written to the ApplicationHost.config file until the Microsoft.Web.Administration.ServerManager.CommitChanges method is called.

Applies to