Outbound Host Throttling

Outbound host throttling, also known as message processing throttling in BizTalk Server, is applied to host instances that contain orchestrations or send adapters that receive and deliver or process messages that have been published to the MessageBox database. An outbound host throttling condition can be triggered under the following conditions:

  • The amount of memory, the number of threads, or the number of database connections used by the host instance exceeds the throttling thresholds defined on the Throttling Thresholds dialog box available from the Advanced page of the Host Properties dialog box. These values are measurable with performance monitor counters available under the BizTalk:Message Agent performance object category.

  • 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) value is defined on the Message Processing Throttling Settings dialog box available from the Advanced page of the Host Properties dialog box. The message delivery incoming and outgoing rates can be measured with the corresponding performance monitor counters under the BizTalk:Message Agent performance object category.

  • The number of messages being processed concurrently by the host instance exceeds the In-process messages per CPU * the number of CPUs available on the box. The In-process messages per CPU threshold is defined on the Throttling Thresholds dialog box available from the Advanced page of the Host Properties dialog box. The number of messages being processed concurrently by the host instance can be measured with the In-process message count performance counter under the BizTalk:Message Agent performance object category.

  • The default throttling behavior has been modified by setting a registry value or values to control the throttling behavior of a host process. For more information about the registry keys for overriding the default throttling behavior, see the topic "Registry settings that affect default throttling behavior" in "How to Modify the Default Host Throttling Settings" in BizTalk Server 2006 R2 Help at http://go.microsoft.com/fwlink/?LinkID=106731.

Depending upon the severity of the throttling condition, the following actions are taken:

  • A progressive delay in the processing logic of the host instance is implemented before delivering the messages to the outbound transport adapter or the orchestration engine for processing the messages. Both the duration of the processing logic delay and the rate at which the duration is incremented scale with the severity of the throttling condition.

  • The number of messages that can be held by the in-memory queue is limited. The in-memory queue serves as a temporary placeholder for delivering messages from the MessageBox database to the Message Agent which in turn delivers messages to XLANG and send adapters. By default, the in-memory queue is set to hold 100 messages per CPU. When the queue is full, no more messages are de-queued from the MessageBox database until the in-memory queue is freed up.

  • The size of the Message Agent thread pool is limited. By limiting the Message Agent thread pool size, the host throttling mechanism effectively reduces the amount of messages that are delivered to XLANG and adapters.

    Cc296779.note(en-US,BTS.10).gifNote
    The default Message Agent thread pool size can only be modified by changing the value for the AgentThreadPoolSize registry entry. For more information about modifying this registry entry see the "Registry settings that affect default throttling behavior" topic in "How to Modify the Default Host Throttling Settings" in BizTalk Server 2006 R2 Help at http://go.microsoft.com/fwlink/?LinkID=106731.

  • The use of memory and other resources is reduced as applicable. BizTalk Server can send instructions to other service classes to limit memory use by dehydrating running schedules, shrinking memory cache size, and by limiting the usage of memory intensive threads.

The following figured depicts outbound message flow from the MessageBox database to adapter and XLANG

Outbound message flow to Adapters and XLANG

The BizTalk Server throttling mechanism applies outbound throttling to the orchestration engine (XLANG) and to outbound adapters.

Use the Message delivery throttling state and Message delivery throttling state duration counters associated with BizTalk:MessageAgent performance object category to measure the current throttling state and duration of throttling. For more information about the available host throttling performance counters see "Host Throttling Performance Counters" in BizTalk Server 2006 R2 Help at http://go.microsoft.com/fwlink/?LinkID=106730.

Outbound throttling can cause delayed message delivery and messages may build up in the in-memory queue and cause de-queue threads to be blocked until the throttling condition is mitigated. When de-queue threads are blocked no additional messages are pulled from the MessageBox database into the in-memory queue for outbound delivery. The following table describes factors involved in outbound throttling, as well as appropriate mitigation strategies.

Message Delivery Throttling State Trigger for Throttling Condition Throttling Actions Taken Mitigation Strategy Performance Object Performance Counter

1

Message delivery incoming rate for the host instance exceeds the Message delivery outgoing rate * the specified Rate overdrive factor (percent) value

This can be caused by high processing complexity, slow outbound adapters, or a momentary shortage of system resources.

Block the delivery thread for a dynamically computed time period until the Message delivery incoming rate is at par with the Message delivery outgoing rate * the specified Rate overdrive factor (percent) value.

Use performance counters to determine the message delivery incoming and message delivery outgoing rate. Consider an appropriate over drive factor for your environment.

Verify that the values supplied for the Sampling window duration (milliseconds) and Minimum number of samples parameters are appropriate for your scenario. For more information about these parameters see "How to Modify the Default Host Throttling Settings" in BizTalk Server 2006 R2 Help at http://go.microsoft.com/fwlink/?LinkID=106731.

BizTalk:MessageAgent

Message delivery incoming rate

Message publishing outgoing rate

4

Process memory exceeds the specified threshold.

This can occur in memory intensive processing scenarios, when processing large messages, or when send adapters are attempting to process a high number of messages simultaneously.

Slow down message delivery to adapters or XLANG.

Reduce process memory consumption by dehydrating service instances and shrinking cache when applicable.

Reduce the size of the thread pools used by the EPM and/or the Message Agent.

Periodically force a .NET garbage collection (GC).

If the system is not becoming idle due to process memory based throttling, no action may be required.

If the In-process message count value is high and the CPU utilization is not excessive even when there is process memory based throttling, no additional action may be required.

If the system appears to be over-throttling, consider increasing the value associated with the Process memory usage threshold for the host and verify that the host instance does not generate an "out of memory" error. If an "out of memory" error is raised by increasing the Process memory usage threshold, then consider reducing the values for the Internal message queue size and In-process messages per CPU thresholds. This strategy is particularly relevant in large message processing scenarios.

BizTalk:MessageAgent

High process memory

Process memory usage(MB)

Process memory usage threshold (MB)

In-process message count

Active instance count

3

Number of in-process messages delivered to a service class exceeds the specified threshold.

This can be caused by high processing complexity, slow outbound adapters, or a momentary shortage of system resources.

Slow down message delivery to adapters or XLANG.

Reduce the size of the thread pool used by the Message Agent.

If over-throttling occurs, consider increasing the value associated with the In-process messages per CPU threshold.

Cc296779.note(en-US,BTS.10).gifNote
Increasing this value may adversely impact send adapter performance and/or increase the memory usage of the process.

BizTalk:MessageAgent

In-process message count

In-process message count threshold

9

Process thread count exceeds the specified threshold.

Reduce the size of the thread pools used by the EPM and/or the Message Agent

Consider adjusting the different thread pool sizes to ensure that the system does not create a large number of threads. For more information about modifying the thread pool sizes see "How to Modify the Default Host Throttling Settings" in BizTalk Server 2006 R2 Help at http://go.microsoft.com/fwlink/?LinkID=106731.

BizTalk:MessageAgent

Thread count

Thread count threshold

5

System memory exceeds a threshold.

Slow down message delivery to adapters or XLANG.

Reduce process memory consumption by dehydrating service instances and shrinking cache when applicable.

Reduce the size of the thread pools used by the EPM and/or the Message Agent.

Consider reducing load by reducing the default size of the EPM thread pool, and/or the size of adapter batches.

If the process is not consuming excessive memory, consider increasing the Physical memory usage threshold for the host. For more information about changing the Physical memory usage threshold see "How to Modify the Default Host Throttling Settings" in BizTalk Server 2006 R2 Help at http://go.microsoft.com/fwlink/?LinkID=106731.

BizTalk:MessageAgent

Physical memory usage (MB)

Show: