Question about some metrics azure sql database and elasticpool

Son Cao Thanh 41 Reputation points
2020-11-30T15:13:31.87+00:00

Hi support team,
With vcore model, have some metrics: cpu_used and cpu_limit. The alert with them with thresh hold count by number. But i'm not find anydocs tell about this count.
Cpu_used/cpu_limit alert when the provisioned compute tier or serverless compute tier higher than thresh hold count? What's maximum of cpu with vcore model? How can I check my cpu used?
Same question with azure sql elasticpool.

Best.

Azure SQL Database
{count} votes

Accepted answer
  1. Navtej Singh Saini 4,226 Reputation points Microsoft Employee
    2020-12-10T01:04:18.443+00:00

    @Son Cao Thanh

    Here is the reply from the team to your questions:

    cpu_limit is the allocated number of vCores for that DB. it will not change unless there is a change to the SLO of the DB.
    cpu_used is a floating point number which represents a notational value (<= cpu_limit) of busy vCores in that time period
    cpu_percent is what it states – the average used CPU %

    all these metrics are sampled, and they might be sampled multiple times within a given time period, which is why the Average value should be used.
    cpu_limit in itself is perhaps not very meaningful for setting an alert. I personally would set an alert on cpu_percent, and the value to feed in the Alerts UI “Threshold value” box would be the percent value to be used as a threshold. So if they put in 80, the way to read that screen is that, if the average value of the cpu_percent metric within the last 6 hours exceeds X percent, then fire an alert.

    and for q3 from the last email, they should be looking at the Average column – notice it always shows 4 for cpu_limit.

    Hope this helps.

    Regards
    Navtej S


1 additional answer

Sort by: Most helpful
  1. Navtej Singh Saini 4,226 Reputation points Microsoft Employee
    2020-12-08T17:09:20.7+00:00

    @Son Cao Thanh
    Our team need few things here before they can help. Here is what they are looking for:

    It appears to that the customer is asking about thresholds and occurrence counts in the context of setting an alert, but I’m unable to parse exactly where they are seeing this ‘count’ field in the context of setting the alert. Do you have a screenshot, or further information about context?

    The secondary question(s) they posed probably came up from the doc you referenced. In that, the count fields here reference the sample count gathered in the Log Analytics workspace during a specified time interval. And if they query the Average field for the cpu_limit or cpu_used metric names, they will obtain a number which is the absolute number of vCores allocated, and correspondingly a floating point number indicating how many of those vCores on average were in use during that time period.

    AzureMetrics
    | where ResourceProvider=="MICROSOFT.SQL"
    | where MetricName =~ "cpu_limit"
    | where Resource contains "SomeDBName"
    | project TimeGenerated, Average
    | order by TimeGenerated desc

    I don’t think this is what the original question referred to, though. We should get the original question clarified, ideally a screenshot would help."

    Please help with the more details and screenshot where you seeing the metrics and we will help further regarding this.

    Thanks
    Navtej S


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.