简体   繁体   English

Azure SQL数据库DTU指标

[英]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. 我正在使用Azure的度量标准图表来查看将两个数据库合并到一个池中是否可行。 The two databases are currently in tier S3. 这两个数据库目前处于S3级。

The first chart is the result with "DTU Used" metric using MAX() aggregation function in the last 30 days. 第一个图表是过去30天内使用MAX()聚合函数的“使用DTU”指标的结果。 It can be observed that during several intervals the "DTU Used" reached close to 100. 可以观察到,在几个间隔期间,“使用的DTU”达到接近100。

The second is the result with "DTU Used" metric using SUM () aggregation function. 第二个是使用SUM()聚合函数的“使用DTU”度量的结果。 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. 我发现它很奇怪,因为观察第二张图表似乎从来没有接近100的使用峰值。即使两个基地的“DTU使用”的总和似乎从未达到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? 我对图形解释感到有点困惑,我应该相信第二个,在一个100 eDTU池中加入这两个数据库似乎是可行的吗?

And what would be the best way to set Azure SQL Database metrics chart to do this analysis? 设置Azure SQL数据库指标图表进行此分析的最佳方法是什么?

Max() return the max value in the time period. Max()返回时间段内的最大值。

Sum() return the sum of average in the time period. Sum()返回时间段内的平均值之和。 For a single database's DTU-uesed, SUM() and Avg() return the same results. 对于单个数据库的DTU-uesed,SUM()和Avg()返回相同的结果。

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: 假设粒度为1分钟且DTU使用仅在1秒内触及100%而在其他59秒内触及60%,则函数返回如下:

Max: 100% 最大:100%

Sum(Avg): (100 + 59 * 60) / 60 = 61.7% 总和(平均):( 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 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. 请注意,数据库概述刀片上默认显示的DTU图表呈现聚合度量标准,默认情况下显示为1小时粒度。

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. 对于更精细的度量,在数据库菜单中转到Monitoring,然后是Metrics,并在那里构建自己的CPU图表 - 选择CPU,在24小时内,您将有一个选项“Time granularity” - 选择此为1分钟,go应用。

Also note that you can chose CPU max/min and average within that 1 minute. 另请注意,您可以在1分钟内选择CPU最大/分钟和平均值。 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. 由于1分钟(60秒)是最精细的粒度,如果您选择例如max,如果CPU已经触及100%甚至1秒,则整个分钟将显示100%。 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. 在这种情况下,60秒的平均CPU利用率将显示在该1分钟指标下。

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. 我希望这有助于理解DTU指标图表在所选时间段内显示聚合值的方式,以及如何自定义它以显示1分钟的更精细粒度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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