BT Messaging Agents Test

Most of the processing that takes place on a BizTalk server occurs within a logical entity known as a BizTalk Server host instance, which is a process running as a Windows service or an isolated host process on the BizTalk server. To manage the use of resources by a host instance process, BizTalk Server utilizes an adjustable throttling mechanism that governs the flow and processing of messages through a host instance.

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 underutilized. If available resources are underutilized then the throttling mechanism allows additional messages to be processed by a host instance. The host throttling mechanism continually monitors if available resources are being over or underutilized 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.

This test measures the efficiency of the host throttling mechanism.

Target of the test : A BizTalk Server 2010

Agent deploying the test : An internal agent

Outputs of the test : One set of results for each host instance on the BizTalk server being monitored

Configurable parameters for the test
Parameters Description

Test period

This indicates how often should the test be executed.

Host

The host for which this test is to be configured.

Port

The port at which the host listens to.

Ispassive

If this parameter is set to Yes, then it means that, by default, all BizTalk servers being monitored by the eG system are the passive servers of a BizTalk cluster. No alerts will be generated if the servers are not running. Measures will be reported as "Not applicable" by the agent if the servers are not up.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Publishing delay

 

 

Indicates the current delay imposed on each message publishing batch.

 

 

MilliSec

 

 

This measure is applicable only if the message publishing is throttled and if the message publishing batch is not exempted from throttling.

Message publishing throttling in BizTalk Server, is applied to host instances that contain receive adapters or orchestrations that publish messages to the MessageBox database. An inbound 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

  • Downstream hosts are unable to process the messages that are published.

  • The Message publishing incoming rate for the host instance exceeds the Message publishing outgoing rate * the specified Rate overdrive factor (percent) value.

  • The default throttling behavior has been modified by setting a registry value or values to control the throttling behavior of a host process.

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

  • A progressive delay in the

  • processing logic of the host instance is implemented. The delay may be implemented when an End Point Manager (EPM) thread receives a batch of messages from the transport adapter, and/or when the EPM submits a batch of messages to be published into the MessageBox database. Both the duration of the processing delay and the rate at which the duration is incremented scale with the severity of the throttling condition.

  • The number of threads that are available to the End Point Manager (EPM) is restricted. The EPM receives batches of messages from adapters and publishes the messages to the MessageBox database. By default, the EPM is configured to use 20 threads per CPU. If the host throttling mechanism detects a stress condition for inbound processing then it can temporarily reduce the number of threads available to the EPM until the stress condition is eliminated. The EPM cannot process messages from transport adapters or deliver message batches to the MessageBox database unless an EPM thread is available to service the inbound message batch.

  • 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.

Publishing incoming rate

Indicates the rate at which the messages are being sent by the message agent to the database of this host instance for publishing.

Msgs/Sec

A message publishing throttling condition is also triggered when 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) value is defined on the Message Publishing Throttling Settings dialog box available from the Advanced page of the Host Properties dialog box.

Publishing outgoing rate

Indicates the rate at which the messages are actually published by the message agent in the database of this host instance.

Msgs/Sec

Publishing throttling state

Indicates whether the system is throttling the message publishing i.e., indicates whether the XLANG message processing and inbound transports are affected.

Number

This measure indicates any one of the following values while indicating whether the system is throttling the message publishing or not.

Value State
0

Not throttling

2

Throttling due to imbalanced message publishing rate (input rate exceeds output rate)

4

Throttling due to process memory pressure

5

Throttling due to system memory pressure

6

Throttling due to database growth

8

Throttling due to high session count

9

Throttling due to high thread count

11

Throttling due to user override on publishing

 

Delivery delay

 

Indicates the current delay imposed on each message delivery batch.

MilliSec

 

This measure is applicable only if message delivery is throttled.

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. 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

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

  • 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 default throttling behavior has been modified by setting a registry value or values to control the throttling behavior of a host process.

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 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 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.

  • 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.

Delivery incoming rate

Indicates the rate at which the messages are delivered to the Orchestration engine or the Messaging engine of this host instance.

Msgs/Sec

A message processing throttling condition can also be triggered 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) value is defined on the Message Processing Throttling Settings dialog box available from the Advanced page of the Host Properties dialog box.

Delivery outgoing rate

Indicates the rate at which the messages are processed and sent to the recipients by the Orchestration engine or the Messaging engine of this host instance.

Msgs/Sec

Delivery throttling state

Indicates whether the system is throttling the message delivery i.e., indicates whether the XLANG message processing and outbound transports are affected or not.

Number

Indicates whether the system is throttling the message delivery i.e., indicates whether the XLANG message processing and outbound transports are affected or not.

Value State

0

Not throttling

1

Throttling due to imbalanced message delivery rate (input rate exceeds output rate)

3

Throttling due to high in-process message count

4

Throttling due to process memory pressure

5

Throttling due to process memory pressure

9

Throttling due to high thread count

10

Throttling due to user override on delivery

 

High database session

Indicates whether the database session is within normal limits or not for this host instance.

 

Number

This measure reports any one of the following values to indicate whether the database session is within normal limits or not.

Value State
0

Normal

1

Database session count exceeds threshold

The database session count is nothing but the number of concurrent MessageBox database connections being used. The threshold for database session count is initially set to the value specified for Database connections per CPU on the Throttling Thresholds dialog available from the Advanced page of the Host Properties dialog box. This value is auto-tuned based on the database session usage of the process. If the number of concurrent database sessions exceeds this threshold at any time, host throttling is implemented.

High database size

Indicates whether the size of the database is within normal limits or not for this host instance.

Number

This measure indicates any one of the following values while indicating whether the size of the database is within normal limits or not.

Value State
0

Normal

1

Database size has grown beyond threshold

Database size is represented by the number of messages in the database queues that a host instance has published. This value is measured by the number of items in the queue tables for all hosts and the number of items in the spool and tracking tables. If a process is publishing to multiple queues, this counter reflects the weighted average of all the queues. If the threshold set for database size is violated, then throttling is implemented.

High in-process message count

Indicates whether the In-process message count is within normal limits or not.

Number

This measure reports any one of the following values to indicate whether the In-process message count is within normal limits or not.

Value State
0

Normal

1

In-process message count exceeds limit

The in-process message count indicates the number of in-memory messages delivered to the XLANG engine or the outbound messaging engine that are not yet processed.

High message delivery rate

Indicates whether the message delivery rate is within normal limits or not.

Number

This measure reports any one of the following values to indicate whether the message delivery rate is within normal limits or not.

Value State
0

Normal

1

Message delivery rate exceeds the message processing rate

High message publishing rate

Indicates whether the message publishing rate is within normal limits or not.

Number

This measure reports any one of the following values to indicate whether the message publishing rate is within normal limits or not.

Value State
0

Normal

1

Message delivery rate exceeds the message processing rate

 

High process memory

Indicates whether the process memory is within normal limits or not.

Number

This measure reports any one of the following values to indicate whether the process memory is within normal limits or not.

Value State
0

Normal

1

Process memory exceeds threshold

Process memory consumption is the maximum of the process’s working set size and the total space allocated for the page file for the process. The threshold for process memory consumption s initially set to the value specified for Process memory usage on the Throttling Thresholds dialog available from the Advanced page of the Host Properties dialog box. If a percentage value is specified, it is computed based on the available memory to commit.

High system memory

Indicates whether the system memory is within normal limits or not.

Number

This measure reports any one of the following values to indicate whether the system memory is within normal limits or not.

Value State
0

Normal

1

System memory exceeds threshold

High thread count

Indicates whether the thread count is within normal limits or not for this host instance.

Number

This measure reports any one of the following values to indicate whether the thread count is within normal limits or not.

Value State
0

Normal

1

Thread count exceeds threshold

The thread count indicates the number of threads being used in the process. The threshold for this count is initially set to the value specified for Threads per CPU on the Throttling Thresholds dialog available from the Advanced page of the Host Properties dialog box. This value is auto-tuned depending on the thread requirements of the current process. If the number of threads in the process exceeds this threshold value at any point in time, host throttling is implemented.

Thread count

Indicates the number of thread being used in the process.

Number

 

Thread count threshold

Indicates the current threshold for the number of threads in the process.

Number

The threshold for the thread count is initially set to the value specified for Threads per CPU on the Throttling Thresholds dialog available from the Advanced page of the Host Properties dialog box. This value is auto-tuned depending on the thread requirements of the current process. If the number of threads in the process exceeds this threshold value at any point in time, host throttling is implemented.

Database size

Indicates the number of messages in the database queues that this process has published.

 

Number

This value is measured by the number of items in the queue tables for all hosts and the number of items in the spool and tracking tables. If a process is publishing to multiple queues, this counter reflects the weighted average of all the queues.

Database session

Indicates the number of concurrent message box database connections that is being used.

Number

 

Process memory usage

Indicates the memory consumption of the process.

MB

 

Process memory usage threshold

Indicates the current threshold for the memory consumption of the process.

MB

This threshold value is initially set to the value specified for the process memory consumption on the Throttling Thresholds dialog available from the Advanced page of the Host Properties dialog box. If a percentage value is specified, the threshold value is computed based on the available memory to commit.