Normalized RU Consumption metrics calculation for Azure Cosmos

Debajit Mitra 20 Reputation points
2024-07-10T04:08:39.6933333+00:00

Hi,

I was trying to understand the different metrics available in azure portal for Azure Cosmos resource. There is one metric named as "Normalized RU Consumption(Max)" , I would like to understand how this percentage is calculated over a given period of time.

I am aware that this metric provides the maximum RU/s utilization across all partition key ranges in the time interval, but would like to know the exact formula we are using to calculate this.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,631 questions
{count} votes

2 answers

Sort by: Most helpful
  1. ShaktiSingh-MSFT 15,301 Reputation points
    2024-07-10T06:36:53.18+00:00

    Hi Debajit Mitra •,

    Welcome to Microsoft Q&A forum.

    As I understand, you want to know calculation of the metrics Normalized RU Consumption.

    The Normalized RU Consumption metric is a metric between 0% to 100% that is used to help measure the utilization of provisioned throughput on a database or container. The metric is emitted at 1 minute intervals and is defined as the maximum RU/s utilization across all partition key ranges in the time interval. Each partition key range maps to one physical partition and is assigned to hold data for a range of possible hash values. In general, the higher the Normalized RU percentage, the more you've utilized your provisioned throughput. The metric can also be used to view the utilization of individual partition key ranges on a database or container.

    For example, suppose you have a container where you set autoscale max throughput of 20,000 RU/s (scales between 2000 - 20,000 RU/s) and you have two partition key ranges (physical partitions) P1 and P2. Because Azure Cosmos DB distributes the provisioned throughput equally across all the partition key ranges, P1 and P2 each can scale between 1000 - 10,000 RU/s. Suppose in a 1 minute interval, in a given second, P1 consumed 6000 request units and P2 consumed 8000 request units. The normalized RU consumption of P1 is 60% and 80% for P2. The overall normalized RU consumption of the entire container is MAX(60%, 80%) = 80%.

    Refer https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-normalized-request-units for more details.

    Hope this helps. Let us know if you have more queries.

    Thanks.

    0 comments No comments

  2. ShaktiSingh-MSFT 15,301 Reputation points
    2024-07-17T03:39:47.04+00:00

    Hi Debajit Mitra •,

    We have got the below reply from the internal team on your follow-up question:

    NormalizedRUConsumption metric shows a percentage calculated by consumed RU / provisioned RU per replica in every minute.

    On Azure Portal, it is showing the max percentage and the maximum value is 100%.

    Please refer to the following public document for how the metric is emitted.

    The customer can also find detail information about the RU consumption per partition after enabling the diagnostic logs for Partition key RU consumption.  Please also find the information from the same document:

    This should help.

    If you have more in-depth queries, we recommend you to raise support case.

    Thanks


Your answer

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