Azure SQL: Service Tiers and DTUs

Azure SQL Database is a DaaS (Database As A Service) cloud offering by Microsoft. This service has specific characteristics.

  • Azure is responsible for database common administration tasks, hypervisors, networking, bare metal hardware etc.
  • The users pay according to their usage of the service.
  • The service offers automating scale up and scale down resources on demand.

Look the below diagram to understand better the three previous Azure SQL Service characteristics,

Azure SQL Database Billing Model

To understand better the Azure SQL database billing model we must say more details about Service Tiers and DTUs.

Service Tiers

The service tier determines the size, performance, features and recovery characteristics of the database. Currently, Microsoft offers 3 different tiers: Basic, Standard, and Premium. Every tier has different characteristics, like different limits on performance, size, recovery, and features.

 Basic Service Tier  
Performance level Basic
Max DTUs  5
Included storage (GB) 2
Max storage choises (GB) 2
Max in-memory OLTP storage (GB) N/A
Max concurrent workers (requests) 30
Max concurrent sessions 300
Standard Service Tier 
 Performance level S0 S1  S2  S3  S4  S6   S7 S9 S12 
 Max DTUs  10  20 50  100 200 400 800 1600  3000
 Included storage (GB)  250 250 250 250 250 250 250 250 250
 Max Storage choises (GB)  250 250 250 250,500,750,
1024
 250,500,750,
1024
 250,500,750,
1024
 250,500,750,
1024
 250,500,750,
1024
 250,500,750,
1024
 Max in-memory OLTP storage (GB)  N/A  N/A
N/A N/A N/A  N/A N/A N/A N/A
 Max concurrent workers (requests)  60 90 120 200 400 800 1600 3200 6000
 Max concurrent sessions  600 900 1200 2400 4800 9600 19200 30000 30000

 

 Premium Service Tier
 Performance Level P1 P2 P4 P6 P11 P15
 Max DTUs  125 250 500 1000 1750 4000
 Included storage (GB)  500 500 500 500 4096 4096
 Max storage choises (GB)  500,750,1024  500,750,1024  500,750,1024  500,750,1024  4096 4096
 Max in-memory OLTP storage (GB)  1 2 4 8 14 32
 Max concurrent workers (requests)  200 400 800 1600 2400 6400
 Max  concurrent sessions  30000 30000 30000 30000 30000 30000

DTUs (Database Throughput Units)

A DTU is a unit of measure of the resources that  Azure SQL database service offers at a specific performance level.
The calculation type  for DTUs is : CPU ( % Processor Time) + Memory + Data IO ( Disk Reads/sec, Disk Writes/sec) + Log IO (Log Bytes Flushed/sec)
Get started with Azure SQL Database DTU calculator by clicking here.

How DTUs works

Let's make an example of DTU calculation for an On-Premise SQL Server infrastructure. We suppose that we have a SQL Server running on a Hypervisor with 20 Cores, 120 GB RAM and an SSD Drive with a size of 500GB

First, download one of the following utilities that Microsoft provides to users, to capture performance counters.

Download Command Line Utility
Download PowerShell Script

Once the script completes, open this page. Then go to Upload the CSV file and Calculate section, enter the Number of cores for your server, e.g. 20 Cores, upload the CSV file generated by the script and click Calculate.

After the calculation completes, a chart is generated for your SQL Server performance CPU utilization, IOPS, and Log.

Conclusion

In this post, we try to explain how can anyone choose the correct Service Tiers for Azure SQL Database deployment. Microsoft has different blends of Tiers and covers the most cases.