ApplicationPoolCpu.Limit Property

 

Gets or sets the maximum percentage of CPU time that the worker processes in an application pool are allowed to consume over a period of time.

Namespace:   Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

public long Limit { get; set; }

Property Value

Type: System.Int64

The maximum percentage of CPU time, in hundredths of one percent, that the worker processes in an application pool are allowed to consume over a period of time. The default is 0, which disables CPU limiting.

The period of time to which the limit applies is specified by the ResetInterval property. If the limit set by the Limit property is exceeded, an event is written to the event log and an optional set of events is triggered as determined by the Action property.

You can see and modify the Limit property in the Advanced Settings dialog box in IIS Manager.

When you set the Limit property, you need to call the ServerManager.CommitChanges method to persist the changes to the ApplicationHost.config file.

System_CAPS_noteNote

Setting this property to the default value of 0 disables CPU limiting.

The following example checks the value of the Limit property. If the limit is set to more than 25 milliseconds, the value is reset to 25. This code example is part of a larger example provided for the ApplicationPoolCpu class.

Return to top
Show: