The following article provides a few tips and tricks to optimize Exchange 2010 DAG (Database Availability Group) performance.
General
1. Use the latest Exchange 2010 Service Pack/Rollup, if it applicable.
2. Depend on the server hardware and drivers, you may need to disable the following settings:
netsh int tcp set global chimney=disabled
netsh int tcp set global rss=disabled
3. Use Microsoft recommendation for antivirus deployment in Exchange 2010 servers.
CAS and DAG Optimization
1. Please remember that Exchange DAG wouldn't be useful without operational CAS server. So, the best practice (from my opinion) is to use a CAS Array to provide a High Availability solution to the CAS role.
2. Please remember that exiting Exchange 2010 mailbox database/s wouldn’t set automatically the RpcClientAccessServer attributes. Due this reason, you may need to use the following commands to redirect exiting mailbox database/s to the new CAS Array:
New-ClientAccessArray –Name “MyCASArrayName” –FQDN “outlook.mydoaminname.local” –Site “Default”
Set-MailboxDatabase MailboxDatabaseName -RpcClientAccessServer “outlook.mydoaminname.local”
3. Lower the TTL value of the CAS Array DNS record (e.g. outlook.mydoaminname.local).
4. Please remember that without a CAS server, GC and DNS servers in the DR site, the Exchange 2010 DAG in the DR site wouldn’t be operational.
5. Configure the Autodiscover Service to Use Site Affinity
DAG Optimization
1. Use at least three (network) adapters for Mailbox role deployment:
a. Public (e.g. to users outlook etc.).
b. Private (a dedicated replication VLAN). Its recommended to unmark the checkbox “Register this connections address in DNS” from the TCP/IP properties on the private NIC.
c. Storage (e.g. FC HBA, iScsi etc.)
2. Change the network adapter binding order, so the “Public” interface will get a higher priority than the other network adapters.
3. Lower the TTL value of the DAG DNS record (e.g. MyDAGName).
4. In the main site, choose a witness server with high uptime.
5. Use only static IP/s for the Mailbox role servers and DAG.
New-DatabaseAvailabilityGroup -Name MyDAGName -WitnessDirectory C:\MyDAGName -WitnessServer MyWitnessServerName -DatabaseAvailabilityGroupIpAddresses 10.0.0.200 -Verbose
Add-DatabaseAvailabilityGroupServer -Identity MyDAGName -MailboxServer Exchange2010FQDNMainServerName -Verbose
Add-MailboxDatabaseCopy -Identity 'MailboxDatabaseName' -MailboxServer Exchange2010DRFQDNServerName -ActivationPreference 2
Note: It’s important to set the correct –ActivationPreference value during DAG setup.
If you have an existing DAG implementation, you may need to use the following command instead:
Set-DatabaseAvailabilityGroup -Identity MyDAGName -DatabaseAvailabilityGroupIpAddresses 10.0.0.200
6. Check the network performance/latency. According to your tests, set the correct values to Replay Lag Time and Truncation Lag Time attributes:
Set-MailboxDatabaseCopy -Identity 'MailboxDatabaseName\Exchange2010MainFQDNServerName' -ReplayLagTime 0.0:5:0 -Verbose
Set-MailboxDatabaseCopy -Identity 'MailboxDatabaseName\Exchange2010DRFQDNServerName' -TruncationLagTime 0.0:5:0
Note1: 0.0:5:0 = 5 minutes of delay.
Note2: Check the network performance/latency in a lab environment, before moving to production deployment. Using incorrect values may lead to high downtime. Usually, If the DAG members reside in the same Active Directory site and VLAN, you wouldn't need to change the settings above.
7. Review: Understanding Datacenter Activation Coordination Mode article and consider to enable DAC mode:
8. If you like to use iSCSI, please review the following Microsoft guide: Managing Database Availability Groups
Set-DatabaseAvailabilityGroup -Identity MyDAGName -DatacenterActivationMode DagOnly
Testing
Test the new DAG implementation by using the commands:
Get-DatabaseAvailabilityGroup | fl and Get-DatabaseAvailabilitygroup MyDAGName -status
Test-ReplicationHealth
Get-MailboxDatabaseCopyStatus
Move-ActiveMailboxDatabase -Server Exchange2010FQDNMainServerName -ActivateOnServer Exchange2010DRFQDNServerName
Move-ActiveMailboxDatabase MailboxDatabaseName Exchange2010DRFQDNServerName
Simulation tools to measure Exchange 2010 Performance
Microsoft Jetstress 2010
Microsoft LoadGen 2010