In the last post, we have discussed about different deployment options available with Azure SQL server. I hope you got a good understanding of various deployment models. In this post let us discuss the purchase models available with each deployment model.
Azure SQL database provides multiple purchase models based on the deployment model to accommodate your performance requirements and budgets. At a high level, these purchase models are divided into two:
- DTU or eDTU purchase model
- vCore purchase model
Each of these purchase model provides multiple service tier for more customization of your performance requirements and budgets.
- DTU or eDTU
- Basic
- Standard
- Premium
- vCore
- General Purpose
- Hyperscale
- Business Critical
DTU and eDTU purchase model
The database transaction unit (DTU) is a specific composition of compute power, memory, storage, and IO. This purchase model provides us all the resources as a bundle which includes a specific amount of compute power, storage, and IO. It provides the simplicity and full control of your budget. This purchase model available with single database and elastic pool deployment model. As mentioned earlier, Azure provides multiple service tier to match our performance requirements and budget.
- Basic tier:
- Suitable for very low CPU intensive workload.
- Provides 5 DTU with 2GB of storage.
- Each DTU provides 1-5 IOPS.
- 7 days backup retention.
- Each DTU costs 1 USD per month.
- Suitable for initial design and developments.
- Standard tier:
- Suitable for low and medium CPU intensive workload.
- It provides a DTU range between 10 and 3000 DTU with 250 GB storage.
- Additional storage up to 1 TB with additional cost. To go beyond 250 GB, we have to opt for 100 or more DTU.
- 35 days backup retention.
- Each DTU provides 1-5 IOPS.
- Each DTU costs 1.5 USD per month.
- The range of DTU in this tier is divided into 9 compute size: S0 10 DTU), S1 20 DTU, S250 DTU,S3 100 DTU, S4 200 DTU, S6 400 DTU, S7 800 DTU, S9 1600 DTU, and S12 3000 DTU. There is no option for us to randomly select the DTU in the range of DTU.
- Premium Tier:
- Suitable for medium and high CPU and IO intensive workload.
- Provides DTU range between 125 and 4000 with a storage of 500 maximum to 4 TB depends on DTU.
- Each DTU unit provides 25 IOPS. That makes it suitable for IO intensive workload.
- It also provides better IO latency (2ms for read and write) compared to basic and standard (5 ms for read and 10 ms for write).
- 35 days backup retention.
- Support column store index and in-memory OLTP
- DTU range divided into multiple compute sizes. p1 125 DTU,p2 250 DTU ,p4 500 DTU, p6 1000 DTU p11 1750 DTU, p15 4000 DTU
For more accurate details of each service tier, refer the following Azure documentation :
While using the single database deployment model, the DTU purchase model comes into the picture. In the same way, for an elastic pool deployment model, the eDTU purchase model is used. eDTU purchase model also provides different service tiers like in the DTU model but with different limits. For the details of each service tier, refer to the Azure documentation. As you know, in the elastic pool deployment model, the resource is allocated at the pool level and each database shares the resource. To avoid one database consuming all the resources, there is a couple of parameter settings in the elastic pool level.
- Max eDTUs per database: This is the maximum number of eDTU that any database in the pool may use if available based on utilization by other databases in the pool. Max eDTU per database is not a resource guarantee for each database. if the workload on these databases are spread across time, we can over commit the max eDTU per database. For example, we have an elastic pool with 1000 eDTU and 5 databases attached to that. Out of that 2 of them are reporting data and most load comes to those two at night. The other two databases are part of the OLTP system will have varying workload but the peak will be between 10 AM and 5 PM. The fifth database is an internal database most of the load on this database will be between 9 AM and 12 PM. In this scenario, we can safely set max eDTU per database to 300 or 400 even if the total goes beyond the 1000 eDTU.
- Min eDTUs per database: This is the guaranteed minimum number of eDTU for each database in the pool. This can set to 0 and that is the default value. This value multiplied by the number of databases in the pool should not exceed the eDTU allocated to the pool. To set the value of this parameter to 100 of an elastic pool which has 20 databases, we need to allocate a minimum of 2000 eDTU to the elastic pool.
- Max storage per database: This is the maximum size of any database attached to this elastic pool. None of the databases can grow beyond this limit. Even if we set this value to a higher number which exceeds, (no.of database X Max storage per database), the total available storage space of the pool storage limit, it will never allow all database storage to grow more than available storage space fo the pool.
Each service tiers in the elastic pool has a limit on the individual database resource utilization. The below table explains those limitations:
In case if you are migrating your workload from your on-premise installation of SQL Server to Azure SQL and you are not sure how much DTU need to be allocated and which service tier to be provisioned, DTU calculator comes handy. You need to provide values of the following performance counters :
- Processor - % Processor Time
- Logical Disk - Disk Reads/sec
- Logical Disk - Disk Writes/sec
- Database - Log Bytes Flushed/sec
I hope with this you got a good understanding of the DTU and eDTU purchase model. In the next post, we will cover the vCore purchase model.