53600: BackupAgent: Optimizing BackupAgent server settings in case of high load

Translate to:

Applies to:

Optimizing BackupAgent server settings in case of high load

This article explains how to optimize connection settings for IIS and ASP.Net so the BackupAgent Server is able to handle more connections and the performance of a server is optimized.

General settings on the server

First of all, in order to make these settings work, we would need to change machine.config settings:

The processModel section can be set only within the Machine.config file and affects all ASP.NET applications that are running on the server.

Changes to the processModel element take effect only when the worker process is restarted—not immediately after the setting is changed, as with other configuration elements.

http://msdn.microsoft.com/en-us/library/7w2sway1(v=vs.100).aspx

  • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config

 All you need to change in machine.config is to set ‘allowDefinition’ parameter to ‘MachineToApplication’:

 c:\Windows\Microsoft.NET\Framework64\xxxxxxxxxx\Config\machine.config

Setting the worker threads

 And to add one more node to the web-service configuration file.

 C:\Program Files\BackupAgent Server\CloudBackupService\Web.config

  <system.web>

<processModel autoConfig="false" maxWorkerThreads="100" maxIoThreads="100" />

               <httpRuntime executionTimeout="900" minFreeThreads="64" minLocalRequestFreeThreads="64" />

</system.web>

Optimizing the internal connection settings

The following settings are relevant:

  1. Max connections: This parameter affects how many connections can be made from certain process (for IIS this is limitation per working process).
    The maximum number of connections allowed to some server. If not supplied, the default is 2.
    This element can be used in the application configuration file.
    http://msdn.microsoft.com/en-us/library/aa903309%28v=vs.71%29.aspx
  2. Binding in the consumer of Metadata Management/Processing Service (MaxConnections Property): affects how many connections can be established using certain binding configuration and can also interfere with the number of the incoming connections allowed by MMS or Processing service binding.
    http://msdn.microsoft.com/en-us/library/system.servicemodel.netnamedpipebinding.maxconnections.aspx
  3. Binding in Metadata Management Service host: The maximum number of connections, both inbound and outbound, that are allowed to endpoints configured with the named pipe binding.
    The current (default) value is 10 connections.
    http://msdn.microsoft.com/en-us/library/ms731379.aspx
  1. Service Throttling for Metadata Management Service: Configures the number of concurrent calls and sessions used in MMS to serve the calls concurrently.
    * maxConcurrentCalls is currently set to 32, but in fact, only 16 connections are used from the web-service (2 connections per working process). The system default is 16 * processor count.
    * maxConcurrentSessions is currently set to 32. Should be the same or more than maxConcurrentCalls as we are using session-less service implementation. The default is 100 * processor count.
    * maxConcurrentInstances is set to 1 (singleton service instance for better memory management).
    http://msdn.microsoft.com/en-us/library/ms731379.aspx

In order to understand the best settings per component, please use this spreadsheet and set the number of CPUs, available worker processes (for BackupAgentServices application pool) and number of storage locations:

Go To Spreadsheet

Examples per web.config settings file, per component:

Web-service

C:\Program Files\BackupAgent Server\CloudBackupService\Web.config

 

<configuration>

<system.net>

                              <connectionManagement>

                                            add address="*" maxconnection="32"/>

                              </connectionManagement>

               </system.net>

….

               <system.serviceModel>

                              <bindings>

                                            <netNamedPipeBinding>

                                                           <binding name="NetNamedPipeBinding_IMetadataService" … maxConnections="32" />

                                                           <binding name="NetNamedPipeBinding_IProcessingService" … maxConnections="32" />

</netNamedPipeBinding>

</bindings>

               </system.serviceModel>

</configuration>

 

Metadata Management Service

C:\Program Files\BackupAgent Server\MetadataManagementService\MetadataManagementService.exe.config

 

<configuration>

<system.net>

                              <connectionManagement>

                                            <add address="*" maxconnection="256"/>

                              </connectionManagement>

               </system.net>

….

               <system.serviceModel>

<behaviors>

<serviceBehaviors>

                                                           <behavior name="MetadataServiceBehavior">

                                                                          <serviceThrottling maxConcurrentCalls=" 64" maxConcurrentSessions=" 64" maxConcurrentInstances="1"/>

                                                             </behavior>

                                            </serviceBehaviors>

</behaviors>

                              <bindings>

                                            <netNamedPipeBinding>

                                                           <binding name="netNamedPipeBinding_IMetadataService" … maxConnections="128" />

</netNamedPipeBinding>

</bindings>

               </system.serviceModel>

</configuration>

 

Processing Service

C:\Program Files\BackupAgent Server\ProcessingService\ ProcessingService.exe.config

 

<configuration>

<system.net>

                              <connectionManagement>

                                            <add address="*" maxconnection="256"/>

                              </connectionManagement>

               </system.net>

….

               <system.serviceModel>

                              <bindings>

                                            <netNamedPipeBinding>

                                                           <binding name="NetNamedPipeBinding_IMetadataService" … maxConnections="128" />

</netNamedPipeBinding>

</bindings>

               </system.serviceModel>

</configuration>

 

Maintenance Service

C:\Program Files\BackupAgent Server\MaintenanceService\MaintenanceService.exe.config

 

<configuration>

<system.net>

                              <connectionManagement>

                                            <add address="*" maxconnection="28"/>

                              </connectionManagement>

               </system.net>

….

               <system.serviceModel>

                              <bindings>

                                            <netNamedPipeBinding>

                                                           <binding name="NetNamedPipeBinding_IMetadataService" … maxConnections="1000" />

</netNamedPipeBinding>

</bindings>

               </system.serviceModel>

<applicationSettings>

<CloudBackup.MaintenanceService.Properties.Settings>

                              <setting name="ThreadMaxCountPerStorage" serializeAs="String">

                                             4

</setting>

                              <setting name="ThreadMaxCount" serializeAs="String">

0

                              </setting>

               </CloudBackup.MaintenanceService.Properties.Settings>

  </applicationSettings>

</configuration>

Tags: 

You are reporting a typo in the following text:
Simply click the "Send typo report" button to complete the report. You can also include a comment.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
4 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.