Adjusting Host Throttling

BizTalk Server interacts with different Microsoft technologies, each of which can consume a significant portion of the memory, disk, and CPU resources available on the BizTalk server and the SQL server that contains the BizTalk Server databases. BizTalk Server employs a throttling mechanism to help manage the use of available resources to minimize resource use contention.

Most of the processing that takes place on a BizTalk server occurs within a BizTalk Server host instance, which is a process running as a Windows service or an isolated host process on the BizTalk server. Host throttling configuration parameters are set on a per-host basis in the BizTalk Server Administration console. The configuration applies to all the host instances assigned to the host.

The BizTalk Server host throttling mechanism continually monitors for a throttling condition, calculates the severity of the throttling condition, and applies host throttling progressively depending on the calculated severity. The throttling mechanism is self-tuning and the default configuration options are suitable for the majority of BizTalk Server processing scenarios. BizTalk Server host throttling exposes several configurable options that can be used to tune throttling for specific scenarios.

The throttling mechanism moderates the workload of the host instance to ensure that the workload does not exceed the capacity of the host instance or any downstream host instances. The throttling mechanism also prevents a condition known as resource contention that can lower the overall performance of the host instance process or other system processes. Resource contention occurs when one or more processes consume a limited resource to the detriment of themselves and/or another process. For example, the consumption of excessive memory or threads can lead to memory allocation failure or high thread context-switches, which can impact the performance of the process. Resource contention like this can be detrimental to the overall performance of BizTalk Server.

The host throttling mechanism also detects when available resources are being underused. If available resources are underused then the throttling mechanism allows additional messages to be processed by a host instance. The host throttling mechanism continually monitors if available resources are over or underused and adjusts message flow through the host instance accordingly.

The BizTalk Server host throttling mechanism helps to ensure that the system operates at an optimal and sustainable level.

BizTalk Server uses the following algorithm when applying host throttling:

  1. Continuously monitor the following parameters to see if they exceed certain thresholds. If the values for the parameter exceed the threshold for the parameter then a throttling condition exists.

    • Amount of memory in use (both system wide and host process memory).

    • Number of in-process messages being delivered or processed (threshold for outbound throttling).

    • Number of threads in use.

    • Database size, measured by the number of items in the queue tables for all hosts and the number of items in the spool and tracking tables.

    • Number of concurrent database connections.

    • Rate of message publishing (inbound) and delivery or processing (outbound).

  2. Determine the severity of the throttling condition. Throttling conditions are ranked in severity as follows (from most severe to least severe).

    • Host process memory in use exceeds threshold.

    • Number of in-process messages exceeds threshold.

    • Count of threads in use exceeds threshold.

    • Database size exceeds threshold.

    • All other throttling conditions.

  3. Progressively apply throttling based upon the severity of the throttling condition(s). Throttling is applied more aggressively as the severity level increases. Progressive throttling is achieved as follows:

    • One or more throttling conditions are detected and assigned a severity.

    • An instruction to implement throttling is issued based on the condition with the highest severity. Depending on the throttling condition, if the condition persists, the size of various thread pools may be reduced and memory may be freed by dehydrating running orchestrations.

    • A delay is applied in the publishing or processing of the message, depending on whether the message is inbound or outbound. The delay period is proportional to the severity of the throttling condition, so higher severity throttling conditions will initiate a longer throttling period than lower severity throttling conditions. This delay period is adjusted up and down within certain ranges by the throttling mechanism as conditions change. The current delay period is exposed through the Message delivery delay (ms) and the Message publishing delay (ms) performance counters associated with the BizTalk:Message Agent performance object category. These performance object counters are documented in the topic "Host Throttling Performance Counters" in BizTalk Server 2006 R2 Help at

    • The throttling mechanism continues to check if a throttling condition is present. If the throttling conditions are mitigated then the throttled messages are unblocked and the thread pool and other resources are allowed to operate in an unrestricted mode. If the system continues to operate without any throttling conditions, the delay period is greatly reduced. If the throttling condition persists, the delay amount is incremented proportional to the severity of the condition, and subsequent messages are subject to the higher delay.

    • Throttling is no longer implemented when the delay period has elapsed.

There are three primary types of throttling conditions: rate based, resource based, and user controlled.

  1. Rate based throttling is divided into two categories; inbound (published) and outbound (delivered):

    • For inbound (published) messages, BizTalk Server throttles publishing of messages if The Message publishing incoming rate for the host instance exceeds the Message publishing outgoing rate * the specified Rate overdrive factor (percent) value. The Rate overdrive factor (percent) parameter is configurable on the Message Publishing Throttling Settings dialog box. Rate based throttling for inbound messages is accomplished primarily by inducing a delay before publishing the batch of messages into the MessageBox database. No other action is taken to accomplish rate based throttling for inbound messages.

    • For outbound (delivered) messages, BizTalk Server throttles delivery of messages if The Message delivery incoming rate for the host instance exceeds the Message delivery outgoing rate * the specified Rate overdrive factor (percent) value. The Rate overdrive factor (percent) parameter is configurable on the Message Processing Throttling Settings dialog box. Rate based throttling for outbound messages is accomplished primarily by inducing a delay before removing the messages from the in-memory queue and delivering the messages to the End Point Manager (EPM) or orchestration engine for processing. No other action is taken to accomplish rate based throttling for outbound messages.

      For more information about the rate overdrive factor, see "How to Modify the Default Host Throttling Settings" in BizTalk Server 2006 R2 Help at

  2. Resource based throttling monitors system resources such as threads, memory, and database size, and can be applied to any service class.

  3. User controlled throttling occurs when the default throttling behavior has been modified by setting a registry value or values to control the throttling behavior of a host process. The registry keys for overriding the default throttling behavior are described in the "Registry settings that affect default throttling behavior" section of the topic "How to Modify the Default Host Throttling Settings" in BizTalk Server 2006 R2 Help at

When it comes to throttling, one solution is not appropriate for all BizTalk deployments. There are a range of factors that determine what the optimal settings should be. BizTalk Server provides default values that have been proven through testing to effectively protect a system from problems like backlog overages. However, for some scenarios, this may be too aggressive. The following examples illustrate this point.

Example 1: Peak Loads and Database Size

Each solution built on BizTalk Server has a maximum sustainable throughput (MST). As long as load stays below this level, the system can sustain that load indefinitely, by definition. In practice, however, it is more common to have peaks and valleys in the load profile than it is to have a steady load that doesn’t vary over time.

Rather than build a system that is capable of sustaining the highest peak loads indefinitely, it is more cost effective to build a system that can handle some backlog under peak load, and recover during the valleys. However, if the backlog expected during the peak loads is higher than the default throttling value for database size, then the system will block the backlog by throttling the input. If this is not desirable, for example, because you need all of the input files to be consumed as quickly as possible, the solution is to raise the database size threshold to accept the expected backlog before throttling.

Example 2: Memory Usage Optimization

Another resource that throttling uses to gauge processing speed is how much memory is available to host processes. If the available memory gets too small compared to the threshold, throttling will slow down the number of messages the engine retrieves from the host queues to be worked on. Given the variability in the amount and availability of memory on today’s enterprise class servers, especially with the advent of x64 support in BizTalk Server, the threshold may need to be raised or lowered to optimize memory usage.


Throttling in BizTalk Server is configured by default to provide good protection for the system. The default settings should not, however, be taken for granted as optimal. Monitor the performance counters for throttling states to see if throttling is taking place, then gauge for yourself if the resource on which throttling is based (for example, database size or memory usage) is under or overused, and then adjust the throttling thresholds up or down accordingly.

Host throttling configuration parameters are set on a per host basis in the BizTalk Server Administration console. Note that the throttling configuration parameters that are set for the host apply to any or all receive handlers, send handlers, or orchestrations that are housed in the corresponding host instances. If you want to set throttling parameters that will apply only to a specific receive handler, send handler, or orchestration then you should do the following:

  • Create a new host and set the throttling parameters appropriately.

  • Configure the receive handler, send handler, or orchestration to run in this host.

  • Create one or more instances of this host to run on your BizTalk server(s).