VM Capacity Requirements
Complete the full lesson to earn 25 points
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks and see fewer ads — read each lesson on a single page with Pro
Lesson: VM Capacity Requirements for Azure Virtual Desktop (AVD)
Introduction: The Foundation of VDI Performance
When you embark on planning an Azure Virtual Desktop (AVD) infrastructure, the most critical decision you will make revolves around the sizing of your virtual machines (VMs). Choosing the right VM size is the difference between a high-performing, cost-effective digital workspace and a system plagued by user complaints, latency, and budget overruns. Capacity planning is not merely about picking a random instance from the Azure catalog; it is a systematic process of mapping user personas to hardware resources.
In a traditional on-premises environment, over-provisioning was the standard insurance policy against poor performance. In the cloud, however, over-provisioning directly translates to wasted operational expenditure. Conversely, under-provisioning leads to CPU contention, memory swapping, and a degraded user experience that can hinder productivity. Understanding how to balance these two extremes requires a deep dive into how applications consume resources, how multi-session environments behave, and how to interpret the metrics that matter.
This lesson explores the intricacies of VM capacity planning, from identifying user personas to selecting the right VM series, and implementing monitoring strategies that allow you to refine your infrastructure over time. By the end of this guide, you will have the knowledge to design a session host environment that is both efficient and capable of meeting the demands of your specific user base.
Defining User Personas: The First Step in Sizing
Before looking at technical specifications, you must define the "who" behind the desktop. A "one-size-fits-all" approach to VDI is a recipe for failure. Instead, you should group your users into categories based on their application usage patterns. These categories are known as personas.
Common User Personas
- Task Workers: These users interact with a limited set of applications, typically a web browser, a line-of-business application, and email. Their resource consumption is low and predictable.
- Knowledge Workers: These users represent the bulk of a typical office workforce. They use the full Microsoft 365 suite, multiple browser tabs, specialized productivity tools, and occasionally handle moderate data sets. Their resource usage is higher and more variable.
- Power Users: These users rely on resource-intensive applications, such as CAD software, video editing tools, or large-scale data analysis platforms. Their resource demands are high, persistent, and often unpredictable.
Callout: The "Concurrency" Concept It is vital to distinguish between total users and concurrent users. If you have 500 employees, but only 300 are logged in at any given time, you are planning for 300 concurrent users. Furthermore, you must account for the "peak concurrency" factor—the maximum number of people logged in during the busiest hour of the day.
Mapping Personas to Resources
Once you have identified your personas, you can begin to estimate the baseline resource requirements for each. Microsoft provides general guidance on how many users can be hosted per virtual CPU (vCPU), but this should be treated as a starting point rather than a hard rule.
- Light/Task: 6–8 users per vCPU.
- Medium/Knowledge: 4–6 users per vCPU.
- Heavy/Power: 2–3 users per vCPU.
Technical Considerations for Session Host Sizing
When choosing an Azure VM series for your session hosts, you are not just selecting a processor; you are selecting a balanced architecture of CPU, RAM, and disk I/O throughput.
The D-Series and E-Series Advantage
For most AVD deployments, the D-Series (General Purpose) and E-Series (Memory Optimized) are the industry standards.
- D-Series (Dv4/Dv5): These provide a balanced ratio of memory to vCPU. They are excellent for the majority of knowledge workers who do not have extreme memory requirements but need consistent CPU cycles for application responsiveness.
- E-Series (Ev4/Ev5): These are intended for memory-intensive workloads. If your users are frequently opening large Excel workbooks, running complex macros, or keeping many browser sessions open with heavy JavaScript content, the E-series will prevent your session hosts from hitting memory bottlenecks.
The Role of Disk I/O
Disk performance is often overlooked in capacity planning. AVD session hosts perform a significant amount of read/write operations, especially when using FSLogix profile containers. If the disk cannot keep up with the demand, the user will experience "slow" logins and applications that hang while waiting for data to load from the profile.
- Premium SSD: Highly recommended for all production AVD environments. They offer consistent latency and high throughput.
- Standard SSD: Can be used for non-persistent, low-demand environments, but generally not recommended for primary user profile storage.
- Ultra Disk: Generally overkill for standard office workers but may be necessary for specific high-performance engineering workloads.
Note: Understanding IOPS and Throughput Every Azure disk has a specific IOPS (Input/Output Operations Per Second) and throughput limit. When sizing, ensure your chosen VM size supports the maximum disk throughput required by your storage configuration. If you attach a large disk to a small VM, the VM's throughput cap will prevent you from utilizing the disk's full potential.
Calculating Capacity: A Practical Example
Let’s walk through a scenario. Suppose you have 100 knowledge workers. Based on our persona mapping, we expect these users to require a "Medium" resource profile.
- Identify Concurrency: You determine that 90% of these users are active at peak times. That gives us 90 concurrent users.
- Determine User Density: We aim for 5 users per vCPU.
- Calculate Required vCPUs: 90 concurrent users / 5 users per vCPU = 18 vCPUs.
- Select VM Size: You look at the Azure VM catalog. A
Standard_D8s_v5offers 8 vCPUs and 32 GB of RAM. - Calculate Total VMs: If we use
D8s_v5instances, each can handle roughly 40 users (8 cores * 5 users/core). To accommodate 90 users, you would need 3 VMs (3 * 40 = 120 capacity).
This gives you a buffer for unexpected spikes and ensures that if one VM needs to be taken offline for maintenance, the remaining two can absorb the load (though you should always plan for redundancy).
Automating Capacity Planning with Scripts
While manual calculation is essential for the initial design, you can use PowerShell to query your existing environment or simulate potential loads. Below is a simplified example of how you might script a check for your current session host utilization.
# Simple PowerShell snippet to check current CPU load on a group of VMs
$vmNames = @("AVD-Host-01", "AVD-Host-02", "AVD-Host-03")
foreach ($vm in $vmNames) {
$metrics = Get-AzMetric -ResourceId "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/$vm" `
-MetricName "Percentage CPU" `
-TimeGrain 00:05:00 `
-DetailedOutput
$avgCpu = ($metrics.Data | Measure-Object -Property Average -Average).Average
Write-Host "VM: $vm | Average CPU Load: $avgCpu%"
}
This script is basic, but it illustrates how you can programmatically gather performance data. In a real-world scenario, you would integrate this with Azure Monitor and Log Analytics to get a historical view of performance trends rather than a single snapshot.
Best Practices for Scaling and Optimization
Capacity planning is not a one-time event. It is an iterative process. Here are the industry-standard best practices to ensure your environment remains healthy.
1. Implement Auto-Scaling
Azure Virtual Desktop includes a built-in scaling tool that automatically turns VMs on or off based on a schedule or host pool metrics. This is the single most effective way to manage capacity vs. cost. During off-hours, you can scale down to a minimal number of hosts, and during business hours, you can scale up to meet demand.
2. Use FSLogix for Profile Management
FSLogix is non-negotiable for AVD. By externalizing user profiles from the VM disk to a file share (like Azure Files or NetApp Files), you make your session hosts truly ephemeral. If a VM becomes unhealthy or is no longer needed, you can delete it without losing user data.
3. Leverage Performance Monitoring
Use the "Azure Virtual Desktop Insights" dashboard. It provides a visual representation of your host pool health, including:
- Average connection time.
- Average CPU and memory usage per host.
- User experience metrics (like round-trip time).
4. Test Before Production (Pilot Testing)
Never deploy a full host pool based on theoretical calculations alone. Deploy a small pilot pool (e.g., 5-10 users) and use tools like "Load Testing for AVD" to simulate real-world usage. This will tell you if your chosen VM size is actually sufficient for your specific line-of-business applications.
Warning: The Pitfall of "Perfect" Sizing Many administrators spend weeks trying to find the "perfect" VM size. In reality, the cloud is dynamic. It is better to start with a standard, well-documented VM size, monitor it for two weeks, and then adjust if necessary. Do not get stuck in "analysis paralysis."
Common Mistakes and How to Avoid Them
Even experienced architects fall into common traps. Being aware of these will save you hours of troubleshooting.
Over-relying on Default Microsoft Recommendations
Microsoft provides excellent guidelines, but these are based on "average" applications. If your organization uses specialized software that is poorly optimized for multi-session environments, those averages will not apply. Always benchmark your specific software.
Neglecting Memory Pressure
CPU is easy to monitor, but memory is often the silent killer of VDI performance. When a VM runs out of RAM, it begins to use the page file on the disk, which is significantly slower than physical RAM. This leads to an immediate and noticeable drop in user experience. When in doubt, lean toward memory-optimized (E-series) VMs.
Ignoring Network Latency
Capacity planning is not just about the VM; it is about the path to the VM. If your users are located in a region far from the Azure data center, no amount of CPU power will fix the latency they experience. Always ensure your session hosts are deployed in the region closest to your users.
Failing to Plan for "Boot Storms"
A "boot storm" occurs when a large number of users log in simultaneously (e.g., at 8:55 AM). This creates a massive spike in disk and CPU usage. If your scaling plan is too slow, users will experience long wait times. Ensure your scaling automation is configured to trigger early enough to account for these morning rushes.
Comparison: D-Series vs. E-Series for AVD
| Feature | D-Series (General Purpose) | E-Series (Memory Optimized) |
|---|---|---|
| Best For | Standard knowledge workers | Power users, heavy Excel/Data users |
| Memory-to-vCPU Ratio | 4:1 | 8:1 |
| Cost | Lower | Higher |
| Performance | Balanced | Excellent for memory-heavy tasks |
| Common Use Case | Web-based apps, light Office 365 | Large spreadsheets, complex dashboards |
Step-by-Step: Validating Your Capacity Plan
If you are ready to put your plan into action, follow this systematic approach:
- Inventory Application Resource Usage: Run a performance monitor on a local machine running your core business applications. Note the peak memory and CPU usage.
- Establish a Baseline: Select a VM size that accommodates these peak requirements, plus a 20% overhead buffer.
- Pilot Deployment: Provision a host pool with a small number of VMs using the selected size.
- User Acceptance Testing (UAT): Invite a small group of users representing your various personas to work from this environment for three days.
- Monitor and Adjust: Check the Insights dashboard. If the CPU consistently sits above 80% during peak hours, consider moving to a higher SKU or adding more VMs to the pool. If it stays below 30%, you may be over-provisioned and can consider downsizing to save costs.
- Full Rollout: Once the performance is validated, proceed with the full deployment.
Deep Dive: The Impact of Modern Applications
Modern applications, particularly those built with Electron (like Microsoft Teams, Slack, or VS Code), consume significantly more resources than traditional Win32 applications. Teams, in particular, is a heavy consumer of both CPU and memory due to its multimedia processing requirements.
When planning for Teams in AVD, you must ensure that your session hosts support Media Optimization. This feature redirects audio and video processing to the user's local machine, significantly reducing the load on the session host. Without this, your capacity planning calculations will be completely invalidated, as Teams will easily consume 20-30% of a session host's resources by itself.
Always check the following when dealing with modern, resource-heavy apps:
- Hardware Acceleration: Does the application support GPU offloading? If so, consider moving to the NV-series or NC-series VMs which include dedicated NVIDIA GPUs.
- Background Processes: Do these apps have background services that start automatically? These can contribute to a "boot storm."
- Update Frequency: Frequent auto-updates can cause sudden spikes in disk I/O. Use a centralized image management strategy (like Azure Compute Gallery) to control when these updates occur.
Best Practices for Scaling and Cost Management
Cost management is an inseparable part of capacity planning. Because Azure is a pay-as-you-go model, efficient capacity planning is synonymous with cost efficiency.
Use Reserved Instances (RI)
If you have a predictable, baseline number of users, purchase Reserved Instances for your session hosts. This can provide significant cost savings compared to pay-as-you-go pricing. Reserve the capacity for your "always-on" hosts, and use pay-as-you-go for the "burst" capacity that scales up during the day.
Right-Sizing via Metrics
Do not set your VM sizes in stone. Review your resource utilization metrics every month. Azure provides Advisor recommendations that will actually flag VMs that are consistently underutilized. If you see a recommendation to downsize, take it. It is often a low-risk way to save money.
Managing Image Size and Disk Bloat
The size of your OS disk matters. Keep your base images lean. Remove unnecessary pre-installed software, disable unneeded services, and use disk cleanup tools before capturing your image. A smaller OS disk is faster to boot and cheaper to store.
Key Takeaways
- Personas Drive Sizing: Never start with the VM size. Start with the user persona. Map your users to Task, Knowledge, or Power categories to establish a baseline for resource requirements.
- Concurrency is King: You are not sizing for your total employee count; you are sizing for the peak number of concurrent users. Always factor in a safety buffer for unexpected spikes.
- Disk I/O Matters: Do not ignore storage performance. Premium SSDs are standard for production environments to ensure smooth profile loading and application responsiveness.
- Iterative Optimization: Capacity planning is a cycle, not a destination. Use Azure Virtual Desktop Insights to monitor real-world performance and adjust your VM sizes or scaling plans accordingly.
- Modern Apps Require Modern Planning: Applications like Microsoft Teams are resource-intensive. Ensure you are using media optimization to keep your session host load manageable.
- Automate Scaling: Use the built-in AVD auto-scaling tools to match your capacity to your business hours, ensuring you only pay for what you need.
- Pilot Before Scale: Always conduct a pilot phase with real users to validate your theoretical sizing before rolling out to the entire organization.
By following these principles, you will move beyond simple guesswork and build a robust, high-performing, and cost-efficient virtual desktop infrastructure. Remember, the goal is to provide a seamless experience for the user while maintaining the fiscal discipline required by your organization. Stay observant of your performance metrics, remain flexible in your configurations, and always prioritize the user experience as the final measure of your success.
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles your daily points limit so you progress twice as fast, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× daily points limit
- ✓ Distraction-free lessons