BizTalk Server 2010 Beta: Settings Dashboard and Latency control per host

Posted: May 21, 2010  |  Categories: BizTalk Uncategorized
Tags:

clip_image001 

This is the second in a series of posts on the new features included in BizTalk Server 2010 Beta. Not only is the BizTalk Server Administration Console much more responsive, but Microsoft have created a settings dashboard where all the tuning and throttling settings for the BizTalk group, hosts, and host instances are available in one window.

All (or at least most of) the performance settings were moved from the registry to the management database. Then the performance settings that used to be configured in the registry, in the management database, or in the BizTalk configuration file (BTSNtsvc.exe.config or BTSNtsvc64.exe.config) is now available in one single place: the settings dashboard.

There are a few ways to get to the settings dashboard from the BizTalk Server Administration Console:

1.       Right click on the “BizTalk Group” and select “Settings…” to open it up with the “Group” tab selected:

clip_image002

2.       Right click on “Hosts” or select a host and select “Settings…” to bring it up with the “Hosts” tab selected:

clip_image003clip_image004

3.       Right click on “Host Instances” or select an in-process host and select “Settings…” to bring it up with the “Host Instances” tab selected:

 

clip_image005

clip_image006

The Settings Dashboard is split into three tabs: Group, Hosts, and Host Instances. All the settings have a tooltip with further explanation, and any setting you change will cause a small question mark icon to appear next to it to alert you that the setting has been changed from the default. The tooltip and the changed icon are marked in red on this image:

clip_image008

The settings on the “Group” tab are pretty straight forward and will allow you to configure settings that will affect the whole BizTalk Server group like the large message size threshold, or if global tracking is enabled:

clip_image010

The host tab lets you control the individual BizTalk Server Hosts, separated into four tabs.

The General tab contains the usual Host properties like if the host should perform data tracking, if is trusted authenticated, if its instances should run as a 32-bit or 64-bit process, and some settings that were “hidden” in the registry before like turning white spaces preservation on and off:

clip_image012

The Resource-Based Throttling controls the throttling of the host are a resource level (CPU, Memory, database):

clip_image014

The Rate-Based Throttling tab controls the throttling of the host at a publish-subscribe level (message delivery and message publishing from and to the message box database):

clip_image016

And the Orchestration-Based Throttling tab controls the throttling of the dehydration behavior or Orchestrations:

clip_image018

Many settings on the host and host instance tabs are advanced settings that are worth a full blog post. They have been previously discussed on other blog posts, on the Microsoft BizTalk Server 2009 Performance Optimization Guide by the BizTalk Customer Advisory Team, and on other BizTalk Server whitepapers. There is one pretty important change though: the configuration of orchestration and messaging polling interval is now available at the Hosts level. This is usually one of the main performance settings to improve low latency in BizTalk Server. Companies can now choose the right latency level of their solutions for each host:

 

clip_image020

 

I’d like to demonstrate this as well as another great feature which is the ability to export the current configuration and import it to a destination environment.

For this I created a new host called BizTalkServerHighPriorityHost and a host instance for it on my environment:

clip_image021

Initially the host and host instance are created with the default configurations. Without changing anything I can then click the “Export…” button to export the configuration to an XML file:

clip_image023 

I get to choose an XML file name for the export. What you get is pretty much an XML representation of the fields on the three tabs in the dashboard, separated by GroupSettings, HostSettings, and HostIntanceSettings:

<?xml version="1.0" encoding="utf-8"?>
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ExportedGroup>THIAGOWIN7-PC:BIZTALKMGMTDB</ExportedGroup>
  <GroupSettings>
    <Setting Name="ConfigurationCacheRefreshInterval">60</Setting>
    <Setting Name="GlobalTrackingOption">1</Setting>
    <Setting Name="LMSFragmentSize">102400</Setting>
    <Setting Name="LMSThreshold">1000000</Setting>
    <Setting Name="PerfCounterCacheRefreshInterval">60</Setting>
  </GroupSettings>
  <HostSettings>
    <Host Name="BizTalkServerApplication">
      <Setting Name="AllowMultipleResponses">False</Setting>
      <Setting Name="AuthTrusted">False</Setting>
      <Setting Name="DBQueueSizeThreshold">50000</Setting>
      <Setting Name="DBSessionThreshold">0</Setting>
      <Setting Name="DehydrationBehavior">2</Setting>
      <Setting Name="DeliveryQueueSize">100</Setting>
      <Setting Name="GlobalMemoryThreshold">0</Setting>
      <Setting Name="HostTracking">True</Setting>
      <Setting Name="InflightMessageThreshold">1000</Setting>
      <Setting Name="IsHost32BitOnly">True</Setting>
      <Setting Name="LegacyWhitespace">False</Setting>
      <Setting Name="MessageDeliveryMaximumDelay">300000</Setting>
      <Setting Name="MessageDeliveryOverdriveFactor">125</Setting>
      <Setting Name="MessageDeliverySampleSpaceSize">100</Setting>
      <Setting Name="MessageDeliverySampleSpaceWindow">15000</Setting>
      <Setting Name="MessagePublishMaximumDelay">300000</Setting>
      <Setting Name="MessagePublishOverdriveFactor">125</Setting>
      <Setting Name="MessagePublishSampleSpaceSize">100</Setting>
      <Setting Name="MessagePublishSampleSpaceWindow">15000</Setting>
      <Setting Name="MessagingMaxReceiveInterval">500</Setting>
      <Setting Name="MessagingReqRespTTL">20</Setting>
      <Setting Name="MsgAgentPerfCounterServiceClassID">0</Setting>
      <Setting Name="ProcessMemoryThreshold">25</Setting>
      <Setting Name="SubscriptionPauseAt">0</Setting>
      <Setting Name="SubscriptionResumeAt">0</Setting>
      <Setting Name="ThreadPoolSize">20</Setting>
      <Setting Name="ThreadThreshold">0</Setting>
      <Setting Name="ThrottlingBatchMemoryThresholdPercent">1</Setting>
      <Setting Name="ThrottlingDeliveryOverride">0</Setting>
      <Setting Name="ThrottlingDeliveryOverrideSeverity">100</Setting>
      <Setting Name="ThrottlingLimitToTriggerGC">80</Setting>
      <Setting Name="ThrottlingPublishOverride">0</Setting>
      <Setting Name="ThrottlingPublishOverrideSeverity">100</Setting>
      <Setting Name="ThrottlingSeverityDatabaseSize">1</Setting>
      <Setting Name="ThrottlingSeverityInflightMessage">75</Setting>
      <Setting Name="ThrottlingSeverityProcessMemory">500</Setting>
      <Setting Name="ThrottlingSpoolMultiplier">10</Setting>
      <Setting Name="ThrottlingTrackingDataMultiplier">10</Setting>
      <Setting Name="TimeBasedMaxThreshold">1800</Setting>
      <Setting Name="TimeBasedMinThreshold">1</Setting>
      <Setting Name="UseDefaultAppDomainForIsolatedAdapter">False</Setting>
      <Setting Name="XlangMaxReceiveInterval">500</Setting>
    </Host>
    <Host Name="BizTalkServerHighPriorityHost">
      <Setting Name="AllowMultipleResponses">False</Setting>
      <Setting Name="AuthTrusted">False</Setting>
      <Setting Name="DBQueueSizeThreshold">50000</Setting>
      <Setting Name="DBSessionThreshold">0</Setting>
      <Setting Name="DehydrationBehavior">2</Setting>
      <Setting Name="DeliveryQueueSize">100</Setting>
      <Setting Name="GlobalMemoryThreshold">0</Setting>
      <Setting Name="HostTracking">False</Setting>
      <Setting Name="InflightMessageThreshold">1000</Setting>
      <Setting Name="IsHost32BitOnly">True</Setting>
      <Setting Name="LegacyWhitespace">False</Setting>
      <Setting Name="MessageDeliveryMaximumDelay">300000</Setting>
      <Setting Name="MessageDeliveryOverdriveFactor">125</Setting>
      <Setting Name="MessageDeliverySampleSpaceSize">100</Setting>
      <Setting Name="MessageDeliverySampleSpaceWindow">15000</Setting>
      <Setting Name="MessagePublishMaximumDelay">300000</Setting>
      <Setting Name="MessagePublishOverdriveFactor">125</Setting>
      <Setting Name="MessagePublishSampleSpaceSize">100</Setting>
      <Setting Name="MessagePublishSampleSpaceWindow">15000</Setting>
      <Setting Name="MessagingMaxReceiveInterval">500</Setting>
      <Setting Name="MessagingReqRespTTL">20</Setting>
      <Setting Name="MsgAgentPerfCounterServiceClassID">0</Setting>
      <Setting Name="ProcessMemoryThreshold">25</Setting>
      <Setting Name="SubscriptionPauseAt">0</Setting>
      <Setting Name="SubscriptionResumeAt">0</Setting>
      <Setting Name="ThreadPoolSize">20</Setting>
      <Setting Name="ThreadThreshold">0</Setting>
      <Setting Name="ThrottlingBatchMemoryThresholdPercent">1</Setting>
      <Setting Name="ThrottlingDeliveryOverride">0</Setting>
      <Setting Name="ThrottlingDeliveryOverrideSeverity">100</Setting>
      <Setting Name="ThrottlingLimitToTriggerGC">80</Setting>
      <Setting Name="ThrottlingPublishOverride">0</Setting>
      <Setting Name="ThrottlingPublishOverrideSeverity">100</Setting>
      <Setting Name="ThrottlingSeverityDatabaseSize">1</Setting>
      <Setting Name="ThrottlingSeverityInflightMessage">75</Setting>
      <Setting Name="ThrottlingSeverityProcessMemory">500</Setting>
      <Setting Name="ThrottlingSpoolMultiplier">10</Setting>
      <Setting Name="ThrottlingTrackingDataMultiplier">10</Setting>
      <Setting Name="TimeBasedMaxThreshold">1800</Setting>
      <Setting Name="TimeBasedMinThreshold">1</Setting>
      <Setting Name="UseDefaultAppDomainForIsolatedAdapter">False</Setting>
      <Setting Name="XlangMaxReceiveInterval">500</Setting>
    </Host>
    <Host Name="BizTalkServerIsolatedHost">
      <Setting Name="AllowMultipleResponses">False</Setting>
      <Setting Name="AuthTrusted">False</Setting>
      <Setting Name="DBQueueSizeThreshold">50000</Setting>
      <Setting Name="DBSessionThreshold">0</Setting>
      <Setting Name="DehydrationBehavior">2</Setting>
      <Setting Name="DeliveryQueueSize">100</Setting>
      <Setting Name="GlobalMemoryThreshold">0</Setting>
      <Setting Name="HostTracking">False</Setting>
      <Setting Name="InflightMessageThreshold">1000</Setting>
      <Setting Name="IsHost32BitOnly">True</Setting>
      <Setting Name="LegacyWhitespace">False</Setting>
      <Setting Name="MessageDeliveryMaximumDelay">300000</Setting>
      <Setting Name="MessageDeliveryOverdriveFactor">125</Setting>
      <Setting Name="MessageDeliverySampleSpaceSize">100</Setting>
      <Setting Name="MessageDeliverySampleSpaceWindow">15000</Setting>
      <Setting Name="MessagePublishMaximumDelay">300000</Setting>
      <Setting Name="MessagePublishOverdriveFactor">125</Setting>
      <Setting Name="MessagePublishSampleSpaceSize">100</Setting>
      <Setting Name="MessagePublishSampleSpaceWindow">15000</Setting>
      <Setting Name="MessagingMaxReceiveInterval">500</Setting>
      <Setting Name="MessagingReqRespTTL">20</Setting>
      <Setting Name="MsgAgentPerfCounterServiceClassID">0</Setting>
      <Setting Name="ProcessMemoryThreshold">25</Setting>
      <Setting Name="SubscriptionPauseAt">0</Setting>
      <Setting Name="SubscriptionResumeAt">0</Setting>
      <Setting Name="ThreadPoolSize">20</Setting>
      <Setting Name="ThreadThreshold">0</Setting>
      <Setting Name="ThrottlingBatchMemoryThresholdPercent">1</Setting>
      <Setting Name="ThrottlingDeliveryOverride">0</Setting>
      <Setting Name="ThrottlingDeliveryOverrideSeverity">100</Setting>
      <Setting Name="ThrottlingLimitToTriggerGC">80</Setting>
      <Setting Name="ThrottlingPublishOverride">0</Setting>
      <Setting Name="ThrottlingPublishOverrideSeverity">100</Setting>
      <Setting Name="ThrottlingSeverityDatabaseSize">1</Setting>
      <Setting Name="ThrottlingSeverityInflightMessage">75</Setting>
      <Setting Name="ThrottlingSeverityProcessMemory">500</Setting>
      <Setting Name="ThrottlingSpoolMultiplier">10</Setting>
      <Setting Name="ThrottlingTrackingDataMultiplier">10</Setting>
      <Setting Name="TimeBasedMaxThreshold">1800</Setting>
      <Setting Name="TimeBasedMinThreshold">1</Setting>
      <Setting Name="UseDefaultAppDomainForIsolatedAdapter">False</Setting>
      <Setting Name="XlangMaxReceiveInterval">500</Setting>
    </Host>
  </HostSettings>
  <HostInstanceSettings>
    <Host Name="BizTalkServerIsolatedHost">
      <Server Name="ThiagoWin7-PC">
        <Setting Name="CLRMaxIOThreads">250</Setting>
        <Setting Name="CLRMaxWorkerThreads">25</Setting>
        <Setting Name="CLRMinIOThreads">25</Setting>
        <Setting Name="CLRMinWorkerThreads">5</Setting>
        <Setting Name="PhysicalMemoryMaximalUsage">85</Setting>
        <Setting Name="PhysicalMemoryOptimalUsage">70</Setting>
        <Setting Name="VirtualMemoryMaximalUsage">85</Setting>
        <Setting Name="VirtualMemoryOptimalUsage">65</Setting>
      </Server>
    </Host>
    <Host Name="BizTalkServerApplication">
      <Server Name="ThiagoWin7-PC">
        <Setting Name="CLRMaxIOThreads">250</Setting>
        <Setting Name="CLRMaxWorkerThreads">25</Setting>
        <Setting Name="CLRMinIOThreads">25</Setting>
        <Setting Name="CLRMinWorkerThreads">5</Setting>
        <Setting Name="PhysicalMemoryMaximalUsage">85</Setting>
        <Setting Name="PhysicalMemoryOptimalUsage">70</Setting>
        <Setting Name="VirtualMemoryMaximalUsage">85</Setting>
        <Setting Name="VirtualMemoryOptimalUsage">65</Setting>
      </Server>
    </Host>
    <Host Name="BizTalkServerHighPriorityHost">
      <Server Name="ThiagoWin7-PC">
        <Setting Name="CLRMaxIOThreads">250</Setting>
        <Setting Name="CLRMaxWorkerThreads">25</Setting>
        <Setting Name="CLRMinIOThreads">25</Setting>
        <Setting Name="CLRMinWorkerThreads">5</Setting>
        <Setting Name="PhysicalMemoryMaximalUsage">85</Setting>
        <Setting Name="PhysicalMemoryOptimalUsage">70</Setting>
        <Setting Name="VirtualMemoryMaximalUsage">85</Setting>
        <Setting Name="VirtualMemoryOptimalUsage">65</Setting>
      </Server>
    </Host>
  </HostInstanceSettings>
</Settings>

 

In case you are wondering this is what the schema for the file looks like, i.e., there is no defined list of settings:

clip_image024

The actual settings list for the GroupSettings, HostSettings and HostInstanceSettings when exporting and importing and validating the XML are extracted respectively from a filtered list of the properties on the WMI classes MSBTS_GroupSetting, MSBTS_HostSetting, and MSBTS_HostInstanceSetting from the \\.\root\MicrosoftBizTalkServer management scope.

Exporting and importing these settings makes it much easier for the results of performance testing and tweaking to be moved to a destination UAT or Production environment, for the configuration to be moved between environments, or to document the current performance settings of a BizTalk group.

Let’s say that I want to reconfigure my group and new high priority host with the following changes:

·         Updating the group setting large message threshold 150 (the default is 100 KB)

·         Update the BizTalkServerHighPriorityHost host for lower latency by reducing the orchestration and messaging polling intervals to 150 (the default is 500 ms)

·         Update the BizTalkServerHighPriorityHost host for message publishing and message delivery throttling to only kick in at 175% to only throttle during a serious condition

I can then just create an XML file that looks like the following, only containing the settings to be changed:

<?xml version="1.0" encoding="utf-8"?>

<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <ExportedGroup>THIAGOWIN7-PC:BIZTALKMGMTDB</ExportedGroup>

  <GroupSettings>

    <Setting Name="LMSThreshold">1500000</Setting>

  </GroupSettings>

  <HostSettings>

    <Host Name="BizTalkServerHighPriorityHost">

      <Setting Name="MessageDeliveryOverdriveFactor">175</Setting>

      <Setting Name="MessagePublishOverdriveFactor">175</Setting>

      <Setting Name="MessagingMaxReceiveInterval">150</Setting>

      <Setting Name="XlangMaxReceiveInterval">150</Setting>

    </Host>

  </HostSettings>

  <HostInstanceSettings />

</Settings>

<?xml:namespace prefix = o /> 

When you click on the “Import…” button you get a wizard that takes you through the import. The first thing to do is select the file to import and then click “Next >”:

clip_image026

Now you get to map the hosts. It will show you the hosts that exist on the destination group and let you pick which host in the configuration file should be mapped to the destination hosts:

clip_image028

Since I only had the BizTalkServerHighPriorityHost host in the configuration file that is the only host I have to choose as the “Source Host” when I click “Edit…”. In the image above I have mapped it to the destination host with the same name.

The next step is to map host instances. It will show the host instances for the hosts selected to be mapped at the “Host Mapping” step. I don’t have host instances in the configuration file so I don’t need to map to the the existing host instance and I can just click “Next >”:

clip_image030

The final step is to look at the summary and click “Import” to import the configuration (note that at the moment it doesn’t show that there are changes to be made at the group level even although the configuration file has them):

clip_image032

Once the settings are imported it will show a summary of the import:

clip_image034

Now if I look at the BizTalkServerHighPriorityHost on the Settings Dashboard I can see the changes and click Ok:

clip_image036

The settings get saved to a few tables on the BizTalk management database, namely:

  • adm_Group

  • adm_GroupSetting

  • adm_HostInstanceSetting

  • adm_HostInstance

  • adm_HostSetting

  • adm_Host

To see the change just made on the tables I can run the following two queries:

SELECT h.Name

      , hs.[PropertyName]

      , hs.[PropertyValue]

  FROM [BizTalkMgmtDb].[dbo].[adm_HostSetting] hs (nolock)

  JOIN [BizTalkMgmtDb].[dbo].[adm_Host] h (nolock) ON hs.HostId = h.Id

  where h.Name = ‘BizTalkServerHighPriorityHost’

  and ( hs.propertyname = ‘MessagingMaxReceiveInterval’ OR

            hs.propertyname = ‘XLangMaxReceiveInterval’)

 

SELECT LMSThreshold

FROM adm_Group g (nolock)

WHERE g.Name = ‘BizTalk Group’

 

Which give me the following result, as per our changes:

clip_image037

To test this I created two ‘passthrough’ solutions that are exactly the same, one for the BizTalkServerApplication host and one for the new BizTalkServerHighPriorityHost. I created one orchestration for each in order to include orchestration polling in the test:

clip_image038

I then created handlers for the WCF-NetTcp host for the HighPriorityHost. After that I created two different receive locations and ports, one for each host:

clip_image040

And configured each orchestration under their respective hosts:

clip_image042

The next step is to create a load test. I followed Paolo Salvatori’s method of load testing from Visual Studio and borrowed some of his test methods. I created two load tests, of for each host:

clip_image043clip_image044

On the run settings I set it to warm up for 2 minute and run for 10 minutes.

The results show that just these quick changes to the BizTalkServerHighPriorityHost host ensures it does not throttle and has an average of 0.49 request response latency per second on my development machine:

TestHighPriority

clip_image045

Counter

Instance

Category

Color

Range

Min

Max

Avg

Request-Response Latency (sec)

BizTalkServerHighPriorityHost

BizTalk:Messaging Latency


10

0.21

1.37

0.49

Message delivery throttling state

BizTalkServerHighPriorityHost

BizTalk:Message Agent


0

0

0

0

Message publishing throttling state

BizTalkServerHighPriorityHost

BizTalk:Message Agent


0

0

0

0

 

Comparing with the out of the box settings on the BizTalkServerApplication host the host throttles due to high process memory usage and the request response latency is around 40% slower at 0.71 seconds:

TestBizTalkApplication

clip_image046

Counter

Instance

Category

Color

Range

Min

Max

Avg

Request-Response Latency (sec)

BizTalkServerApplication

BizTalk:Messaging Latency


100

0.36

6.52

0.71

Message delivery throttling state

BizTalkServerApplication

BizTalk:Message Agent


10

0

4

0

Message publishing throttling state

BizTalkServerApplication

BizTalk:Message Agent


10

0

4

0

 

Download the sample here

 

You can also script or automate the export and import of the dashboard settings by using the command line tool BTSTask.exe:

clip_image048

And you can also configure the settings via code by accessing the following WMI classes in powershell, vbscript or .NET code:

  • MSBTS_GroupSetting for group settings

  • MSBTS_HostSetting for host settings
  • MSBTS_HostInstanceSetting for host instance settings

Notes of warning:

  • Please study and review carefully the settings that you change

  • Change the settings on a test environment first

  • Change them incrementally and load test them step by step to ensure they have the desired effect

Enjoy the new Settings Dashboard, and let me know what you think and if you find any issues by adding comments to this post.

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top