Should I worry about MAX CPU% or DTU% on Azure SQL or should I look at avg to scale?

Dan Parker 101 Reputation points
2020-11-01T17:44:27.303+00:00

So sometimes I will see spikes if I show max, to say 100 or 90, should I worry about that? Will queries fail if I see 100 on max? If I do 1 min avg, it's fine like 20 or 30% on that spike and most of the time it's like 5% avg. This is on general purpose Vcore, same goes for DTUs, should I just look at avg an not worry about DTU spikes?

Data IO also can spike and I look at that as well, I suppose if that gets high it's best to go to an SSD tier. But for that look at max or avg?

From my experience it seems max 100 is ok and things won't crash, maybe just get milisecond delay, but i'd like more info about this.

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Dan Parker 101 Reputation points
    2020-11-02T23:57:28.007+00:00

    One thing I did learn from support chat is an average of 30-35% is a pretty good range. Watch for spikes and try to find a specific query that's causing it.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anurag Sharma 17,606 Reputation points
    2020-11-02T12:51:08.54+00:00

    Hi @Dan Parker , welcome to Microsoft Q&A forum.

    There are limits with respect to IOPS, Compute CPU, or storage for databases in Azure SQL. Most of these will be responsible for creating the latency when those limits are reached. In some cases, queries could also time out if latency exists for longer duration. These delayed queries would be executed once the resources get free or CPU utilization goes lower.

    So we need to be very precise in the duration of peak to determine if we need to scale up to higher service level. If we see the trend of high CPU usage or IOPS for very short duration, we can keep the same pricing model, otherwise its always better to scaling up/down as per the consistent trend of these metrics. However, we need to consider the business criticality all through when taking these decision.

    I would recommend you to go through the below article which has good insight on these parameters:
    https://video2.skills-academy.com/en-us/azure/azure-sql/database/resource-limits-logical-server

    Also as you mentioned it is few times only that spikes are observed, suggestion would be to identify the queries that are responsible for it, fine tune them and observer the performance then after.
    https://video2.skills-academy.com/en-us/azure/azure-sql/identify-query-performance-issues
    https://video2.skills-academy.com/en-us/azure/azure-sql/database/monitor-tune-overview

    Please let me know if this helps or we can discuss further.

    ----------

    If answer helps, please select 'Accept Answer' as this could help other community members looking for similar queries.

    1 person found this answer helpful.
    0 comments No comments

  2. Dan Parker 101 Reputation points
    2020-11-02T15:40:52.327+00:00

    So probably if it spikes on Max it's because of a bad query (I've seen this in several projects), see if possible to find a bad query, but probably even if it's scaled up it will still hit that max. I see.

    0 comments No comments

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.