Always-on Parallel Redo Thread

sakuraime 2,351 Reputation points
2021-01-27T03:00:42.347+00:00

https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/prereqs-restrictions-recommendations-always-on-availability?view=sql-server-ver15

"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."

So if there are 2 and more AGs in a secondary replica , so it still using 100 thread maximum per that SQL instance ?

are there parallel log send thread on primary replica ?

SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. CathyJi-MSFT 22,406 Reputation points Microsoft External Staff
    2021-01-27T10:06:05.01+00:00

    Hi @sakuraime ,

    >So if there are 2 and more AGs in a secondary replica , so it still using 100 thread maximum per that SQL instance ?

    Yes. A SQL Server instance uses up to 100 threads for parallel redo.

    > are there parallel log send thread on primary replica ?

    No, log send thread is single thread.

    Bes regards,
    Cathy


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.