Unique Comparison – DTU vs. vCore Based Model

Assuming that you already have a basic understanding of what DTU is and the availability of vCore based model while choosing Azure SQL database offering, let’s quickly look into the facts about how do they differ –

Azure SQL Database DTU Versus vCore - Ballard Chalmers

Under Basic/Standard Tier, 100 DTUs = 1 vCore
Premium Tier, 125 DTUs = 1 vCore

Microsoft provides the following query to see how the DTUs maps to vCores among Gen4 and Gen5 hardware configurations –


;WITH dtu_vcore_map AS
(
SELECT TOP (1) rg.slo_name,
               CASE WHEN rg.slo_name LIKE '%SQLG4%' THEN 'Gen4'
                    WHEN rg.slo_name LIKE '%SQLGZ%' THEN 'Gen4'
                    WHEN rg.slo_name LIKE '%SQLG5%' THEN 'Gen5'
                    WHEN rg.slo_name LIKE '%SQLG6%' THEN 'Gen5'
               END AS dtu_hardware_gen,
               s.scheduler_count * CAST(rg.instance_cap_cpu/100. AS decimal(3,2)) AS dtu_logical_cpus,
               CAST((jo.process_memory_limit_mb / s.scheduler_count) / 1024. AS decimal(4,2)) AS dtu_memory_per_core_gb
FROM sys.dm_user_db_resource_governance AS rg
CROSS JOIN (SELECT COUNT(1) AS scheduler_count FROM sys.dm_os_schedulers WHERE status = 'VISIBLE ONLINE') AS s
CROSS JOIN sys.dm_os_job_object AS jo
WHERE dtu_limit > 0
      AND
      DB_NAME() <> 'master'
)
SELECT dtu_logical_cpus,
       dtu_hardware_gen,
       dtu_memory_per_core_gb,
       CASE WHEN dtu_hardware_gen = 'Gen4' THEN dtu_logical_cpus
            WHEN dtu_hardware_gen = 'Gen5' THEN dtu_logical_cpus * 0.7
       END AS Gen4_vcores,
       7 AS Gen4_memory_per_core_gb,
       CASE WHEN dtu_hardware_gen = 'Gen4' THEN dtu_logical_cpus * 1.7
            WHEN dtu_hardware_gen = 'Gen5' THEN dtu_logical_cpus
       END AS Gen5_vcores,
       5.05 AS Gen5_memory_per_core_gb,
       CASE WHEN dtu_hardware_gen = 'Gen4' THEN dtu_logical_cpus
            WHEN dtu_hardware_gen = 'Gen5' THEN dtu_logical_cpus * 0.8
       END AS Fsv2_vcores,
       1.89 AS Fsv2_memory_per_core_gb,
       CASE WHEN dtu_hardware_gen = 'Gen4' THEN dtu_logical_cpus * 1.4
            WHEN dtu_hardware_gen = 'Gen5' THEN dtu_logical_cpus * 0.9
       END AS M_vcores,
       29.4 AS M_memory_per_core_gb
FROM dtu_vcore_map;

Little out of the context, sys.dm_user_db_resource_governance is the DMV here. But note that this is just an approximation of mapping not an exact but still a good reference to keep in mind while comparing the two models.

Best part is that you can switch between DTU and vCore based model anytime and vice-versa.

General guidelines are that if you are starting fresh then DTU can be a better option as it’s the most economical one and follows the basic thumb rule of being on cloud that start with small and then scale. You can start with the least configuration which costs about < $5 per month. On the other hand, the minimum configuration for vCore model is 2 vCores which is around $400 per month. So, you can see the difference cost-wise.

If you are wondering why there is so much difference in the cost, one of the factor is that their underlying architecture is also different. Under DTU model, cost is the lumpsum amount which includes your storage, memory and the CPUs whereas in vCore based model, you are charged separately for storage.

Under DTU model, you have no control over the underlying hardware. Azure can choose any generations of available hardware. In vCore model, you can explicitly choose whether you want to go with Gen4 or Gen5 machines.

If storage is your priority and you want to differentiate between these two options then cost makes a significant and huge difference. Under the Standard tier of DTU model, maximum allowed storage is 1TB i.e. a database can go a maximum of 1TB in size. Minimum DTUs that you need to get 1TB size is 100 DTUs which costs around $150. Whereas in vCore based model, even minimum configuration of 2 vCores allows upto 4TB of storage but costs you about $560 per month.

If you need to have 4TB of storage then vCore based model is a cheaper option. Minimum DTUs that supports a storage upto 4TB is 1750 DTUs which costs about $7K….huge huge difference.

Next question might be that if vCore based model is the choice then why not to go with Azure SQL Managed Instance which is also a vCore based methodology? In fact, this is a great question. Price wise both are almost same. Some negligible difference is there but not a significant factor to make a decision. You can consider other factors that differentiate two services based on to your scenarios e.g. it’s not possible to switch between vCore based model and Managed Instance as both are different services but you can switch back to DTU model from vCore anytime if you fall in that situation.

Learn More

Advertisements