Blog post

1.6.1 – Describe Distributed Resource Scheduler (DRS)

DRS improves resource allocation across all hosts in a cluster. It aggregates computing capacity across a collection of servers into logical resource pools. It allows for automatic placements of workloads in a cluster and to ensure that virtual workloads are “happy”. You also get control of the automation level and you can configure affinity and anti-affinity rules. 

It’s used for: 

  • Load balancing 
  • Migrating VMs when an ESXi host is put into maintenance mode. 
  • Initial placement of a VM when its powered on 

DRS attempts to improve resource use across the cluster by performing automatic migrations of VMs. 

vSphere DRS is VM focused: 

  • When a VM is powered on, DRS operates on an individual VM basis by ensuring that each VMs resource requirements are met.
  • DRS calculates a score for each VM and gives recommendations for meeting VMs resource requirements. 

DRS settings can be viewed and these include both automation level settings and migration threshold settings.

The automation level determines whether vSphere DRS makes migration recommendations or automatically places VMs on hosts. DRS makes placement decisions when a VM powers on and when VMs must be rebalanced across hosts. 

  • Manual: DRS lists recommendations on which hosts to place the VM.
  • Partially automated: DRS places the VM on the best-suited host and when the cluster becomes imbalanced, DRS displays recommendations for a VM migration.
  • Fully automated: DRS places the VM on the best-suited host and when the cluster becomes imbalanced, DRS migrates the VMs from overused hosts to underused hosts. 

The migration threshold determines how aggressively DRS selects to migrate VMs 

  • Level 1 (Conservative): Applies only priority 1 recommendations, such as affinity rules and host maintenance 
  • Level 2: Apply priority 1 and 2 recommendations, that promises a significant improvement to the cluster’s load balance 
  • Level 3 (default): Apply priority 1, 2 and 3, that promises at least good improvement to the cluster’s load balance 
  • Level 4: Apply priority 1,2,3 and 4, that promises even a moderate improvement to the cluster’s load balance 
  • Level 5 (Aggressive): Apply all recommendations, that promises even a slight improvement to the cluster’s load balance 

You can override these automations with VM-level automation on a VM basis.  

  • Predictive DRS, uses DRS and vRealize Operations Manager to combine data to predict future demand and determine when and where high resource utilization occurs. 
  • Distributed Power Management, allows a DRS-enabled cluster to reduce power consumption by powering ESXi hosts in a cluster on and off, based on resource utilization. 

DRS data collector retrieves data from: 

  • Resource usage statistics from ESXi hosts 
  • Predicted usage statistics from the vRealize Operations Manager server 

Predicted usage statistics always takes precedence over current usage statistics. 

When DRS is configured, the VM swap files should be inside the VM’s directory. By default its located on a datastore in the folder containing all the other VM files. 

DRS VM affinity rules specify that selected VMs be placed either on the same host (affinity) or separate hosts (anti-affinity). 

  • Affinity: Use for multi-VM systems where VMs communicate heavily with each other 
  • Anti-Affinity: use for multi-VM systems where load balancing or HA is desired

If any of these rules conflict each other, you are prevented from activating both. If you edit any rule and the host is in violation of that rule, the cluster continues to operate and tries to correct the violation. 

A VM-Host Affinity (or anti-affinity) rule creates a relationship between a VM group and a host group, and is either a required rule or a preferential rule 

Possible rule options: 

  • Must run on hosts in group 
  • Should run on hosts in group 
  • Must not run on hosts in group
  • Should not run on hosts in group 

It specifies if the members of a selected VM group can run on the members of a specific host group. A preferential rule is softly enforced and can be violated if necessary to allow the proper functioning of DRS, HA and vSphere DPM. A required rule is strictly enforced and can never be violated. It’s usually used when software has specific licensing restrictions. 

To use DRS, your hosts must be part of a vSphere vMotion network and all hosts are configured to use shared storage.

Facebook
Twitter
LinkedIn