LOG_RATE_GOVERNOR Wait Stat

clip art of 
 a double-quote character

Question

I’m noticing this wait stat on my Azure SQL database, and I’ve never seen it before. I’ve tried Googling this wait stat but haven’t been able to come up with any good information on what this is, although I saw a couple mentions of it possibly being related to exceeding the Azure performance tier set for the database.

asked 2017-09-18 by Randy Minder


Answer

The different service tiers of Azure SQL Database are limited by DTUs. Microsoft guarantees a minimum level of resources, which they compute as DTUs. The documentation provides the definition for a DTU as (emphasis mine):

This amount of resources is calculated as a number of Database
Transaction Units or DTUs, and is a blended measure of CPU, memory,
I/O (data and transaction log I/O). The ratio amongst these resources
was originally determined by an OLTP benchmark workload designed to be
typical of real-world OLTP workloads.

If you are seeing LOG_RATE_GOVERNOR waits, then you are bumping into the limits imposed on transaction log I/O by your performance tier.

If this wait is impacting performance negatively, you would need to either increase your service tier, or update your code to perform fewer writes. If you have one process that is IO intensive, you could throttle it yourself so that you leave transaction log IOs available for other processes before hitting the limit imposed by your SQL DB service tier.

I wrote a blog post where I used the DTU Calculator to estimate how each of these performance metrics combine to affect the DTU calculation. You may find that helpful in understanding how different types of load are “blended” into the DTU limits.

answered 2017-09-18 by Andy Mallon