Share via


ApplicationPoolCpu.ResetInterval Property

Definition

Gets or sets the reset period for CPU monitoring and throttling limits on an application pool.

public:
 property TimeSpan ResetInterval { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan ResetInterval { get; set; }
member this.ResetInterval : TimeSpan with get, set
Public Property ResetInterval As TimeSpan

Property Value

A TimeSpan value that specifies the reset period for CPU monitoring and throttling limits on an application pool. The default is Zero, which disables CPU monitoring.

Examples

The following example checks the value of the ResetInterval property. If the interval is set to more than 10 minutes, the value is reset to 10 minutes. This code example is part of a larger example provided for the ApplicationPoolCpu class.

// Set the interval.Limit to a maximum of 10 minutes.
TimeSpan maxinterval = new TimeSpan(0, 10, 0);
if (apppool.Cpu.ResetInterval > maxinterval)
{
    apppool.Cpu.ResetInterval = maxinterval;
    apppool_isdirty = true;
}

Remarks

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

When you set the ResetInterval property, you need to call the Microsoft.Web.Administration.ServerManager.CommitChanges method to persist the changes to the ApplicationHost.config file.

When the time elapsed since the last process accounting reset equals the time span specified by this property, IIS 7 resets the CPU timers for both the logging and limit intervals. Setting this property to 0, which is the default, disables CPU monitoring.

Important

The value of the ResetInterval property must be greater than the time between logging operations. Otherwise, IIS 7 resets counters before logging has occurred and process accounting does not occur.

Note

Process accounting in IIS 7 uses Windows Job Objects to monitor CPU times for an entire process. Therefore, process accounting logs and throttles only applications that are isolated in a separate process from IIS 7.

Applies to