SQL Server Always on Availability Group Scalability Experiment and Result on Azure VM

Published Feb 23 2021 08:42 AM 2,065 Views
Microsoft

Introduction

The purpose of this scalability experiment is to evaluate the performance of AG cluster when it has large number of databases and some of the databases undergo large amount of traffic, and measure 1) OLTP transaction performance, 2) Failover success rate and time, and 3) Resource consumption, such that we can provide reference for customer’s large scale AG cluster configuration based on the experiment result. For an AG cluster, based on the specific configuration of CPU cores, memory, and disk capacity, we want to know the maximum number of databases an AG can maintain healthy state without breaching resources limitation.

 

Configuration

Hardware

Test Client configuration: one standard L8s_v2 (8 vcpus, 64 GiB RAM) and three standard E2s v3 (2 vcpus, 16 GiB RAM).
Due to the limitation of core quota for current resource group we applied the L8s and E2s machines. We need multiple test clients in order to simulate multiple user drivers (up to 40) in the test, and for a single machine the user drivers can only be up to 10 due to named pipe limitations(used in user driver).

 

64 vCores test server configuration : Two standard E64s (64 vCPUs, RAM 432 GiB) VMs for one primary replica and one synchronous secondary replica AG.   Each machine has four P30 1Tb disks with read-only caching enabled in a simple storage pool (For data files, 5000 max IOPS and 200 MBPS throughput per disk * 4 = 20000 max IOPS and 800 MBPS throughput total) and two P30 1Tb disks with caching set to none in a simple storage pool (For log files, 5000 max IOPS and 200 MBPS throughput per disk * 2 = 10000 max IOPS and 400 MBPS throughput total).

 

128 vCores test server configuration: Two standard M128ms (128 vCPUs, 3892 GiB memory) for one primary replica and one synchronous secondary replica AG.  Each machine has eight P30 1Tb disks with read-only caching enabled in a simple storage pool (For data files, 5000 max IOPS and 200 MBPS throughput per disk * 8 = 40000 max IOPS and 1600 MBPS throughput total) and four P30 1Tb disks with caching set to none in a simple storage pool (For log files, 5000 max IOPS and 200 MBPS throughput per disk * 4 = 20000 max IOPS and 800 MBPS throughput total).

 

Software

OS version: Windows Server 2019

SQL Server version: SQL Server 2019 Enterprise Edition without additional trace flags

SQL Server Configurations: All databases including system database are on dedicated data and log disks Max SQL Server memory is set at 90% of available memory, and soft NUMA is enabled. Auto growth of databases is disabled.  Auto shrink of databases is also disabled.

 

AG types

AG configuration: One primary replica and one synchronous secondary replica

AG Databases:  

During the test some databases will receive workload, and some other will not receive workload

1) Databases not receiving workload: 523Mb per database, which is subset of 1K customer TPCE database, indices are removed and number of rows are reduced, no traffic will be performed on them.

2) Databases receiving workload: 23.8Gb per database, which is 1K customer TPCE database, assigned with TPCE traffic generated from our internal tool.

 

Traffic type

TPC-E traffic generated from internal tool. Every database receiving workload will be assigned with a driver engine which simulates 50 to 100 users’ traffic.  

 

Test Types

We performed two types of tests:

  1.  Static test: There is no workload traffic against the AG databases and we do multiple failovers (automatic and manual) with different number of databases configured in AG, to evaluate the failover success rate and failover time. 
  2. Dynamic test: There is TPC-E workload traffic against a certain percentage (5% and 10%) of AG databases, and we do failover during the traffic, to evaluate the failover success rate and failover time. 

Metrics

The most crucial metrics we evaluate after we place large number of databases in an AG are the failover success rate and failover time, while we also collect OLTP transaction rate of databases in AG. Besides them, we also collect the metrics of resource consumption including i) CPU usage ii) Disk io latency iii) secondary replica receiving rate iv) redo rate, to make sure they are under healthy and reasonable state during the test.

 

Test Result

Bellow are the test results of different number of AG databases scenarios:

A.64 vCores test

a.1 Static Test Result

# of AG databases

Failover success rate

Manual Failover

Automatic Failover

200

100%

AG level: 0.8 seconds, DB level: 2s seconds

AG level:0.8 second,  DB level : 5 seconds

400

100%

AG level: 1 seconds, DB level: 35 seconds

AG level: 1 second, DB level : 34 seconds

600

100%

AG level: 1.2 seconds, DB level: 58 seconds

AG level: 1.6 second,  DB level : 58 seconds

 

800

100%

AG level: 1.3 seconds, DB level: 256 seconds

AG level: 1 second,  DB level : 255 seconds

 

 

a.2 Dynamic Test Result

# of AG databases

Percent of AG databases in traffic

Failover Time

Metrics on Primary

Metrics on Secondary

Transactions per second

200

5%, 100 users’ traffic per dynamic database

AG level 1.3 second, DB level:  60 seconds

 

CPU usage: 17%

 

Avg disk queue length: 50

 

Receiving rate: 5Mb per second

Redo rate:  5Mb per second

 

Avg disk queue length: 21

 

252

 

200

10%, 100 users’ traffic per dynamic database

AG level: 0.8 second, DB level :180 seconds

CPU usage: 90%

Avg disk queue length: 98

 

Receiving rate: 8Mb per seconds

 

Redo rate: 8Mb per seconds

Avg disk queue length: 48

 

417.26

 

400

5%,100 users’ traffic per dynamic database

AG level: 2 seconds,  DB level : 228 seconds

CPU usage: 93%

Avg disk queue length: 105

 

Receiving rate: 8Mb per seconds

Redo rate: 8Mb per seconds

Avg disk queue length: 40

 

431.26

 

 

 

B.128 vCores test 

b.1 Static Test Result

# of AG databases

Failover success rate

Manual & Automatic Failover time

800

100%

AG level: 1.1 second

DB level:  184 seconds

 

1000

100%

AG level: 2.25 seconds

DB level: 567.5 seconds

 

b.2 Dynamic Test Result

 

# of AG databases

Percent of AG databases in traffic

Failover Time

Metrics on Primary

Metrics on Secondary

Transaction per second

800

5%, 50 users traffic per dynamic database

AG level: 2.9 seconds

DB level:  282 seconds

CPU usage: >95%

Avg disk queue length: 10

 

Receiving rate: 5.2 Mb per seconds

Redo rate:  5.2Mb per seconds

Avg disk queue length: 3

 

327.06

 

Test Summary

 

1.Based on static test result:

 

1.1 Failover time

When number of databases is in extremely high scale within a single AG(> 100), the more databases you have in an AG, the longer failover will take.

 

For customer if they have too many databases within an AG then they need to watch AG’s failover time since it might exceed their business requirements for RTO.

 

 

 

2.Based on dynamic test result:

 

2.1 Resource usage

The more databases you have in an AG, the more resources it takes to keep the AG healthy and process user transactions.

 

2.2 High traffic databases in AG

The more high traffic databases you have in an AG, the more resources it takes to keep the AG healthy and process user transactions, and also much longer failover time will be expected.

 

For Customer who is introducing AG technology to an existing set of databases,

Regarding 2.1, they need to increase the capacity of VM to accommodate both user traffic and system traffic generated by the AG synchronization.

 

Regarding 2.2, they need to be careful when there are many high traffic databases within single AG since it can lead to high resource usage and longer failover.

 

 

Test Customization

 

If you wish to perform your own experiment, here are some areas for consideration:

 

1)Test environment

You need to prepare test machines as test clients(where you generate traffic against test server) and test servers in which the AG cluster resides.
For the test client machine you need to make sure 1) it is compatible with test tool, 2) its capacity (CPU, memory and disk IO) can hold the traffic generation and 3) there is no high network latency between test client and test server.
For the test server machine you can choose the ones with the same capacity as the machines used in production environment thus can get an accurate estimation of test result as reference.
For the software specs you can refer test configuration in this blog.

 

2)Test type
You can customize the test plan based on what's your concern in business scenario. In this test our focus is to evaluate the AG performance and stability, in the scenario that large amount of AG databases
hold in single AG with small percent of them have traffic. Depending on what you need to evaluate, you can schedule your own specific test, for example you want to know if AG can sustain with online index build operation on
a big table resides in AG DB, when there is a high traffic against AG. Then your test can be : in test client, schedule traffic (for example OLTP) against AG DB in test server, and write a job to run online index build against
the same AG DB, then to monitor AG traffic changes, time costed in online index build, AG health state and system resource usage state.


3)Test metrics

From the resource usage perspective, you can monitor CPU usage, memory usage, disk io throughput and network throughput in all AG replicas.

 

From the performance perspective, you can monitor transaction rate, secondary replica log receiving rate and redo rate, secondary read traffic process rate, below is AG performance monitor practice reference:
https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/monitor-performance...

 

From the stability perspective, you can evaluate success rate and the time takes of automatic and manually failover.

 

Reference

Tutorial: Prerequisites for an availability group - SQL Server on Azure VM | Microsoft Docs

Tutorial: Configure a SQL Server Always On availability group - SQL Server on Azure VM | Microsoft D...

Performance guidelines for SQL Server in Azure - SQL Server on Azure VM | Microsoft Docs

TPC-E Homepage

https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/monitor-performance...

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2144615%22%20slang%3D%22en-US%22%3ESQL%20Server%20Always%20on%20Availability%20Group%20Scalability%20Experiment%20and%20Result%20on%20Azure%20VM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2144615%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EIntroduction%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20purpose%20of%20this%20scalability%20experiment%20is%20to%20evaluate%20the%20performance%20of%20AG%20cluster%20when%20it%20has%20large%20number%20of%20databases%20and%20some%20of%20the%20databases%20undergo%20large%20amount%20of%20traffic%2C%20and%20measure%201)%20OLTP%20transaction%20performance%2C%202)%20Failover%20success%20rate%20and%20time%2C%20and%203)%20Resource%20consumption%2C%20such%20that%20we%20can%20provide%20reference%20for%20customer%E2%80%99s%20large%20scale%20AG%20cluster%20configuration%20based%20on%20the%20experiment%20result.%20For%20an%20AG%20cluster%2C%20based%20on%20the%20specific%20configuration%20of%20CPU%20cores%2C%20memory%2C%20and%20disk%20capacity%2C%20we%20want%20to%20know%20the%20maximum%20number%20of%20databases%20an%20AG%20can%20maintain%20healthy%20state%20without%20breaching%20resources%20limitation.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EConfiguration%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHardware%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ETest%20Client%20configuration%3A%20one%26nbsp%3Bstandard%20L8s_v2%20(8%20vcpus%2C%2064%20GiB%20RAM)%20and%20three%26nbsp%3Bstandard%20E2s%20v3%20(2%20vcpus%2C%2016%20GiB%20RAM).%3CBR%20%2F%3EDue%20to%20the%20limitation%20of%20core%20quota%20for%20current%20resource%20group%20we%20applied%20the%20L8s%20and%20E2s%20machines.%20We%20need%20multiple%20test%20clients%20in%20order%20to%20simulate%20multiple%20user%20drivers%20(up%20to%2040)%20in%20the%20test%2C%20and%20for%20a%20single%20machine%20the%20user%20drivers%20can%20only%20be%20up%20to%2010%20due%20to%20named%20pipe%20limitations(used%20in%20user%20driver).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E64%20vCores%20test%20server%20configuration%20%3A%20Two%20standard%20E64s%20(64%20vCPUs%2C%20RAM%20432%20GiB)%20VMs%20for%20one%20primary%20replica%20and%20one%20synchronous%20secondary%20replica%20AG.%26nbsp%3B%26nbsp%3B%20Each%20machine%20has%20four%20P30%201Tb%20disks%20with%20read-only%20caching%20enabled%20in%20a%20simple%20storage%20pool%20(For%20data%20files%2C%205000%20max%20IOPS%20and%20200%20MBPS%20throughput%20per%20disk%20*%204%20%3D%2020000%20max%20IOPS%20and%20800%20MBPS%20throughput%20total)%20and%20two%20P30%201Tb%20disks%20with%20caching%20set%20to%20none%20in%20a%20simple%20storage%20pool%20(For%20log%20files%2C%205000%20max%20IOPS%20and%20200%20MBPS%20throughput%20per%20disk%20*%202%20%3D%2010000%20max%20IOPS%20and%20400%20MBPS%20throughput%20total).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E128%20vCores%20test%20server%20configuration%3A%20Two%20standard%20M128ms%20(128%20vCPUs%2C%203892%20GiB%20memory)%20for%20one%20primary%20replica%20and%20one%20synchronous%20secondary%20replica%20AG.%26nbsp%3B%20Each%20machine%20has%20eight%20P30%201Tb%20disks%20with%20read-only%20caching%20enabled%20in%20a%20simple%20storage%20pool%20(For%20data%20files%2C%205000%20max%20IOPS%20and%20200%20MBPS%20throughput%20per%20disk%20*%208%20%3D%2040000%20max%20IOPS%20and%201600%20MBPS%20throughput%20total)%20and%20four%20P30%201Tb%20disks%20with%20caching%20set%20to%20none%20in%20a%20simple%20storage%20pool%20(For%20log%20files%2C%205000%20max%20IOPS%20and%20200%20MBPS%20throughput%20per%20disk%20*%204%20%3D%2020000%20max%20IOPS%20and%20800%20MBPS%20throughput%20total).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESoftware%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EOS%20version%3A%20Windows%20Server%202019%3C%2FP%3E%0A%3CP%3ESQL%20Server%20version%3A%20SQL%20Server%202019%20Enterprise%20Edition%20without%20additional%20trace%20flags%3C%2FP%3E%0A%3CP%3ESQL%20Server%20Configurations%3A%20All%20databases%20including%20system%20database%20are%20on%20dedicated%20data%20and%20log%20disks%20Max%20SQL%20Server%20memory%20is%20set%20at%2090%25%20of%20available%20memory%2C%20and%20soft%20NUMA%20is%20enabled.%20Auto%20growth%20of%20databases%20is%20disabled.%26nbsp%3B%20Auto%20shrink%20of%20databases%20is%20also%20disabled.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAG%20types%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EAG%20configuration%3A%20One%20primary%20replica%20and%20one%20synchronous%20secondary%20replica%3C%2FP%3E%0A%3CP%3EAG%20Databases%3A%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDuring%20the%20test%20some%20databases%20will%20receive%20workload%2C%20and%20some%20other%20will%20not%20receive%20workload%3C%2FP%3E%0A%3CP%3E1)%20Databases%20not%20receiving%20workload%3A%20523Mb%20per%20database%2C%20which%20is%20subset%20of%201K%20customer%20TPCE%20database%2C%20indices%20are%20removed%20and%20number%20of%20rows%20are%20reduced%2C%20no%20traffic%20will%20be%20performed%20on%20them.%3C%2FP%3E%0A%3CP%3E2)%20Databases%20receiving%20workload%3A%2023.8Gb%20per%20database%2C%20which%20is%201K%20customer%20TPCE%20database%2C%20assigned%20with%20TPCE%20traffic%20generated%20from%20our%20internal%20tool.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETraffic%20type%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ETPC-E%20traffic%20generated%20from%20internal%20tool.%20Every%20database%20receiving%20workload%20will%20be%20assigned%20with%20a%20driver%20engine%20which%20simulates%2050%20to%20100%20users%E2%80%99%20traffic.%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETest%20Types%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EWe%20performed%20two%20types%20of%20tests%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%26nbsp%3BStatic%20test%3A%20There%20is%20no%20workload%20traffic%20against%20the%20AG%20databases%20and%20we%20do%20multiple%20failovers%20(automatic%20and%20manual)%20with%20different%20number%20of%20databases%20configured%20in%20AG%2C%20to%20evaluate%20the%20failover%20success%20rate%20and%20failover%20time.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EDynamic%20test%3A%20There%20is%20TPC-E%20workload%20traffic%20against%20a%20certain%20percentage%20(5%25%20and%2010%25)%20of%20AG%20databases%2C%20and%20we%20do%20failover%20during%20the%20traffic%2C%20to%20evaluate%20the%20failover%20success%20rate%20and%20failover%20time.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSTRONG%3EMetrics%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20most%20crucial%20metrics%20we%20evaluate%20after%20we%20place%20large%20number%20of%20databases%20in%20an%20AG%20are%20the%20failover%20success%20rate%20and%20failover%20time%2C%20while%20we%20also%20collect%20OLTP%20transaction%20rate%20of%20databases%20in%20AG.%20Besides%20them%2C%20we%20also%20collect%20the%20metrics%20of%20resource%20consumption%20including%20i)%20CPU%20usage%20ii)%20Disk%20io%20latency%20iii)%20secondary%20replica%20receiving%20rate%20iv)%20redo%20rate%2C%20to%20make%20sure%20they%20are%20under%20healthy%20and%20reasonable%20state%20during%20the%20test.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETest%20Result%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EBellow%20are%20the%20test%20results%20of%20different%20number%20of%20AG%20databases%20scenarios%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EA.64%20vCores%20test%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3Ea.1%20Static%20Test%20Result%3C%2FP%3E%0A%3CTABLE%20width%3D%22696%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22108%22%3E%3CP%3E%23%20of%20AG%20databases%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EFailover%20success%20rate%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22246%22%3E%3CP%3EManual%20Failover%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22240%22%3E%3CP%3EAutomatic%20Failover%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22108%22%3E%3CP%3E200%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E100%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22246%22%3E%3CP%3EAG%20level%3A%200.8%20seconds%2C%20DB%20level%3A%202s%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22240%22%3E%3CP%3EAG%20level%3A0.8%20second%2C%20%26nbsp%3BDB%20level%20%3A%205%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22108%22%3E%3CP%3E400%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E100%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22246%22%3E%3CP%3EAG%20level%3A%201%20seconds%2C%20DB%20level%3A%2035%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22240%22%3E%3CP%3EAG%20level%3A%201%20second%2C%20DB%20level%20%3A%2034%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22108%22%3E%3CP%3E600%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E100%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22246%22%3E%3CP%3EAG%20level%3A%201.2%20seconds%2C%20DB%20level%3A%2058%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22240%22%3E%3CP%3EAG%20level%3A%201.6%20second%2C%20%26nbsp%3BDB%20level%20%3A%2058%20seconds%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22108%22%3E%3CP%3E800%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E100%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22246%22%3E%3CP%3EAG%20level%3A%201.3%20seconds%2C%20DB%20level%3A%20256%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22240%22%3E%3CP%3EAG%20level%3A%201%20second%2C%20%26nbsp%3BDB%20level%20%3A%20255%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3Ea.2%20Dynamic%20Test%20Result%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E%23%20of%20AG%20databases%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EPercent%20of%20AG%20databases%20in%20traffic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EFailover%20Time%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EMetrics%20on%20Primary%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EMetrics%20on%20Secondary%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22113%22%3E%3CP%3ETransactions%20per%20second%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E200%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E5%25%2C%20100%20users%E2%80%99%20traffic%20per%20dynamic%20database%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EAG%20level%201.3%20second%2C%20DB%20level%3A%26nbsp%3B%2060%20seconds%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3ECPU%20usage%3A%2017%25%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAvg%20disk%20queue%20length%3A%2050%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EReceiving%20rate%3A%205Mb%20per%20second%3C%2FP%3E%0A%3CP%3ERedo%20rate%3A%20%26nbsp%3B5Mb%20per%20second%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAvg%20disk%20queue%20length%3A%2021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22113%22%3E%3CP%3E252%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E200%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E10%25%2C%20100%20users%E2%80%99%20traffic%20per%20dynamic%20database%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EAG%20level%3A%200.8%20second%2C%20DB%20level%20%3A180%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3ECPU%20usage%3A%2090%25%3C%2FP%3E%0A%3CP%3EAvg%20disk%20queue%20length%3A%2098%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EReceiving%20rate%3A%208Mb%20per%20seconds%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERedo%20rate%3A%208Mb%20per%20seconds%3C%2FP%3E%0A%3CP%3EAvg%20disk%20queue%20length%3A%2048%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22113%22%3E%3CP%3E417.26%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E400%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3E5%25%2C100%20users%E2%80%99%20traffic%20per%20dynamic%20database%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EAG%20level%3A%202%20seconds%2C%20%26nbsp%3BDB%20level%20%3A%20228%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3ECPU%20usage%3A%2093%25%3C%2FP%3E%0A%3CP%3EAvg%20disk%20queue%20length%3A%20105%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22102%22%3E%3CP%3EReceiving%20rate%3A%208Mb%20per%20seconds%3C%2FP%3E%0A%3CP%3ERedo%20rate%3A%208Mb%20per%20seconds%3C%2FP%3E%0A%3CP%3EAvg%20disk%20queue%20length%3A%2040%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22113%22%3E%3CP%3E431.26%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EB.128%20vCores%20test%3C%2FSTRONG%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eb.1%20Static%20Test%20Result%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22144%22%3E%3CP%3E%23%20of%20AG%20databases%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22186%22%3E%3CP%3EFailover%20success%20rate%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22204%22%3E%3CP%3EManual%20%26amp%3B%20Automatic%20Failover%20time%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22144%22%3E%3CP%3E800%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22186%22%3E%3CP%3E100%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22204%22%3E%3CP%3EAG%20level%3A%201.1%20second%3C%2FP%3E%0A%3CP%3EDB%20level%3A%26nbsp%3B%20184%20seconds%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22144%22%3E%3CP%3E1000%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22186%22%3E%3CP%3E100%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22204%22%3E%3CP%3EAG%20level%3A%202.25%20seconds%3C%2FP%3E%0A%3CP%3EDB%20level%3A%20567.5%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eb.2%20Dynamic%20Test%20Result%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20width%3D%22630%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3E%23%20of%20AG%20databases%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3EPercent%20of%20AG%20databases%20in%20traffic%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3EFailover%20Time%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3EMetrics%20on%20Primary%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3EMetrics%20on%20Secondary%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22110%22%3E%3CP%3ETransaction%20per%20second%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3E800%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3E5%25%2C%2050%20users%20traffic%20per%20dynamic%20database%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3EAG%20level%3A%202.9%20seconds%3C%2FP%3E%0A%3CP%3EDB%20level%3A%26nbsp%3B%20282%20seconds%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3ECPU%20usage%3A%20%26gt%3B95%25%3C%2FP%3E%0A%3CP%3EAvg%20disk%20queue%20length%3A%2010%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%3CP%3EReceiving%20rate%3A%205.2%20Mb%20per%20seconds%3C%2FP%3E%0A%3CP%3ERedo%20rate%3A%20%26nbsp%3B5.2Mb%20per%20seconds%3C%2FP%3E%0A%3CP%3EAvg%20disk%20queue%20length%3A%203%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22110%22%3E%3CP%3E327.06%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETest%20Summary%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E1.Based%20on%20static%20test%20result%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.1%20Failover%20time%3C%2FP%3E%0A%3CP%3EWhen%20number%20of%20databases%20is%20in%20extremely%20high%20scale%20within%20a%20single%20AG(%26gt%3B%20100)%2C%20the%20more%20databases%20you%20have%20in%20an%20AG%2C%20the%20longer%20failover%20will%20take.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20customer%20if%20they%20have%20too%20many%20databases%20within%20an%20AG%20then%20they%20need%20to%20watch%20AG%E2%80%99s%20failover%20time%20since%20it%20might%20exceed%20their%20business%20requirements%20for%20RTO.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2.Based%20on%20dynamic%20test%20result%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2.1%20Resource%20usage%3C%2FP%3E%0A%3CP%3EThe%20more%20databases%20you%20have%20in%20an%20AG%2C%20the%20more%20resources%20it%20takes%20to%20keep%20the%20AG%20healthy%20and%20process%20user%20transactions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2.2%20High%20traffic%20databases%20in%20AG%3C%2FP%3E%0A%3CP%3EThe%20more%20high%20traffic%20databases%20you%20have%20in%20an%20AG%2C%20the%20more%20resources%20it%20takes%20to%20keep%20the%20AG%20healthy%20and%20process%20user%20transactions%2C%20and%20also%20much%20longer%20failover%20time%20will%20be%20expected.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20Customer%20who%20is%20introducing%20AG%20technology%20to%20an%20existing%20set%20of%20databases%2C%3C%2FP%3E%0A%3CP%3ERegarding%202.1%2C%20they%20need%20to%20increase%20the%20capacity%20of%20VM%20to%20accommodate%20both%20user%20traffic%20and%20system%20traffic%20generated%20by%20the%20AG%20synchronization.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegarding%202.2%2C%20they%20need%20to%20be%20careful%20when%20there%20are%20many%20high%20traffic%20databases%20within%20single%20AG%20since%20it%20can%20lead%20to%20high%20resource%20usage%20and%20longer%20failover.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETest%20Customization%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20wish%20to%20perform%20your%20own%20experiment%2C%20here%20are%20some%20areas%20for%20consideration%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E1)Test%20environment%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EYou%20need%20to%20prepare%20test%20machines%20as%20test%20clients(where%20you%20generate%20traffic%20against%20test%20server)%20and%20test%20servers%20in%20which%20the%20AG%20cluster%20resides.%3CBR%20%2F%3EFor%20the%20test%20client%20machine%20you%20need%20to%20make%20sure%201)%20it%20is%20compatible%20with%20test%20tool%2C%202)%20its%20capacity%20(CPU%2C%20memory%20and%20disk%20IO)%20can%20hold%20the%20traffic%20generation%20and%203)%20there%20is%20no%20high%20network%20latency%20between%20test%20client%20and%20test%20server.%3CBR%20%2F%3EFor%20the%20test%20server%20machine%20you%20can%20choose%20the%20ones%20with%20the%20same%20capacity%20as%20the%20machines%20used%20in%20production%20environment%20thus%20can%20get%20an%20accurate%20estimation%20of%20test%20result%20as%20reference.%3CBR%20%2F%3EFor%20the%20software%20specs%20you%20can%20refer%20test%20configuration%20in%20this%20blog.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E2)Test%20type%3C%2FSTRONG%3E%3CBR%20%2F%3EYou%20can%20customize%20the%20test%20plan%20based%20on%20what's%20your%20concern%20in%20business%20scenario.%20In%20this%20test%20our%20focus%20is%20to%20evaluate%20the%20AG%20performance%20and%20stability%2C%20in%20the%20scenario%20that%20large%20amount%20of%20AG%20databases%3CBR%20%2F%3Ehold%20in%20single%20AG%20with%20small%20percent%20of%20them%20have%20traffic.%20Depending%20on%20what%20you%20need%20to%20evaluate%2C%20you%20can%20schedule%20your%20own%20specific%20test%2C%20for%20example%20you%20want%20to%20know%20if%20AG%20can%20sustain%20with%20online%20index%20build%20operation%20on%3CBR%20%2F%3Ea%20big%20table%20resides%20in%20AG%20DB%2C%20when%20there%20is%20a%20high%20traffic%20against%20AG.%20Then%20your%20test%20can%20be%20%3A%20in%20test%20client%2C%20schedule%20traffic%20(for%20example%20OLTP)%20against%20AG%20DB%20in%20test%20server%2C%20and%20write%20a%20job%20to%20run%20online%20index%20build%20against%3CBR%20%2F%3Ethe%20same%20AG%20DB%2C%20then%20to%20monitor%20AG%20traffic%20changes%2C%20time%20costed%20in%20online%20index%20build%2C%20AG%20health%20state%20and%20system%20resource%20usage%20state.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3E3)Test%20metrics%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EFrom%20the%20resource%20usage%20perspective%2C%20you%20can%20monitor%20CPU%20usage%2C%20memory%20usage%2C%20disk%20io%20throughput%20and%20network%20throughput%20in%20all%20AG%20replicas.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%20the%20performance%20perspective%2C%20you%20can%20monitor%20transaction%20rate%2C%20secondary%20replica%20log%20receiving%20rate%20and%20redo%20rate%2C%20secondary%20read%20traffic%20process%20rate%2C%20below%20is%20AG%20performance%20monitor%20practice%20reference%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fdatabase-engine%2Favailability-groups%2Fwindows%2Fmonitor-performance-for-always-on-availability-groups%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fdatabase-engine%2Favailability-groups%2Fwindows%2Fmonitor-performance...%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%20the%20stability%20perspective%2C%20you%20can%20evaluate%20success%20rate%20and%20the%20time%20takes%20of%20automatic%20and%20manually%20failover.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EReference%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Favailability-group-manually-configure-prerequisites-tutorial%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ETutorial%3A%20Prerequisites%20for%20an%20availability%20group%20-%20SQL%20Server%20on%20Azure%20VM%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Favailability-group-manually-configure-tutorial%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ETutorial%3A%20Configure%20a%20SQL%20Server%20Always%20On%20availability%20group%20-%20SQL%20Server%20on%20Azure%20VM%20%7C%20Microsoft%20D...%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Fperformance-guidelines-best-practices%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPerformance%20guidelines%20for%20SQL%20Server%20in%20Azure%20-%20SQL%20Server%20on%20Azure%20VM%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.tpc.org%2Ftpce%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ETPC-E%20Homepage%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fdatabase-engine%2Favailability-groups%2Fwindows%2Fmonitor-performance-for-always-on-availability-groups%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fdatabase-engine%2Favailability-groups%2Fwindows%2Fmonitor-performance...%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2144615%22%20slang%3D%22en-US%22%3E%3CP%3EToday%20to%20meet%20the%20demands%20of%20fast%20business%20growth%2C%20many%20Tier%201%20customers%20need%20to%20configure%20their%20Always%20On%20Availability%20Groups%20(AG)%20with%20several%20hundred%20or%20more%20databases%2C%20and%20in%20recent%20years%20with%20the%20massive%20improvements%20of%20hardware%20technology%20they%20are%20now%20able%20to%20do%20it.%20Customers%20often%20ask%20how%20many%20databases%20they%20can%20place%20in%20an%20Always%20On%20Availability%20Group.%20This%20article%20shares%20the%20information%20and%20learning%20from%20our%20experiment%20of%20placing%20large%20number%20of%20databases%20within%20an%20AG%2C%20based%20on%20scalability%20test%20with%20high%20end%20Azure%20virtual%20machines%20(E64s%20and%20M128ms)%2C%20with%20TPCE%20workload%20simulating%20customer%E2%80%99s%20scenarios.%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2144615%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerAlwaysOn%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESQLServerAzureVM%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Feb 21 2021 01:14 PM
Updated by: