VMware vSphere 7.x Study Guide for VMware Certified Professional – Data Center Virtualization certification. This article covers Section 1: Architectures and Technologies. Objective 1.6.3 – Describe how Distributed Resource Scheduler (DRS) scores virtual machines.
This article is part of the VMware vSphere 7.x - VCP-DCV Study Guide. Check out this page first for an introduction, disclaimer, and updates on the guide. The page also includes a collection of articles matching each objective of the official VCP-DCV.
Describe how DRS scores virtual machines.
This objective needs to describe how Distributed Resource Scheduler (DRS) scores virtual machines. Here, we overview the Old DRS model vs. the new one presented in vSphere 7. Then we study in-depth how VMware DRS scores the virtual machines.
This topic is a child of Objective 1.6 – Describe ESXi cluster concepts. It is also highly related to the previous topic: Describe Distributed Resource Scheduler (DRS). Both topics should be considered and are recommended before moving to this one.
When searching for information on this topic, you'll be bumping into two excellent articles from Niels Hagoort:
It seems this objective has been specially created out of these articles, which were also pushed to the core.vmware documentation. At the moment of creating this piece, I can't find detailed information about how DRS scores virtual machines from the official “VMware Docs”.
I am putting the highlights of the first article here, so in short, you need to visit these links to get a complete understanding of DRS scoring VMs.
1. DRS Score
When migrating VMs, each migration recommendation is computed using the VM happiness metric, which measures execution efficiency.
- This metric is displayed as DRS Score in the cluster's Summary tab in the vSphere Client.
- DRS load-balancing recommendations attempt to improve the DRS score of a VM.
- The Cluster DRS score is a weighted average of the VM DRS Scores of all the powered-on VMs in the cluster.
- The Cluster DRS Score is shown in the gauge component.
- The filled-in section's color changes depending on the value to match the corresponding bar in the VM DRS Score histogram.
- The bars in the histogram show the percentage of VMs that have a DRS Score in that range.
By default, the automation level is specified for the whole cluster. You can also set a custom automation level for individual virtual machines.
2. Old DRS vs. New DRS (vSphere 7)
vSphere DRS used to focus on the cluster state, checking if it needs rebalancing because one ESXi host could be over-consumed while another ESXi host has fewer resources consumed.
- DRS runs every 5 minutes, and if the DRS logic determined it could improve the cluster balance, it would recommend and execute a vMotion depending on the configured settings.
- DRS achieved cluster balance by using a cluster-wide standard deviation mode.
The new DRS logic in vSphere 7 takes a very different approach. It computes a VM DRS score on each host and moves the VM to the host that provides the highest VM DRS score.
- The most significant change from the old DRS version is that it no longer balances host load directly.
- It improves the balancing by focusing on the metric about which you care: the virtual machine happiness.
Important to note is that the improved DRS now runs every minute, providing a more granular way to calculate workload placement and balancing.
- This shorter operation results in overall better performance of the workloads.
3. How DRS Scores VMs
The new DRS logic quantifies virtual machine happiness using the VM DRS score.
- The VM DRS Score is not a health score for the virtual machine.
- The VM DRS Score is about the execution efficiency of a virtual machine.
- The score values range from 0 to 100% and are divided into buckets; 0-20%, 20-40%, and so on.
Obtaining a VM DRS score of 80-100% indicates mild to no resource contention. It does not necessarily mean that a virtual machine in the 80-100% bucket is doing way better than a virtual machine in the lower buckets. That is because many metrics influence the VM DRS score. Performance metrics are used, but capacity metrics are also incorporated in the algorithm.
The performance drivers for the VM DRS score are contention-based, using metrics like CPU %ready time, good CPU cache behavior, and memory swap. The reserve resource capacity, or headroom, that a current ESXi host has is also considered to determine the VM DRS score.
4. VM DRS Score vs. Cluster DRS Score
The improved DRS is no longer thinking about the relative load between ESXi hosts in a cluster; the main focus is on the happiness of the workloads.
- Next to VM DRS Score, DRS presents the Cluster DRS Score in the UI. It is calculated using an aggregation of all the happiness VM scores in the cluster.
- DRS will try to maximize the execution efficiency of each virtual machine in the cluster while ensuring fairness in resource allocation to all virtual machines.
- The vSphere cluster summary overview provides insights on what is happening from a DRS perspective.
- If you require more information on VM DRS Score, the new UI will provide that information to you.
5. Goodness Modeling
The VM DRS score is calculated based on the goodness model of DRS in vSphere 7. The goodness modeling enables DRS to compute the goodness (happiness) of a VM on any given host in the cluster. Looking closer into the VM DRS Score, it is simply the goodness of the VM on its current host expressed as a percentage. To understand how DRS calculates the VM DRS Score, we need to understand the goodness modeling in vSphere 7.
Important Note: One more time, you MUST read the referenced articles. There you will find more and key information about:
- Goodness Modeling
- CPU Costs
- Memory Costs
- Networking Cost
- Migration Cost
- Insights on Metrics
The Goodness Modeling is referenced in: vSphere 7 – A Closer Look at the VM DRS Score
vSphere 7 – A Closer Look at the VM DRS Score
The topic reviewed in this article is part of the VMware vSphere 7.x Exam (2V0-21.20), which leads to the VMware Certified Professional – Data Center Virtualization 2021 certification.
Section 1 - Architectures and Technologies.
Objective 1.6.3 – Describe how Distributed Resource Scheduler (DRS) scores virtual machines.
See the full exam preparation guide and all exam sections from VMware.
I think it could be more elaborate , if a vm has 20% as DRS score , then what does it mean and what DRS in fully automated mode will do.
From the above article, i understood that VMs with low DRS score percentage (0-20%) have to migrate. Correct me if i was wrong