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:
2. Right click on “Hosts” or select a host and select “Settings…” to bring it up with the “Hosts” tab selected:
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:
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:
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:
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:
The Resource-Based Throttling controls the throttling of the host are a resource level (CPU, Memory, database):
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):
And the Orchestration-Based Throttling tab controls the throttling of the dehydration behavior or Orchestrations:
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:
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:
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:
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:
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 >”:
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:
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 >”:
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):
Once the settings are imported it will show a summary of the import:
Now if I look at the BizTalkServerHighPriorityHost on the Settings Dashboard I can see the changes and click Ok:
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:
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:
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:
And configured each orchestration under their respective hosts:
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:
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
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
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
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
You can also script or automate the export and import of the dashboard settings by using the command line tool BTSTask.exe:
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.
Great Work Thiago.