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.
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.
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.