Export (0) Print
Expand All

Configuration Parameters that Affect Adapter Performance

This section describes configuration settings that can affect the performance of BizTalk Server adapters.

Because a Windows thread is the most basic executable unit available to a Windows process it is important to allocate enough threads to the .NET thread pool associated with an instance of a BizTalk host to prevent thread starvation. When thread starvation occurs there are not enough threads available to perform the requested work which negatively impacts performance. At the same time, care should be taken to prevent allocating more threads to the.NET thread pool associated with a host than is necessary. The allocation of too many threads to the.NET thread pool associated with a host may increase context switching. Context switching occurs when the Windows kernel switches from running one thread to a different thread which incurs a performance cost. Excessive thread allocation can cause excessive context switching which will negatively impact overall performance.

Modify the number of Windows threads available in the .NET thread pool associated with an instance of a BizTalk host by creating the appropriate CLR Hosting values in the registry of the BizTalk Server.

Aa561380.Caution(en-us,BTS.20).gifWarning
Incorrect use of Registry Editor may cause problems requiring you to reinstall your operating system. Use Registry Editor at your own risk. For more information about how to back up, restore, and modify the registry, see the Microsoft Knowledge Base article "Description of the Microsoft Windows registry" at http://go.microsoft.com/fwlink/?LinkId=62729.

Aa561380.note(en-us,BTS.20).gifNote
Worker threads are used to handle queued work items and I/O threads are dedicated callback threads associated with an I/O completion port to handle a completed asynchronous I/O request.

To modify the number of threads available in the.NET thread pool associated with each instance of a BizTalk host, follow these steps:

  1. Stop the BizTalk host.

  2. Click Start, click Run, type regedit.exe, and then click OK to start Registry Editor.

    Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTSSvc$hostname] where hostname is the name of the host associated with the host instance.

    Aa561380.note(en-us,BTS.20).gifNote
    This registry key may be represented as HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTSSvcguid] where guid is a GUID unique to each instance of a BizTalk Server host if you have upgraded your BizTalk Server 2006 installation from BizTalk Server 2004.

  3. Under the CLR Hosting key, create the following DWORD entries with the indicated values.

    DWORD entry Default value Recommended value

    MaxIOThreads

    20

    100

    MaxWorkerThreads

    25

    100

    Aa561380.Important(en-us,BTS.20).gifImportant
    Increasing this value beyond 100 can have an adverse effect on the performance of the SQL Server computer that is hosting the BizTalk Server MessageBox database. When this problem occurs, SQL Server may encounter a deadlock condition. It is recommended that this parameter is not increased beyond a value of 100.

    MinIOThreads

    1

    25

    MinWorkerThreads

    1

    25

    Aa561380.note(en-us,BTS.20).gifNote
    These recommended values will be sufficient for most scenarios but may need to be increased depending on how many adapter handlers or orchestrations are running in each instance of the host.

    Aa561380.note(en-us,BTS.20).gifNote
    These values are implicilty multiplied by the number of processors on the server. For example, setting the MaxWorkerThreads entry to a value of 100 would effectively set a value of 400 on a 4 CPU server.

  4. Close Registry Editor.

  5. Restart the BizTalk host.

The following settings can be applied to an ASP.NET application that hosts a web application that the HTTP or SOAP adapter communicates with. These parameters are set in the web.config or machine.config files of the server hosting the web application. Modify these settings to accommodate the load that is generated by your HTTP or SOAP adapter send port. For more information about these settings see Contention, poor performance, and deadlocks when you make Web service requests from ASP.NET applications.

Parameter Section of configuration file Default value Recommended value

minFreeThreads

The minimum number of free threads to allow execution of new requests. ASP.NET keeps this many threads free for requests that require additional threads to complete their processing.

<httpRuntime>

8

88 * the number of processors on the server hosting the web application.

minFreeLocalRequestFreeThreads

The minimum number of free threads that ASP.NET keeps available to allow execution of new local requests. This number of threads is kept reserved for requests coming from the local host, in case some requests issue child requests to the local host during their processing. This avoids a possible deadlock with recursive reentry into the Web server.

<httpRuntime>

4

76 * the number of processors on the server hosting the web application.

executionTimeout

Indicates the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.

<httpRuntime>

90

90

maxconnection

Determines how many connections can be made to a specific IP address.

<connectionManagement>

2

A value of 2 for this setting conforms to the IETF RFC for the HTTP 1.1 specification and is suitable for user scenarios but is not optimized for high throughput.

12 * the number of processors on the server hosting the web application.

maxWorkerThreads

Configures the maximum amount of worker threads to be used for the process on a per-CPU basis.

<processModel>

20

100

Aa561380.note(en-us,BTS.20).gifNote
This value is implicilty multiplied by the number of processors on the server.

minWorkerThreads

<processModel>

1

maxWorkerThreads / 2

Aa561380.note(en-us,BTS.20).gifNote
The minWorkerThreads parameter is not in the configuration file by default. You must add it.

Aa561380.note(en-us,BTS.20).gifNote
This value is implicilty multiplied by the number of processors on the server.

maxIoThreads

Used by ASP.NET to limit the number completion threads used.

<processModel>

20

100

Aa561380.note(en-us,BTS.20).gifNote
This value is implicilty multiplied by the number of processors on the server.

If the BizTalk Server computer is running ASP.NET 2.0 or later then you can set autoconfig=true in the processModel section of the Machine.config file to automatically configure the following settings to achieve optimal performance based on the machine configuration:

  • The maxWorkerThreads attribute.

  • The maxIoThreads attribute.

  • The minFreeThreads attribute of the httpRuntime element.

  • The minLocalRequestFreeThreads attribute of the httpRuntime element.

  • The maxConnection attribute of the <connectionManagement> Element (Network Settings) element.

Aa561380.note(en-us,BTS.20).gifNote
The processModel section can be set only within the Machine.config file and affects all ASP.NET applications that are running on the server.

For more information about the processModel element of the machine.config file see the Microsoft MSDN® Web site at http://go.microsoft.com/fwlink/?LinkId=62307.

The following registry setting governs the TCP window size, which is the amount of receive data (in bytes) that can be buffered during a connection. If this parameter is not set to an optimal value then adapter performance can be impacted negatively. Implement this registry setting to increase the TCP window size.

Aa561380.Caution(en-us,BTS.20).gifWarning
If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk. Before you modify the Registry, always back up the registry, and verify that you know how to restore the backup if a problem occurs. For more information about how to back up, restore, and modify the registry, see the Microsoft Knowledge Base article "Description of the Microsoft Windows registry" at http://go.microsoft.com/fwlink/?LinkId=62729.

To increase the default TCP windows size, follow these steps:

  1. Click Start, click Run, type regedit.exe, and then click OK to start Registry Editor.

    Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\

  2. Under the Parameters key, create the following DWORD entry with the indicated value.

    DWORD entry Default value Recommended value

    TcpWindowSize

    This setting determines the maximum TCP receive window size of the computer. The receive window specifies the number of bytes a sender can transmit without receiving an acknowledgment. Generally, larger receive windows improve performance over high bandwidth networks.

    17520

    Set to a multiple of the Ethernet Maximum Segment Size (MSS) of 1460 up to a maximum of 64240. If Windows scaling is used, set to a maximum of 65535. For more information about Windows 2000 and Windows Server 2003 TCP Features see Description of Windows 2000 and Windows Server 2003 TCP Features.

    Aa561380.note(en-us,BTS.20).gifNote
    You must restart your computer for these changes to take effect.

  3. Close Registry Editor.

Community Additions

ADD
Show:
© 2014 Microsoft