简体   繁体   中英

Azure SQL Database DTU metrics

I'm using Azure's metrics chart to see if it's feasible to merge two databases into one Pool. The two databases are currently in tier S3.

The first chart is the result with "DTU Used" metric using MAX() aggregation function in the last 30 days. It can be observed that during several intervals the "DTU Used" reached close to 100.

The second is the result with "DTU Used" metric using SUM () aggregation function. The period is the same of the first chart.

I found it strange because observing the second chart it seems that there have never been such peaks of use close to 100. Even the sum of "DTU Used" of the two bases seems to never have reached 40.

在此输入图像描述

I'm a bit confused by the graphics interpretation, should I trust the second, where it seems feasible to join theses two databases in one 100 eDTU Pool?

And what would be the best way to set Azure SQL Database metrics chart to do this analysis?

Max() return the max value in the time period.

Sum() return the sum of average in the time period. For a single database's DTU-uesed, SUM() and Avg() return the same results.

Given that the granularity is 1 minute and DTU-used touched 100% only in 1 second and 60% in other 59 seconds, the functions return as below:

Max: 100%

Sum(Avg): (100 + 59 * 60) / 60 = 61.7%

Elastic pools are suited for databases which have different usage pattern.

It seems that you should consider to size down, not to migrate to elastic pool.

For more details, please refer to the following:

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool#when-should-you-consider-a-sql-database-elastic-pool

Please note that DTU chart shown by default on the database overview blade renders the aggregated metrics and it is by default shown with 1 hour granularity.

For a more granular metric, within the database menu go to Monitoring, then Metrics, and in there build your own CPU chart - select CPU, and under 24hrs you will have an option "Time granularity" - chose this to be 1 minute, go Apply.

Also note that you can chose CPU max/min and average within that 1 minute. As 1 minute (60 seconds) is the finest granularity, if you chose for example max, if the CPU has touched 100% even for 1 second, it will be shown 100% for that entire minute. Perhaps the best is to use the Average. In this case the average CPU utilization from 60 seconds will be shown under that 1 minute metric.

I hope this helps in understanding how DTU metrics chart works in terms of showing aggregate values within the selected time period, and also how to customize it to show the finer granularity of 1 minute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM