[转载] AZURE SQL数据库"DTU百分比"度量标准

DTU是服务层性能的度量单位,是几个数据库特征的总结。 每个服务层都有一定数量的DTU分配给它,作为比较一层与另一层性能水平的简单方法。

数据库吞吐量单元(DTU): DTU提供了一种方式来描述基本,标准和高级数据库性能级别的相对容量。 DTU基于CPU,内存,读取和写入的混合度量。 随着DTU的增加,性能水平提供的功率也会增加。 例如,具有5个DTU的性能等级比具有1个DTU的性能等级高5倍。 最大DTU配额适用于每台服务器。

Database Throughput Unit (DTU): DTUs provide a way to describe the relative capacity of a performance level of Basic, Standard, and Premium databases. DTUs are based on a blended measure of CPU, memory, reads, and writes. As DTUs increase, the power offered by the performance level increases. For example, a performance level with 5 DTUs has five times more power than a performance level with 1 DTU. A maximum DTU quota applies to each server.

DTU限额适用于服务器,而不是单个数据库,每个服务器最多有1600个DTU。 DTU%是特定数据库使用的单位的百分比,看起来这个数字可以超过服务层(我假定服务器的限制)的DTU等级的100%。 此百分比数字旨在帮助您select适当的服务层。

例如,如果您的DTU消耗显示80%的值,则表明它正在以S2数据库将具有的限制的80%的比率消耗DTU。 如果您在此视图中看到的值大于100%,则意味着您需要大于S2的性能级别。

举一个例子,假设你看到一个百分比值为300%。 这告诉你,你使用的资源比S2中多出三倍。 要确定合理的起始大小,请将S2(50个DTU)中可用的DTU与下一个更高大小(P1 = 100个DTU,或者S2的200%,P2 = 200个DTU或S2的400%)进行比较。 因为你是S2的300%,所以你想从P2开始并重新testing。

For example, if your DTU consumption shows a value of 80%, it indicates it is consuming DTU at the rate of 80% of the limit an S2 database would have. If you see values greater than 100% in this view it means that you need a performance tier larger than S2.

As an example, let’s say you see a percentage value of 300%. This tells you that you are using three times more resources than would be available in an S2. To determine a reasonable starting size, compare the DTUs available in an S2 (50 DTUs) with the next higher sizes (P1 = 100 DTUs, or 200% of S2, P2 = 200 DTUs or 400% of S2). Because you are at 300% of S2 you would want to start with a P2 and re-test.

在这个文档中提到,DTU百分比是由这个查询决定的:

SELECT end_time, (SELECT Max(v) FROM (VALUES (avg_cpu_percent), (avg_data_io_percent), (avg_log_write_percent)) AS value(v)) AS [avg_DTU_percent] FROM sys.dm_db_resource_stats; 

看起来像avg_cpu_percent , avg_data_io_percentavg_log_write_percent

 

参考:

https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-resource-stats-azure-sql-database

posted @ 2023-11-06 14:15  YukiRinLL  阅读(10)  评论(0编辑  收藏  举报