DTU vs vCore pricing models in Azure - Performance Comparison
Start learning this pattern below
Jump into concepts and practice - no test required
We want to understand how the cost and performance scale when using DTU or vCore models in Azure SQL Database.
How does the number of resources or operations grow as workload increases?
Analyze the scaling of resource allocation in DTU and vCore models.
// DTU model: fixed bundles of CPU, memory, and IO
// vCore model: separate CPU cores and memory units
// Example:
// DTU: 100 DTUs for a database
// vCore: 4 vCores with 16 GB RAM
// Workload increases from 10 to 1000 requests per second
// Observe how resource units scale
This shows how resource units grow with workload in each pricing model.
Look at what resources or operations increase as workload grows.
- Primary operation: Allocation of DTUs or vCores to handle workload.
- How many times: Resource units increase as workload increases.
As workload (requests per second) grows, DTU bundles increase in fixed steps, while vCore resources scale more linearly.
| Input Size (requests/sec) | DTU Units | vCore Units |
|---|---|---|
| 10 | 10 DTUs (minimum bundle) | 1 vCore |
| 100 | 50 DTUs | 2 vCores |
| 1000 | 400 DTUs | 8 vCores |
DTU grows in fixed bundles, vCore grows more smoothly with workload.
Time Complexity: O(n)
This means resource needs grow roughly in direct proportion to workload size.
[X] Wrong: "DTU and vCore models scale the same way with workload."
[OK] Correct: DTU bundles scale in fixed steps combining CPU, memory, and IO, while vCore lets you scale CPU and memory independently, leading to different growth patterns.
Understanding how resource allocation scales with workload helps you design cost-effective and performant cloud databases.
"What if we changed from a DTU model to a vCore model with serverless compute? How would the time complexity of resource scaling change?"
Practice
Solution
Step 1: Understand DTU components
DTU stands for Database Transaction Unit, which bundles CPU, memory, and I/O into one unit for simple pricing.Step 2: Compare options to DTU definition
Only CPU, memory, and I/O resources bundled together correctly lists CPU, memory, and I/O bundled together.Final Answer:
CPU, memory, and I/O resources bundled together -> Option DQuick Check:
DTU = bundled CPU, memory, I/O [OK]
- Thinking DTU is only CPU or memory
- Confusing DTU with storage pricing
- Assuming DTU separates resources
Solution
Step 1: Recall vCore pricing features
The vCore model allows choosing CPU and memory independently for more control over resources.Step 2: Match options to vCore traits
It lets you select CPU and memory separately correctly states that CPU and memory are selected separately, unlike DTU.Final Answer:
It lets you select CPU and memory separately -> Option AQuick Check:
vCore = separate CPU and memory selection [OK]
- Confusing vCore with DTU bundling
- Thinking vCore charges only storage
- Assuming vCore is for on-premises only
Solution
Step 1: Analyze workload needs
The workload needs high CPU but only moderate memory, so flexibility in resource selection is important.Step 2: Compare pricing models for flexibility
DTU bundles CPU and memory, so you cannot adjust them separately. vCore lets you pick CPU and memory independently, optimizing cost.Final Answer:
vCore model because you can choose more CPU and less memory -> Option AQuick Check:
High CPU + moderate memory = vCore better [OK]
- Choosing DTU for flexible resource needs
- Thinking DTU charges CPU separately
- Confusing bundling in vCore
Solution
Step 1: Understand DTU scaling limits
DTU bundles CPU, memory, and I/O, so you cannot scale memory independently without affecting CPU.Step 2: Identify the problem with user's request
The user wants to increase only memory, which DTU does not support because of bundled resources.Final Answer:
DTU does not allow separate scaling of CPU and memory -> Option BQuick Check:
DTU = no separate CPU/memory scaling [OK]
- Thinking DTU allows memory-only scaling
- Assuming DTU charges extra for memory only
- Believing DTU auto-scales memory
Solution
Step 1: Analyze workload characteristics
The workload has unpredictable spikes in CPU and memory, requiring flexible resource adjustment to maintain performance.Step 2: Evaluate pricing models and strategies
DTU bundles resources and requires fixed levels, so it is less flexible and may lead to overpaying. vCore supports autoscaling, allowing dynamic adjustment of CPU and memory to match demand and minimize cost.Step 3: Choose best option
Use vCore model with autoscaling to adjust CPU and memory dynamically uses vCore with autoscaling, which fits the need for flexibility and cost control.Final Answer:
Use vCore model with autoscaling to adjust CPU and memory dynamically -> Option CQuick Check:
Unpredictable spikes = vCore + autoscaling [OK]
- Choosing fixed DTU for variable workloads
- Manually upgrading DTU causing delays
- Fixing vCore resources too low
