Changes to Default Throttle Settings

I buried this in a previous update on changes in .Net 4 but here’s a more prominent description of how service throttles have changed.

The ServiceThrottlingBehavior allows you to configure three settings that limit the resource consumption of a service. MaxConcurrentInstances limits the total number of copies of the service that will be instantiated to serve requests according to the instancing mode. MaxConcurrentSessions limits the total number of sessions of messages among all of the instances of a service. MaxConcurrentCalls limits the total number of messages that can be processed simultaneously among all of the instances of a service.

The instance throttle is rarely used as many services are either single-instanced or have the number of instances directly connected to the number of sessions or calls.

The session throttle is only used in conjunction with sessions of messages where a session continues to exist even when messages aren't being transmitted. Otherwise, the number of sessions is simply the number of calls.

This makes the call throttle typically the most interesting throttle and the one that you'll need to adjust most often.

In .Net 4 the session throttle has been changed to by default be larger than the call throttle to greatly reduce the number of scenarios in which you need to worry about its value. If you don't explicitly set a value for the instance throttle, then it will stay out of your way by automatically growing with your settings for the call throttle and session throttle.

Additionally, both MaxConcurrentCalls and MaxConcurrentSessions have their defaults scaled by the number of processor cores. If you run the service on a more powerful machine, then the default limits now scale in a proportional fashion. This processor scaling is only for the defaults. If you set your own value for the throttle then we will use exactly what you tell us.

This produces the following new set of defaults when a service runs using .Net 4:

- MaxConcurrentCalls is 16 times the number of processors

MaxConcurrentSessions is 100 times the number of processors  
  • MaxConcurrentInstances is the sum of MaxConcurrentCalls and MaxConcurrentSessions