Configuring Throttling

Adjusting throttling settings on a service is a common way of adjusting its performance. The IIS Manager extensions in AppFabric and AppFabric cmdlets allow you to configure the following service throttling settings for a service. They also allow you to specify default service throttling settings at a server, site, or application level that a service can inherit.

Service Throttling Parameters

Parameter

Description

Maximum Concurrent Calls

Specify the limit on the number of messages that a service host can process at a time. If the number of calls being processed is equal to this value, any new calls are queued until one of the active calls completes. The allowed values for this parameter range from 0 to Int32.MaxValue. Setting this parameter to 0 is equivalent to setting it to Int32.MaxValue. The default value is 16 * number of processors in the computer.

Maximum Concurrent Instances

Specify the maximum number of InstanceContext objects in the service. It is important to keep in mind the relationship between the MaxConcurrentInstances property and the InstanceContextMode property. If InstanceContextMode is PerSession, the resulting value is the total number of sessions. If InstanceContextMode is PerCall, the resulting value is the number of concurrent calls. If a message arrives while the maximum number of InstanceContext objects already exist, the message is held until an InstanceContext object closes. The allowed values for this parameter range from 1 to Int32.MaxValue. The default value is Maximum Concurrent Calls + Maximum Concurrent Sessions.

Maximum Concurrent Sessions

Specify the limit on the number of sessions that a service host can accept. The service host will accept connections in excess of the limit, but only the channels below the limit are active (messages are read from the channel). The allowed values for this parameter range from 0 to Int32.MaxValue. Setting this value to 0 is equivalent to setting it to Int32.MaxValue. The default value is 100 * number of processors in the computer.

Whether you use the IIS Manager user interface or AppFabric cmdlets to configure service throttling parameters, you are basically changing the values of service throttling parameters in the configuration file associated at the specified or selected level in the IIS hierarchy (server, site, application, and service). The following code example shows configuration elements or attributes associated with the service throttling parameters. For general information about configuration, including information about inheriting default settings, see Configuration Process in AppFabric.

<serviceBehaviors>
    <behavior name="s1Behavior">
        <serviceThrottling maxConcurrentCalls="16" maxConcurrentInstances="26" maxConcurrentSessions="10" />
    </behavior>
</serviceBehaviors>

Topics in this section describe how to configure throttling settings for services by using IIS Manager extensions or AppFabric cmdlets.

In This Section

  2012-09-12