Max number of Databases in a AG group

sakuraime 2,316 Reputation points
2020-11-05T02:22:11.48+00:00

Are there any limit of Max number of Databases in a AG group? Putting many databases in a Single AG group has any consideration ?
like many log send queue/ redo threads ???

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,654 questions
{count} votes

Accepted answer
  1. m 4,271 Reputation points
    2020-11-05T03:37:15.64+00:00

    Hi @sakuraime ,

    Are there any limit of Max number of Databases in a AG group?

    Suggestion: Better no more than 100 in one AG.

    Quote from this case: availability-groups-limits
    There is as such no limit defined. Microsoft has tested only upto 10 AG and 100 Databases. If you want to create more AGS, You will have to do so and test the workload you have to see that you do not land into performance issues for same.

    Maximum number of availability groups and availability databases per computer: The actual number of databases and availability groups you can put on a computer (VM or physical) depends on the hardware and workload, but there is no enforced limit. Microsoft has extensively tested with 10 AGs and 100 DBs per physical machine. Signs of overloaded systems can include, but are not limited to, worker thread exhaustion, slow response times for availability group system views and DMVs, and/or stalled dispatcher system dumps. Please make sure to thoroughly test your environment with a production-like workload to ensure it can handle peak workload capacity within your application SLAs. When considering SLAs be sure to consider load under failure conditions as well as expected response times.

    More information: sql-server-alwayson-number-of-databases-and-the-hadr-worker-pool

    Putting many databases in a Single AG group has any consideration ?>like many log send queue/ redo threads ???

    Yes. You are right. You need to consider more about its threads.

    Quote from this doc.: prereqs-restrictions-recommendations-always-on-availability
    ...
    A SQL Server instance uses up to 100 threads for parallel redo for secondary replicas. Each database uses up to one-half of the total number of CPU cores, but not more than 16 threads per database. If the total number of required threads for a single instance exceeds 100, SQL Server uses a single redo thread for every remaining database. Serial Redo threads are released after ~15 seconds of inactivity.
    ...

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.


1 additional answer

Sort by: Most helpful
  1. m 4,271 Reputation points
    2020-11-05T05:12:54.057+00:00

    Hi @sakuraime ,

    Is the reply helpful?

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.