다음을 통해 공유


Load Testing BizTalk Server Solutions with Visual Studio 2010

Introduction

Computer application servers such as BizTalk Server are designed to perform particular tasks on behalf of users. These tasks are initiated as client requests sent to the application server as messages that conform to a standard that the application server understands, via a protocol that the application server understands. For example, clients may initiate processing of email by sending internet e-mail messages to an email server via the SMTP protocol. Likewise, web servers process client HTML or ASP requests, database servers process client SQL requests and BizTalk Server can process client messages formatted in compliance with multiple industry message standards using numerous industry standard protocols. The workload capacity of an application server is typically measured by the number of messages that the application server can process in a given time period. The workload capacity of BizTalk Server is likewise measured as the average number of “documents received per second”, “documents processed per second” and/or “orchestrations completed per second” over an extended period of time, such as a busy workday or even a work week. Visual Studio 2010 load test functionality can simulate a load profile of up to hundreds of users simultaneously accessing a server application. This load testing functionality provides real time metrics for selected key performance indicators as well as the ability to store these metrics in a database for future analysis. This document describes the use of Visual Studio Test projects for the purpose of load testing a BizTalk Server application, including how to create unit tests, how to create load tests and how to configure load tests to capture performance counter data required to determine the Maximum Sustainable Throughput (MST) of a BizTalk Server application.

Creating a Visual Studio Unit Test to Submit Documents to BizTalk Server

A Visual Studio Unit test references the Microsoft.VisualStudio.TestTools.UnitTesting (http://go.microsoft.com/fwlink/?LinkID=132293) namespace which supplies several classes that provide support for unit testing. Of particular importance, the UnitTesting (http://go.microsoft.com/fwlink/?LinkID=132293) namespace includes the Microsoft.VisualStudio.TestTools.UnitTesting.TestContext (http://go.microsoft.com/fwlink/?LinkID=208233) class to store information provided to Unit tests and the Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute (http://go.microsoft.com/fwlink/?InkID=208235) class is used to define Test methods. For purposes of load testing BizTalk Server, Test methods should specify the message to be loaded and the endpoint/URL to which the message should be sent. The endpoint/URL will then serve as the message entry point into BizTalk Server when a corresponding BizTalk receive location is created.

For purposes of illustration, the sample code in this topic describes Test methods which utilize the System.ServiceModel.ChannelFactory(TChannel) (http://go.microsoft.com/fwlink/?LinkID=208238) class to send messages to WCF net.tcp service endpoints and are monitored by the BizTalk WCF-Custom receive adapter. Service endpoints for test messages are defined in the Application Configuration (app.config) file of the Test project.

For more information about Visual Studio Unit Tests see Anatomy of a Unit Test (http://go.microsoft.com/fwlink/?LinkID=208232).

Follow the steps in the sections below to create a Test project with a Unit Test to submit documents to one or more BizTalk Server computers. These steps were completed using Visual Studio 2010 Ultimate Edition.

Set Visual Studio 2010 Test Project Options

  1. Click Start, point to All Programs, point to Microsoft Visual Studio 2010 and then click Microsoft Visual Studio 2010 to launch Visual Studio 2010 Ultimate edition.

  2. In Visual Studio 2010, click Tools and then click Options to display the Options dialog box.

  3. Click to expand Test Tools and then click Test Project to display options for the creation of new test projects.

  4. Set the Default test project language: to Visual C# test project.

  5. Under the option to Select the files that will be added to each new test project, by default: select Visual C# test project, and uncheck all of the test types for Visual C# test projects except for Unit Test.

  6. Click OK to close the Options dialog box.

Create a new Visual Studio 2010 Solution with a Test Project

  1. Create the folder C:\Projects on the Visual Studio 2010 Ultimate computer.

  2. In Visual Studio 2010 click File, point to New, and click Project to display the New Project dialog box.

  3. Under Installed Templates click to expand Visual C#, and click Test.

  4. At the bottom of the New Project dialog box specify the following options:

    • Name: BTSLoad

    • Location: C:\Projects\

    • Solution name: LoadTest

  5. Ensure that the option to Create directory for solution is checked and click OK.

  6. Add a folder to the BTSLoad project; this folder will contain test messages to be submitted to BizTalk Server. In Solution Explorer, right-click the BTSLoad project, point to Add, and click New Folder. A folder icon with the highlighted text NewFolder1 will appear under the BTSLoad project, type TestMessages to change the highlighted text and press the Enter key to create the folder C:\Projects\LoadTest\BTSLoad\TestMessages.

Update the Code in the Test Project and add an Application Configuration File to the Test Project

  1. In Solution Explorer click to select UnitTest1.cs and replace the existing code with the following sample code listing:

    #region Using Directives
    using System;
    using System.IO;
    using System.Diagnostics;
    using System.Text;
    using System.Configuration;
    using System.Collections.Generic;
    using System.Linq;
    using System.Xml;
    using System.ServiceModel;
    using System.ServiceModel.Channels;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    #endregion
     
    namespace Microsoft.BizTalk.Samples
    {
      [TestClass]
      public class  BTSLoadTest
      {
        #region Constants
        private const  int MaxBufferSize = 2097152;
        private const  string Source = "BTS Load Test";
        private const  string Star = "*";
        private const  string TestMessageFolderParameter = "testMessageFolder";
        private const  string TestMessageFolderDefault = @"C:\Projects\LoadTest\BTSLoad\TestMessages";
        private const  string TestMessageFolderFormat = @"Test Message Folder = {0}";
        private const  string TestXmlDocument = "testxmldocument.xml";
        #endregion
     
        #region Private Instance Fields
        private TestContext testContextInstance;
        #endregion
     
        #region Private ThreadStatic Fields
        [ThreadStatic]
        private static  ChannelFactory<IRequestChannel> channelFactory;
        [ThreadStatic]
        private static  IRequestChannel channel = null;
        [ThreadStatic]
        private static  byte[] buffer = null;
        #endregion
     
        #region Private Static Fields
        private static  string testMessageFolder = null;
        #endregion
     
        #region Public Instance Constructor
        public BTSLoadTest()
        {
        }
        #endregion
     
        #region Public Static Constructor
        static BTSLoadTest()
        {
          try
          {
            testMessageFolder = ConfigurationManager.AppSettings[TestMessageFolderParameter];
            if (string.IsNullOrEmpty(testMessageFolder))
            {
              testMessageFolder = TestMessageFolderDefault;
            }
          }
          catch (Exception ex)
          {
            Trace.WriteLine(ex.Message);
            EventLog.WriteEntry(Source, ex.Message, EventLogEntryType.Error);
          }
        }
        #endregion
     
        #region Public Properties
        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
          get
          {
            return testContextInstance;
          }
          set
          {
            testContextInstance = value;
          }
        }
        #endregion
     
        #region Test Methods
     
        [TestMethod]
        public void  BTSMessaging()
        {
          InvokeBizTalkReceiveLocation("BTSMessagingEP",
                 testMessageFolder,
                 TestXmlDocument,
                 MessageVersion.Default,
                 SessionMode.Allowed);
        }
     
        [TestMethod]
        public void  BTSMessaging2()
        {
          InvokeBizTalkReceiveLocation("BTSMessagingEP2",
                 testMessageFolder,
                 TestXmlDocument,
                 MessageVersion.Default,
                 SessionMode.Allowed);
        }
     
        [TestMethod]
        public void  BTSOrchestration()
        {
          InvokeBizTalkReceiveLocation("BTSOrchestrationEP",
                 testMessageFolder,
                 TestXmlDocument,
                 MessageVersion.Default,
                 SessionMode.Allowed);
        }
        #endregion
     
        #region Helper Methods
        public void  InvokeBizTalkReceiveLocation(string endpointConfigurationName,
                 string requestMessageFolder,
                 string requestMessageName,
                 MessageVersion messageVersion,
                 SessionMode sessionMode)
        {
          XmlTextReader xmlTextReader = null;
          Message requestMessage = null;
          Message responseMessage = null;
     
          try
          {
            if (channel == null || channel.State != CommunicationState.Opened)
            {
              channelFactory = new  ChannelFactory<IRequestChannel>(endpointConfigurationName);
              channelFactory.Endpoint.Contract.SessionMode = sessionMode;
              channel = channelFactory.CreateChannel();
            }
            if (buffer == null)
            {
              string path = Path.Combine(requestMessageFolder, requestMessageName);
     
              string message;
              using (StreamReader reader = new StreamReader(File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)))
              {
                message = reader.ReadToEnd();
              }
              buffer = Encoding.UTF8.GetBytes(message);
            }
            MemoryStream stream = new  MemoryStream(buffer);
            xmlTextReader = new  XmlTextReader(stream);
            requestMessage = Message.CreateMessage(messageVersion, Star, xmlTextReader);
            TestContext.BeginTimer(requestMessageName);
            responseMessage = channel.Request(requestMessage);
          }
          catch (FaultException ex)
          {
            HandleException(ex);
            throw;
          }
          catch (CommunicationException ex)
          {
            HandleException(ex);
            throw;
          }
          catch (TimeoutException ex)
          {
            HandleException(ex);
            throw;
          }
          catch (Exception ex)
          {
            HandleException(ex);
            throw;
          }
          finally
          {
            TestContext.EndTimer(requestMessageName);
            CloseObjects(xmlTextReader,
                requestMessage,
                responseMessage);
          }
        }
     
        private void  HandleException(Exception ex)
        {
          try
          {
            Trace.WriteLine(ex.Message);
            EventLog.WriteEntry(Source, ex.Message, EventLogEntryType.Error);
          }
          catch (Exception)
          {
          }
        }
     
        private void  CloseObjects(XmlTextReader xmlTextReader,
                Message requestMessage,
                Message responseMessage)
        {
          try
          {
            if (xmlTextReader != null)
            {
              xmlTextReader.Close();
            }
            if (requestMessage != null)
            {
              requestMessage.Close();
            }
            if (responseMessage != null)
            {
              responseMessage.Close();
            }
          }
          catch (Exception)
          {
          }
        }
     
        #endregion
      }
    }
    
  2. Add an Application Configuration file to the Test project:

    1. In Solution Explorer, right-click the BTSLoad project, point to Add and click New item to display the Add New Item dialog box.

    2. In the Add New Item dialog box, under Installed Templates, click General.

    3. In the list of items that are displayed click to select Application Configuration File and then click Add.

    4. In Solution Explorer select the app.config file and replace the contents of the app.config file with the sample code listing below:

      Important

      For each client endpoint defined in this file, BizTalk Server Computer is a placeholder for the actual name of the BizTalk Server computer(s) that you will perform load testing against.

      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
        <system.serviceModel>
          <!-- Bindings used by client endpoints -->
          <bindings>
            <netTcpBinding>
              <binding name="netTcpBinding" closeTimeout="01:10:00" openTimeout="01:10:00" receiveTimeout="01:10:00" sendTimeout="01:10:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="100" maxBufferPoolSize="1048576" maxBufferSize="10485760" maxConnections="400" maxReceivedMessageSize="10485760">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
                <security mode="None">
                  <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                  <message clientCredentialType="Windows" />
                </security>
              </binding>
            </netTcpBinding>
          </bindings>
          <client>
            <!-- Client endpoints used to exchange messages with WCF Receive Locations -->
        
            <!-- BTSMessagingEP -->
            <endpoint address="net.tcp://BizTalk Server Computer:8123/btsloadtest" binding="netTcpBinding" bindingConfiguration="netTcpBinding" contract="System.ServiceModel.Channels.IRequestChannel" name="BTSMessagingEP" />
            <endpoint address="net.tcp://BizTalk Server Computer:8123/btsloadtest" binding="netTcpBinding" bindingConfiguration="netTcpBinding" contract="System.ServiceModel.Channels.IRequestChannel" name="BTSMessagingEP2" />
        
            <!-- BTSOrchestrationEP -->
            <endpoint address="net.tcp://BizTalk Server Computer:8122/btsloadtest" binding="netTcpBinding" bindingConfiguration="netTcpBinding" contract="System.ServiceModel.Channels.IRequestChannel" name="BTSOrchestrationEP" />
          </client>
        </system.serviceModel>
        <appSettings>
          <!-- Folder containing test messages -->
          <add key="testMessageFolder" value="C:\Projects\LoadTest\BTSLoad\TestMessages" />
          <add key="ClientSettingsProvider.ServiceUri" value="" />
        </appSettings>
      </configuration>
      
    5. Click the File menu in Visual Studio 2010 and then click Save All.

Add a Test Message to the Project

For purposes of this example, BizTalk Server receive location(s) and send port(s) will be configured to use pass through pipelines and will not perform any document validation. Follow these steps to add a test message to the project:

  1. Click Start, click Run and type Notepad in the Run dialog box to launch Notepad.

  2. Copy the following text into Notepad and save as “C:\Projects\LoadTest\BTSLoad\TestMessages\TestXmlDocument.xml”

    <BTSLoadTest xmlns="http://Microsoft.BizTalk.Samples.BTSLoadTest"><MessageText> This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. This is sample message text. </MessageText></BTSLoadTest>
    
  3. Close Notepad.

Important

This file will need to be saved to the same path using the same file name on every Load Test Agent computer if multiple Load Test Agent computers are used for load testing.

Add Necessary References to the Project and Build the Test Project

  1. In Solution Explorer, Right-click the References folder for the BTSLoad project and click Add Reference to display the Add Reference dialog box.

  2. Click the .NET tab of the Add Reference dialog box and use the Ctrl+Click keyboard/mouse combination to simultaneously select the following .NET namespaces:

    • System.Configuration

    • System.Runtime.Serialization

    • System.ServiceModel.Channels

    • System.ServiceModel

    • System.Web.Extensions

    • System.Xml

  3. After selecting the namespaces click OK to add these assemblies as references to the BTSLoad Test project.

  4. Right click on the BTSLoad project and click Build to compile the project into the BTSLoad assembly.

Configure Load Test Controller and Agent Computers

Visual Studio 2010 Ultimate edition can generate load simulating up to 250 virtual users on a local load test run. To simulate more than 250 virtual users and/or to initiate testing from a remote computer requires Visual Studio Load Test Virtual User Pack 2010. All load testing performed for this guide was initiated from two computers, one computer running as both a Load Test Controller and a Load Test Agent and another computer running as a Load Test Agent only. Test results were stored in a remote load test results repository in a SQL Server 2008 R2 database.

For more information about using test controllers and test agents to distribute load tests across multiple test machines, see Distributing Load Tests Across Multiple Test Machines Using Test Controllers and Test Agents (http://go.microsoft.com/fwlink/?LinkId=208406).

Install and Configure the Load Test Controller and Load Test Agents

To install and configure the load test controller and load test agents, see the following sections in the topic Installing and Configuring Visual Studio Agents and Test and Build Controllers (http://go.microsoft.com/fwlink/?LinkId=208455):

Create a Load Test to Perform Multiple Unit Tests Simultaneously

A load test runs instances of one or more unit tests simultaneously so that you can measure your application's performance and ability to handle load. The primary components of a Visual Studio 2010 load test include:

  • Scenarios – The section of a load test where you configure the test load pattern, test mix model, test mix, network mix and Web browser mix. Scenarios accommodate the complexity of simulating complex real world work load profiles. For a comprehensive listing of all load test scenario properties see Load Test Scenario Properties (http://go.microsoft.com/fwlink/?LinkId=208327).

  • Counter Sets – The section of a load test where you create particular groupings or “Sets” of performance counters to be collected while the load test is running. Several predefined counter sets are provided by default and custom counter sets can be added. For example to evaluate Network performance you can create a custom counter set, add the relevant Network performance counters and save it to the list of available counter sets. For more information about creating and saving counter sets for load tests see Specifying the Counter Sets for Computers in a Load Test (http://go.microsoft.com/fwlink/?LinkId=208328).

  • Run Settings – Run settings define multiple aspects of a load test, including the test duration, the counter sets that are associated with various computers for the load test, various test validation options, and options for storing test results. You can create and store multiple run settings for each load test, and then select a particular setting to use when you run the test. An initial run setting is added to your load test when you create your load test with the New Load Test Wizard. For a comprehensive listing of all load test run setting properties see Load Test Run Setting Properties (http://go.microsoft.com/fwlink/?LinkId=208329).

Load tests are created using the New Load Test Wizard, edited with the Load Test Editor, and analyzed in the Load Test Analyzer. All of these tools are provided with Microsoft Visual Studio Ultimate edition. For more information about creating and editing load tests in Visual Studio 2010 Ultimate edition see Creating and Editing Load Tests (http://go.microsoft.com/fwlink/?LinkId=208308).

Follow the steps in the sections below to add a load test to the test project described in Create a Unit Test to Submit Documents to BizTalk Server. These steps also describe how to configure the Scenarios, Counter Sets and Run Settings for a load test.

Add a Load Test and Configure the Load Test Scenario, Counter Sets, and Run Settings

This section describes how to use the New Load Test Wizard to add a load test to a test project and how to configure the load test to meet specific needs.

Use the New Load Test Wizard to Add a Load Test to the Test Project

Follow these steps to add a load test to a test project with the New Load Test Wizard.

  1. Open the Load Test solution in Visual Studio 2010 if it is not already open.

  2. Add a folder to the BTSLoad project; this folder will contain any load tests that are created and added to this project. In Solution Explorer, right-click the BTSLoad project, point to Add, and click New Folder. A folder icon with the highlighted text NewFolder1 will appear under the BTSLoad project, type LoadTests to change the highlighted text and press the ENTER key to create the folder "C:\Projects\LoadTest\BTSLoad\LoadTests".

  3. In Solution Explorer, right-click on the BTSLoad project, point to Add, and then click Load Test to start the New Load Test Wizard.

  4. Click Next to display the Edit Settings for a Load Test Scenario page.

  5. On the Edit Settings for a Load Test Scenario page under Enter a name for the load test scenario: type BTS_Messaging_Step. Under Think time profile select Do not use think times and then click Next to display the Edit load pattern settings for a load test scenario page.

  6. On the Edit load pattern settings for a load test scenario page select Step load: and enter the following values:

    • Start user count: 30 users

    • Step duration: 60 seconds

    • Step user count: 10 users

    • Maximum user count 80 users

     Note

    When applying settings for a step load pattern you should calculate the time required for all step increments to complete. For example, using the load pattern settings specified above the load test will need 5 minutes to complete all of the 60 second step increments when ramping up from 30 to 80 users. On the last page of the New Load Test Wizard you are presented with options for specifying the length of the load test, one of which will be Load Test Duration. If you have already calculated the time required for all step increments to complete then it is a straightforward task to enter the value (5 minutes in this case) for Load Test Duration.

    Click Next to display the Select a test mix model for the load test page.

  7. On the Select a test mix model for the load test page select Based on the number of virtual users and click Next to display the Add tests to the load test scenario and edit the test mix page.

  8. On the Add tests to the load test scenario and edit the test mix page click the Add button to display the Add Tests dialog box.

  9. Under Available tests: double-click BTSMessaging and BTSMessaging2 to add these unit tests to the list of Selected tests. Click OK and then click Next to display the Add network types to a load test scenario and edit the network mix page.

  10. On the Add network types to a load test scenario and edit the network mix page verify that Network Type is set to LAN with a Distribution of 100% and click Next to display the Specify computers to monitor with counter sets during load test run page.

  11. On the Specify computers to monitor with counter sets during load test run page click Next to display the Review and edit run settings for a load test page.

     Note

    Do not add computers to the load test at this time. The New Load Test Wizard will only allow you to associate computers with predefined counter sets, and this load test (as well as most load tests) requires the use of both predefined and custom counter sets. After the wizard is complete and the load test is saved you can edit the load test to include custom counter sets and monitor computers using both predefined and custom counter sets.

    On the Review and edit run settings for a load test page select Load test duration and enter the following values:

    1. Warm-up duration (hh mm ss): 30 seconds

    2. Run duration (hh mm ss): 5 minutes

       Note

      The time allocated for Run duration should equal the amount of time required for all step increments to complete as described in step 6 above, or 5 minutes for this example.

    3. Sampling rate: 5 seconds

    4. Description (optional), enter a description for the load test here.

    5. Save Log on Test Failure: True

    6. Validation level: Low – invoke validation rules marked as low.

  12. Click Finish to close the New Load Test Wizard.

  13. Click the File menu and select Save <Load Test Name>.loadtest As… to display the Save File As dialog box.

     Note

    In this example, <Load Test Name> will be the name assigned to the load test file by Visual Studio 2010, typically loadtestx.loadtest, unless the name of the file has already been manually changed.

  14. Save the file to the C:\Projects\LoadTest\BTSLoad\LoadTests directory created earlier. It may be useful to save the file with the name used for the scenario; in this example the scenario name is BTS_Messaging_Step so the loadtest file would be saved as C:\Projects\LoadTest\BTSLoad\LoadTests \BTS_Messaging_Step.loadtest.

Add a Custom Counter Set to Measure BizTalk Server Key Performance Indicators (KPI)

Follow these steps to add a counter set with performance counters that measure BizTalk Server KPI required for determining Maximum Sustainable Throughput (MST) of the BizTalk Server application:

  1. In Solution Explorer double-click the load test that you created in the previous section to view the load test in Load Test editor.

  2. In Load Test editor, click to expand Counter Sets. Notice that there is no predefined counter set for BizTalk Server, therefore a custom “BizTalk Server” counter set must be added to the list of counter sets.

  3. Right-click Counter Sets and select Add Custom Counter Set. By default, this action will create a custom counter set with the name Custom1.

  4. Right-click the Custom1 counter set and select Properties to set focus to the Properties dialog for the Custom1 counter set.

  5. Double-click the name Custom1 in the Properties dialog, type BizTalk and then press the ENTER key to rename the custom counter set to BizTalk.

  6. In Load Test Editor, right-click the BizTalk counter set and select Add Counters to display the Pick Performance Counters dialog box.

  7. Under Computer, type the name of one of the BizTalk Server computers in the BizTalk Server group to display performance monitor categories that include BizTalk Server performance counters.

     Important

    To ensure that all BizTalk Server performance categories and performance counters are listed, you may need to type in the fully qualified domain name (or IP Address) of a BizTalk Server in the group and you may also need to start the instances of the following hosts on the BizTalk Server computer:

    • Instances of BizTalk hosts bound to orchestrations that will run during the load test.

    • Instances of BizTalk hosts configured as send or receive handlers for adapters that will run during the load test.

  8. BizTalk Server provides an extensive set of performance counters. For purposes of determining the Maximum Sustainable Performance (MST) of a BizTalk Server application you only need to add the following BizTalk Server performance counters to the BizTalk custom counter set:

Performance Category Performance Counter
Processor % Processor Time for the _Total counter instance.
BizTalk:Message Box: General Counters

Spool Size for the <BizTalk MessageBox database name>:<SQL Server instance name> counter instance.

 Note

<BizTalk MessageBox database name> and <SQL Server instance name> are just placeholders for the actual names of the BizTalk MessageBox database and the SQL Server instance that houses the BizTalk MessageBox database. These placeholders should be replaced with the actual names of the BizTalk MessageBox database and associated SQL Server instance.

BizTalk:Messaging

Documents received/Sec for the receive host counter instance.

Documents processed/Sec for the transmit host counter instance.

BizTalk:Message Agent Message delivery incoming rate for the document receive host.
BizTalk:Message Agent Message publishing outgoing rate for the document transmit host.
BizTalk:Messaging Latency
  1. Inbound Latency (sec)

  2. Outbound Adapter Latency (sec)

  3. Outbound Latency (sec)

  4. Request-Response Latency (sec)

XLANG/s Orchestrations Orchestrations completed/sec for the Orchestration processing host.

Modify Run Settings to Map Counter Sets to Appropriate Computers

Follow these steps to map the appropriate counter sets with the appropriate computers for the load test:

  1. In Load Test Editor, Right-click Run Settings and select Manage Counter Sets to display the Manage Counter Sets dialog box.

  2. Click Add Computer to add a new computer to the list. An icon with the highlighted text New Computer will appear under Computers and counter sets to monitor:. Replace the highlighted text by typing the name of the computer you would like to add to the list.

  3. After adding the computer name to the list, click to expand the list of available counter sets and then click to select one or more of the available counter sets to associate the counter set(s) with the computer.

  4. Repeat steps 2 and 3 until you have associated counter sets with all computers for which you would like to collect performance data.

Add a Test Settings File to the Solution to Run Tests and Collect Data Remotely

To configure the Load test to use the Test Controller and Test Agent computers that you created in Configure Load Test Controller and Agent Computers, follow the steps in Add a test settings for remote execution or data collection to your solution(http://go.microsoft.com/fwlink/?LinkId=209182) as noted below:

  1. For Step 3 enter the name BizTalkLoadTest

  2. Ignore Step 6 since you have already entered a name in Step 3.

  3. For Step 7 enter “These are default test settings for a remote test run” under Description:.

  4. For Step 8 select the default naming scheme.

  5. For Step 9 select Remote execution under Test execution method:, select the test controller under Controller: and leave the remaining properties on the Roles page at their default settings.

  6. For Step 24 select the option to Run in default host, select a Host type: of Default and under Run tests in 32 or 64 bit process: select the option to Run tests in 64 bit process on 64 bit machine.

  7. For Step 25 select Mark an individual test as failed if its execution time exceeds and leave the default value of 30 minutes selected.

  8. For Step 27b select the check box for Use the Load Context for assemblies in the test directory and then click Save As to display the Save As dialog box.

  9. In the Save As dialog box, verify that the name BizTalkLoadTest is entered next to File name: and click Save. You have now added a test settings file to your solution.

Configure the BizTalk Server Environment for Load Testing

This section provides information for creating the BizTalk Server Receive Locations, Receive Ports, and Send Ports required to run the sample code described in the sections Create a Unit Test to Submit Documents to BizTalk Server and Create a Load Test to Perform Multiple Unit Tests Simultaneously. As described in Create a Load Test to Perform Multiple Unit Tests Simultaneously, the load test BTS_Messaging_Step is configured to execute the unit tests BTSMessaging and BTSMessaging2. In turn, these unit tests load a copy of the message C:\Projects\LoadTest\BTSLoad\TestMessages\TestXmlDocument.xml and send it to the endpoints BTSMessagingEP and BTSMessagingEP2 that are defined in the following section of the project’s application configuration (app.config) file:

<!-- BTSMessagingEP -->
<endpoint address="net.tcp://BizTalk Server Computer:8123/btsloadtest" binding="netTcpBinding" bindingConfiguration="netTcpBinding" contract="System.ServiceModel.Channels.IRequestChannel" name="BTSMessagingEP" />
<endpoint address="net.tcp://BizTalk Server Computer:8123/btsloadtest" binding="netTcpBinding" bindingConfiguration="netTcpBinding" contract="System.ServiceModel.Channels.IRequestChannel" name="BTSMessagingEP2" />

As noted earlier, BizTalk Server Computer is a placeholder for the actual BizTalk Server computer names or, in the case that the BizTalk Server Computers are configured as members of a Network Load Balancing (NLB) cluster; BizTalk Server Computer is a placeholder for the name or address of the corresponding NLB virtual server.

For purposes of this example, two BizTalk Server computers were used and the BizTalk Server Message Box database was on a remote SQL Server computer.

Create BizTalk Server Send and Receive Hosts

Follow the steps in the BizTalk Server Documentation topic How to Create a New Host (http://go.microsoft.com/fwlink/?LinkId=208595) to create a BizTalk Server “Send” host for Send Ports and Send adapter handlers. Configure the host with the following properties:

Property Value
Name TxHost
Type In-Process
Allow Host Tracking Ensure that this checkbox is un-checked.
Authentication Trusted Ensure that this checkbox is un-checked.
32-bit only Ensure that this checkbox is un-checked.
Make this the default host in the group Ensure that this checkbox is un-checked.
Windows group: The Windows group used to control access to this host and associated host instances. The Window group created for the default in-process host is named either <Computer Name>\BizTalk Application Users (for a single server BizTalk Server installation) or <Domain Name>\BizTalk Application Users (for a multiple server BizTalk Server installation, which requires the use of domain groups).

 Note

<Computer Name> and <Domain Name> are placeholders for the actual computer name or domain name used when the group was created.

If a new group is created for this host then it must have the privileges described in the topic Host Groups (http://go.microsoft.com/fwlink/?LinkId=208803) in the BizTalk Server documentation.

Repeat the steps that you followed when creating the “Send” host to create a “Receive” host except configure the “Receive” host properties with the following values:

Property Value
Name RxHost
Type In-Process
Allow Host Tracking Ensure that this checkbox is un-checked.
Authentication Trusted Ensure that this checkbox is un-checked.
32-bit only Ensure that this checkbox is un-checked.
Make this the default host in the group Ensure that this checkbox is un-checked.
Windows group: The Windows group used to control access to this host and associated host instances. The Window group created for the default in-process host is named either <Computer Name>\BizTalk Application Users (for a single server BizTalk Server installation) or <Domain Name>\BizTalk Application Users (for a multiple server BizTalk Server installation, which requires the use of domain groups).

 Note

<Computer Name > and <Domain Name> are placeholders for the actual computer name or domain name used when the group was created.

If a new group is created for this host then it must have the privileges described in the topic Host Groups (http://go.microsoft.com/fwlink/?LinkId=208803) in the BizTalk Server documentation.

Create Instances of the BizTalk Server Send and Receive Hosts

Follow the steps in the BizTalk Server Documentation topic How to Add a Host Instance (http://go.microsoft.com/fwlink/?LinkId=208596) to create and start instances of the BizTalk Server “Send” host. Configure an instance of the “Send” host to run on each BizTalk Server in the BizTalk Server group and configure host instance properties with the following values:

Property Value
Host name: Select TxHost from the drop-down box next to Host name:
Server: Select the BizTalk Server that will run this host instance from the drop-down box next to Server:
Logon
  1. Click the Configure button to display the Logon Credentials dialog box.

  2. In the Logon Credentials dialog box enter the following values for the specified properties:

    Property Value
    Logon: Name of user account that is a member of the Windows group associated with this BizTalk Server host.
    Password: Password for the user account specified in the Logon: textbox.
  3. Click OK to close the Logon Credentials dialog box.

Disable host instance from starting. Ensure that this checkbox is un-checked.

After creating the host instance, right-click on the host instance and select Start from the context menu.

Repeat the steps that you followed when creating the “Send” host instances to create “Receive” host instances. Configure an instance of the ��Receive” host to run on each BizTalk Server in the BizTalk Server group and configure host instance properties with the following values:

Property Value
Host name: Select RxHost from the drop-down box next to Host name:
Server: Select the BizTalk Server that will run this host instance from the drop-down box next to Server:
Logon:
  1. Click the Configure button to display the Logon Credentials dialog box.

  2. In the Logon Credentials dialog box enter the following values for the specified properties:

    Property Value
    Logon: Name of user account that is a member of the Windows group associated with this BizTalk Server host.
    Password: Password for the user account specified in the Logon: textbox.
  3. Click OK to close the Logon Credentials dialog box.

Disable host instance from starting. Ensure that this checkbox is un-checked.

After creating the host instance, right-click on the host instance and select Start from the context menu.

Create a BizTalk Server Receive Port

Follow the steps in the topic How to Create a Receive Port (http://go.microsoft.com/fwlink/?LinkID=154843) in the BizTalk Server documentation to create a One-Way Receive Port. When creating the Receive port, leave all properties at default values except as noted in the table below:

Property Value
General\Name: BTSLoadTestMessaging.OneWay.ReceivePort
General\Port Type: One-Way
General\Authentication No authentication
General\Enable routing for failed messages Ensure that this checkbox is un-checked.
General\Description Leave blank
Inbound Maps None
Tracking Ensure that all checkboxes are un-checked.
Receive Locations Click New, this will display the Receive Location Properties dialog box which should be configured as described in the following section, Create a BizTalk Server Receive Location.

Create a BizTalk Server Receive Location

In the Receive Location Properties dialog box displayed while creating the BizTalk Server Receive port, set properties to the following values:

Property Value
Name: BTSLoadTest.Messaging.OneWay.WCF-Customer.ReceiveLocation
Receive handler: RxHost
Receive pipeline: PassThruReceive
Description: Leave this blank
Type: Select WCF-Custom from the drop-down list and then click the Configure button, this will display the WCF-Custom Transport Properties dialog box which should be configured as described in the following section, Configure the WCF-Custom Receive Transport.

Configure the WCF-Custom Receive Transport

In the WCF-Custom Transport Properties dialog box displayed while creating the BizTalk Server Receive location, leave all properties at default values except as noted in the table below:

Property Value
General\Address (URI): net.tcp://localhost:8123/btsloadtest
Binding\Binding Type: netTcpbinding
Binding\NetTcpBindingElement\listenBacklog 400
Binding\NetTcpBindingElement\maxConnections 400
Binding\Security\NetTcpSecurityElement\mode None
Behavior\ServiceBehavior\serviceThrottling\ServiceThrottlingElement

 Note

To add the serviceThrottling behavior to the list of behaviors, right-click ServiceBehavior, click Add Extension, select serviceThrottling from the list of behavior extensions, and then click OK.

Set the ServiceThrottlingElement properties to the following values:
  • maxConcurrentCalls - 400

  • maxConcurrentInstances - 400

  • maxConcurrentSessions - 400

Behavior\ServiceBehavior\serviceDebug\ServiceDebugElement

 Note

To add the serviceDebug behavior to the list of behaviors, right-click ServiceBehavior, click Add Extension, select serviceDebug from the list of behavior extensions, and then click OK.

Leave the list of ServiceDebugElement properties at their default values (empty) except for the following properties, which should be changed to a value of True:
  • httpHelpPageEnabled - True

  • httpsHelpPageEnabled - True

  • includeExceptionDetailInFaults - True

Configure the WCF-Custom Send Transport

In the WCF-Custom Transport Properties dialog box displayed while creating the BizTalk Server Send Port, leave all properties at default values except as noted in the table below:

Property

Value

General\Address (URI):

net.tcp://<computer name>:2001/TCP1

 Important

<computer name> is a placeholder for the actual name of the computer that will host the IndigoService.exe process used to consume messages generated by the WCF-Custom send transport. Since IndigoService.exe requires very few resources, consider running IndigoService.exe on the SQL Server computer used for the BizTalk Server databases. See Configure a Computer to Consume Messages Sent by the BizTalk Server Send Port for more information about downloading, installing and running IndigoService.exe for purposes of this example.

 

Binding\Binding Type:

customBinding

As with most of the WCF-Custom Binding Types, the customBinding Binding type exposes several properties, which should be set to the following values:

  • Under the Binding section, there is a CustomBindingElement property with an associated Configuration section. Leave all of the values in the Configuration section for the CustomBindingElement at their default values.

  • Under CustomBindingElement right-click textMessageEncoding and select Remove extension (Del). Likewise, right-click httpTransport and select Remove extension (Del).

  • Right-click CustomBindingElement and select Add extension Ins to display the Select Binding Element Extension dialog box.

  • Select binaryMessageEncoding and click OK to add the binaryMessageEncoding element extension. Repeat the steps to display the Select Binding Element Extension dialog box and scroll down the list of available element extensions until you see the tcpTransport element extension, select tcpTransport and click OK.

  • Under CustomBindingElement select the tcpTransport element and in the Configuration section for tcpTransport, leave all properties at default values except as noted in the following table:

Property

Value

connectionBufferSize

2097152

maxBufferSize

2097152

maxPendingAccepts

400

maxPendingConnections

400

listenBacklog

400

maxBufferPoolSize

2097152

maxReceivedMessageSize

2097152

  • Under the tcpTransport element select the ConnectionPoolSettings element and leave all properties at default values except for the maxOutboundConnectionsPerEndpoint property, which should be set to a value of 400.
  • Click OK to close the WCF-Custom Transport Properties dialog box, then click OK again to close the BTSLoadTest.Messaging.Send.WCF-Custom – Send Port Properties dialog box.

Configure a Computer to Consume Messages Sent by the BizTalk Server Send Port

The IndigoService.exe is designed to consume messages sent via WCF. IndigoService.exe is part of the BizTalk Benchmark Wizard, which is available at BizTalk Benchmark Wizard (http://go.microsoft.com/fwlink/?LinkID=186347). The easiest way to set up and run IndigoService.exe for purposes of this example is to simply download the BizTalk Benchmark Wizard zip file from the BizTalk BenchMark Wizard download page (http://go.microsoft.com/fwlink/?LinkID=209100) and extract the following 4 files onto the computer that you would like to run IndigoService.exe:

  • \IndigoService\bin\Release\IndigoService.exe

  • \IndigoService\bin\Release\IndigoService.exe.config

  • \IndigoService\bin\Release\Response.xml

  • \IndigoService\bin\Release\StartIndigoService.bat

Then, start IndigoService.exe by double-clicking on StartIndigoService.bat. IndigoService.exe consumes messages sent to the endpoint specified in the IndigoService.exe.config file:

<endpoint address="net.tcp://localhost:2001/TCP1"
binding="netTcpBinding"
bindingConfiguration="Binding1"
name="endpoint1"
contract="IndigoService.IServiceTwoWaysVoidNonTransactional" />

This is why the Send Port Address is configured with an Address (URI) of net.tcp://<computer name>:2001/TCP1

Because IndigoService.exe requires very few resources, it is often perfectly acceptable to run IndigoService.exe on the SQL Server computer used for the BizTalk Server databases.

Disable Tracking and Throttling for the BizTalk Server Group

In order to determine the absolute maximum sustainable throughput of the system, both message Tracking and Throttling should be disabled before beginning load testing. This can be done using the BizTalk Server Administration console by following these steps:

  1. Launch the BizTalk Server Administration console. Click Start, point to All Programs, point to BizTalk Server 2010 and then click BizTalk Server Administration.

  2. Under BizTalk Server Administration, select your BizTalk Group if it is listed or if it is not listed, right-click BizTalk Server Administration, select Connect to Existing Group, enter the SQL Server name that houses the BizTalk Group’s BizTalk Server Management database next to SQL Server name:, enter the name of the BizTalk Group’s management database name next to Database name: and then click OK.

  3. Right-click the BizTalk Group node and select Settings to display the BizTalk Settings Dashboard.

  4. Click to select Hosts in the left hand pane of the BizTalk Settings Dashboard.

  5. Click the dropdown box next to Host: to select one of the hosts that will be used during performance testing.

  6. Leave host properties at their default values except as noted in the following table:

    Property Value
    General\Move tracking data to DTA DB Uncheck this checkbox if it is checked.
    General\32-bit only Uncheck this checkbox if it is checked.
    General\Polling Intervals\Messaging Set to a value of 20000000
    General\Polling Intervals\Orchestrations Set to a value of 20000000
    Resource-Based Throttling\In-process messages: Set to a value of 10000
    Resource-Based Throttling\Internal message queue size: Set to a value of 10000
    Resource-Based Throttling\Message count in DB: Set to a value of 0
    Resource-Based Throttling\Memory Usage\Process virtual: Set to a value of 0
    Rate-Based Throttling\Publishing\Throttling override: Set to Do Not Throttle
    Rate-Based Throttling\Delivery\Throttling override: Set to Do Not Throttle
  7. Repeat the process outlined in step 6 for every host that will be used during the course of load testing.

  8. Click to select Host Instances in the left hand pane of the BizTalk Settings Dashboard.

  9. Click the dropdown box next to Host Instance: to select one of the host instances that will be used for performance testing.

  10. Leave properties at default values except change the .NET CLR Maximum worker threads to a value of 100 and change the .NET CLR Minimum worker threads to a value of 25.

  11. Repeat the process outlined in step 10 for every host instance that will be used during the course of load testing.

Even though disabling Tracking and Throttling does not in any way represent what should be done in a production scenario, these operations can be so costly from a performance perspective it makes sense to disable them to determine the true Maximum Sustainable Throughput (MST) of a BizTalk Server Environment and allow testers to clearly see the impact of any performance tuning applied to the environment. Certainly, an argument could be made that tracking should not be disabled and if you know from the outset that your BizTalk Server application will absolutely require a certain level of tracking then enable the required level of tracking. With that said, every consideration should be made for disabling throttling for purposes of performance testing. Throttling is invaluable for preventing a BizTalk Server from “falling down” due to unexpected load spikes in a production environment. However, you don’t want throttling enabled during performance testing because:

  1. Throttling is actually designed to reduce BizTalk Server performance when BizTalk is at risk of becoming overburdened.  The goal of Throttling is to prevent BizTalk Server from ever becoming overwhelmed, locked up, and essentially unresponsive/unusable. Throttling serves a very valuable purpose but is not compatible with performance testing BizTalk Server by with above average load profiles.

  2. Beyond the actual act of mitigating overload conditions, throttling does incur a slight performance cost even when it is not actively throttling.

  3. Since the step load pattern testing is designed to push BizTalk Server beyond what is actually "sustainable", if Throttling is not disabled it will absolutely impact your ability to find out what your BizTalk Server environment is capable of processing.

The next sections describe how to perform step load pattern testing of your BizTalk Server environment and in the course of this testing, generate load in excess of maximum sustainable load for a limited time. Then, once we have a good idea of the document volume where BizTalk is receiving more documents than it can process, we back off of that document volume a bit and perform constant load pattern testing to more precisely evaluate the MST of the BizTalk Server Environment over time. If throttling is enabled then the step load pattern testing will be unable to determine what the BizTalk Server environment MST is because throttling is designed exactly to prevent BizTalk Server from trying to process more than it can handle. Therefore, with throttling enabling, it becomes all but impossible to push your BizTalk environment beyond MST so that you can in turn determine what the "true" MST is.

 Important

Under no circumstances should throttling be disabled in a production environment. Throttling provides an extremely valuable failsafe mechanism that can prevent your BizTalk Server Application from becoming unresponsive due to unanticipated load spikes (such as if one of more BizTalk Servers in a group experiences a power outage or if you bring online one or more trading partners that generate much higher than anticipated load).

Perform Step Load Pattern Tests to Determine Maximum Sustainable Throughput

The simplest method for determining the Maximum Sustainable Throughput (MST) of a BizTalk Server solution with Visual Studio load testing is to perform a step load pattern and compare the total Documents received per second to the total Document processed per second. As long as the average total documents processed per second is greater than or equal to the average total documents received per second for the duration of the test, then the load is considered sustainable. If the average total documents received per second is greater than the average total documents processed per second for the duration of the test, then the load is not considered sustainable, and this will be evidenced by a corresponding increase in the value of the BizTalk:Message Box: General Counters\Spool Size counter. Over time, when a BizTalk Server application receives more documents than it can process, the unprocessed documents accumulate in the MessageBox database, which by default will eventually induce a throttling condition and significantly degrade the performance of the BizTalk Server application. The step load pattern is ideally suited for getting a good "ballpark" idea of what your BizTalk Server environment's MST is because we can ramp up the load from 10 to 250 virtual users with just a few mouse clicks.

Configure the Load Test with a Step Load Pattern Appropriate for your Application

Follow the steps in the section Create a Load Test to Perform Multiple Unit Tests Simultaneously to create a load test that uses a step load pattern. Factors that impact the ability of the BizTalk Server Application to process documents in a timely fashion include:

  1. Number of BizTalk Server computers in your group - Additional BizTalk Servers provide additional processing ability.

  2. Size of the messages being processed - Larger messages require additional processing resources.

  3. Amount of document mapping performed - Mapping requires additional processing resources.

  4. Receive or send pipelines required by the application - Complex pipelines require additional processing resources.

  5. Adapters and/or Accelerators used by the BizTalk Server application - Certain adapters and/or accelerators require more processing resources than others.

  6. Amount of Message tracking required - Message tracking is resource intensive.

  7. Number of and complexity of Orchestrations running in the BizTalk Server Application – Orchestrations can be very resource intensive.

When configuring the Step Load Pattern Test, modify the values specified for Start user count and Maximum user count to ensure that the number of messages specified for Start user count can be easily handled by the BizTalk Server application over time and likewise, the number of users specified for Maximum user count is more than the BizTalk Server application can handle over time. See Add a Load Test and Configure the Load Test Scenario, Counter Sets, and Run Settings for information about editing the load pattern settings for the load test and configure the load test to use the Test Settings that you created in Add A Test Settings File to the Solution to Run Tests and Collect Data Remotely to ensure that the correct test settings are used for the load test.

Configure the Load Test with the Appropriate Performance Counters and run the Step Pattern Load Test

Follow the steps in Add a Custom Counter Set to Measure BizTalk Server Key Performance Indicators (KPI) to add the necessary BizTalk Server performance counters which can be used to measure the performance of the BizTalk Server Application and determine at what point the BizTalk Server Application is no longer able to maintain the message load generated by the Load Test Agents. This will be evidenced by an increased value for the BizTalk: Message Box: General Counters\Spool Size counter. If the value for this counter begins to increase significantly then you have likely exceeded the MST of your BizTalk Server Environment/Application. At the point in time, you have determined the number of messages at which the BizTalk Server Application is no longer able to process as many messages as it is receiving, make a note of the Documents received/Sec. It is important to make a note of this value because the section Perform Constant Load Pattern Tests to Verify Maximum Sustainable Throughput will describe how to run a constant pattern load test with a “Constant User Count” value that is somewhat smaller than the maximum sustainable Documents received/Sec value determined by step load pattern testing. The constant load pattern test will verify that the BizTalk Server Application is capable of processing a certain number of messages over time, which is the true definition of Maximum Sustainable Performance. To view values for counter sets, first start the load test by right-clicking the test name (e.g. BTS_Messaging_Step) and then click the Run Test menu option. After Performance counters are initialized and the load test begins, Visual Studio will automatically switch focus to the Graphs window which allows you to display from 1 to 4 graphs simultaneously. If you are primarily interested in only viewing key performance indicators, as defined in Add a Custom Counter Set to Measure BizTalk Server Key Performance Indicators (KPI), click the Panels dropdown from the Load test menu and select the option for One Panel. Then click the drop-down at the top of the chart and select Key Indicators to display values for the key Performance indicators in real time.

 Note

Since certain default counter values will be displayed in the Key Indicators graph and since you will probably want to display counter values that you added to your custom counter set, you may want to manually delete each of the counters displayed in the Key Indicators graph and then manually add back counters from your custom counter set(s). For example, at the least, you would want to add the counters in the table below to your graph to determine how well the BizTalk Server environment is handling load, and help identify if and where any bottlenecks may be occurring:

Counter Category

Counter

Instance

Computer

BizTalk:Message Box:General Counters Spool Size BizTalk Server Message Box database:SQL Server Instance that houses the BizTalk Server Message Box database Any BizTalk Server in the group with the BizTalk Server Administration Console installed.
BizTalk:Messaging Documents received/Sec RxHost (or name of the receive host) BizTalk Server Computer#1 in the BizTalk Server Group
BizTalk:Messaging Documents received/Sec RxHost (or name of the receive host) BizTalk Server Computer#2 in the BizTalk Server Group
BizTalk:Messaging Documents received/Sec RxHost (or name of the receive host) BizTalk Server Computer#n in the BizTalk Server Group
BizTalk:Messaging Documents processed/Sec TxHost (or name of the send host) BizTalk Server Computer#1 in the BizTalk Server Group
BizTalk:Messaging Documents processed/Sec TxHost (or name of the send host) BizTalk Server Computer#2 in the BizTalk Server Group
BizTalk:Messaging Documents processed/Sec TxHost (or name of the send host) BizTalk Server Computer#n in the BizTalk Server Group
BizTalk:Messaging Latency Inbound Latency (sec) RxHost (or name of the receive host) BizTalk Server Computer(s) in the BizTalk Server Group which is receiving messages
BizTalk:Messaging Latency Outbound Adapter Latency (sec) TxHost (or name of the send host) BizTalk Server Computer(s) in the BizTalk Server Group which are sending messages
BizTalk:Messaging Latency Outbound Latency (sec) TxHost (or name of the send host) BizTalk Server Computer(s) in the BizTalk Server Group which are sending messages
BizTalk:Messaging Latency Request-Response Latency (sec) TxHost (or name of the send host) BizTalk Server Computer(s)in the BizTalk Server Group which are sending request response messages.
Processor % Processor Time _Total BizTalk Server Computer#1 in the BizTalk Server Group
Processor % Processor Time _Total BizTalk Server Computer#2 in the BizTalk Server Group
Processor % Processor Time _Total BizTalk Server Computer#n in the BizTalk Server Group
Processor % Processor Time _Total SQL Server instance that houses the BizTalk Server databases

Perform Constant Load Pattern Tests to Verify Maximum Sustainable Throughput

When Load Testing a BizTalk Server application using Visual Studio 2010, a constant load pattern test should be performed after an approximate Maximum Sustainable Throughput (MST) of the application is determined as described in Perform Step Load Pattern Tests to Determine Maximum Sustainable Throughput. This should be done to confirm that the MST is in fact sustainable over time and also so as to create a baseline load test moving forward to evaluate the effects of any performance tuning applied to the solution.
The easiest way to create a Constant Load Pattern test that uses the same Test Mix, Counter Sets and Counter Set Mappings used by the Step Load Pattern test is to simply save the Step Load Pattern test “BTS_Messaging_Step.loadtest” as “BTS_Messaging_Constant.loadtest” and then make some changes to “BTS_Messaging_Constant.loadtest”. Follow these steps to create a Constant Load Pattern test that is based upon the existing Step Load Pattern test:

  1. Open BTS_Messaging_Step.loadtest if it is not already open.

  2. Click File and select Save LoadTests\BTS_Messaging_Step.loadtest As to display the Save File As dialog box.

  3. In the Save File As dialog box, next to File name:, enter C:\Projects\LoadTest\BTSLoad\LoadTests\BTS_Messaging_Constant.loadtest and click Save.

  4. In the Load Test Editor, rename the scenario BTS_Messaging_Step to BTS_Messaging_Constant. The scenario name is displayed directly under the Scenarios folder.

  5. Leave the values for Test Mix and Network Mix unchanged but click to select Step Load Pattern.

  6. Right-click Step Load Pattern and select Properties.

  7. In the Properties section, under Load Pattern click the dropdown next to Pattern and change the Pattern from Step to Constant.

  8. In the Properties section, under Parameters, change the value for Constant User Count to a value slightly less than the number of users at which the Step Load Pattern test was becoming unsustainable (i.e. the value for the BizTalk:Messaging\Documents received per/Sec began to consistently exceed the value for BizTalk:Messaging\Documents processed/Sec and the value of the BizTalk:Message Box:General Counters\Spool Size began to increase unbounded).

  9. Under the Run Settings folder, right-click Run Setting1 [Active] and select Properties.

  10. Scroll down the list of properties to the Timing section and enter a value for the Run Duration property of at least 10 minutes (00:10:00) and verify that the value for Sample Rate is still set to 5 seconds (00:00:05).

  11. Start the load test by right-clicking the test name (e.g. BTS_Messaging_Constant) and then click the Run Test menu option.

Reviewing, Comparing, and Performing Trend Analysis of Performance Test Results Maintained in the Load Test Results Repository

Perhaps one of the most compelling features of Visual Studio 2010 Load Testing is its ability to quickly retrieve and compare test results stored in the Load Tests Results Repository, which is maintained in a SQL Server database. Load test results can be annotated, compared to other test results, monitored for trend analysis, and have all of this information output to Excel spreadsheets, which of course allows even greater in depth analysis. This functionality is invaluable for performance tuning because with just a few clicks you can quickly generate an extensive test comparison or trend analysis which provides concise feedback/results to quickly assess the impact of performance tuning your BizTalk Server environment and application. For more information about creating load test performance results with Microsoft Excel see How to: Create Load Test Performance Reports Using Microsoft Excel (http://go.microsoft.com/fwlink/?LinkId=209735).  For more information about analyzing load tests results using the load test analyzer see Analyzing Load Tests Results Using the Load Test Analyzer (http://go.microsoft.com/fwlink/?LinkId=209736).

See Also

Another important place to find a huge amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki