VMware Distributed Resource Scheduler (DRS) is a system that allows you to automatically balance your virtual machines (VMs) within a VMware vSphere cluster environment. In this post, we'll review some VMware DRS tips and tricks for planning, configuring, and using vSphere DRS.
Contents of this article

A balanced cluster means that your hosts in a cluster will be equally (or almost) balanced. If your cluster is unbalanced, your VMs will be automatically hot migrated via vMotion to the hosts with the lowest resource utilization. For example, if you have DRS within your environment, you should not see a host being used at 99% and another one at 50%.

DRS takes care of balancing the VMs via vMotion. In this post, we'll give you a few tips that will allow you to get the most out of VMware DRS and make this technology worth the investment.

VMware DRS is not part of vSphere Standard and is only included in the Enterprise Plus or Platinum versions. It is always a question whether to go for a version of vSphere that has DRS or not. If I had a chance to choose, I'd certainly prefer the licensing option with VMware DRS.

To give you an idea of what's needed, let's start with the basics. VMware vSphere Distributed Resources Scheduler (DRS) requires the following:

  • VMware vCenter Server
  • VMware vSphere ESXi cluster
  • vMotion network enabled on cluster hosts
  • Enterprise Plus licensing (or higher)
  • Shared storage between ESXi hosts (traditional or hyperconverged via VMware VSAN)
  • If using predictive DRS, you will also need to be running vRealize Operations Manager (vROPs), including its license.

VMware DRS tips ^

Use homogenous hardware — The first tip concerns the hardware when forming your clusters. The VMware general rule of thumb is to choose hosts with the same or very similar hardware.

There is a reason for that. When deciding which hosts to group into DRS clusters, try to choose hosts that are as homogeneous as possible in terms of CPU and memory. This improves performance predictability and stability.

DRS speed and lower resource utilization — Upgrade to the latest version of vSphere. The latest vSphere, 6.7, is much more efficient when it comes to DRS speed and resource utilization.

While the vMotion speed itself can't get faster, because it depends on the underlying networking and storage architecture, VMware was able to optimize the speed of decision making before the vMotion happens.

In fact, they achieved 2-3 times faster decision making capability in vSphere 6.7. One of the improvements was the simplified initial placement, which now in vSphere 6.7 does not snapshot the whole environment but rather just uses continuous monitoring, allowing 1-2 seconds to be saved before each decision is made.

This is especially valuable in high-consolidation environments where you will see reduced resource consumption because of DRS enhancements and reduced latency to generate VMotions for load balancing. You will also see faster initial placement of VMs.

Use the Fully Automatic mode — The DRS Automation level can be set to Manual, Partially Automated, or Fully Automated. What's the difference?

Let's explain:

  • Manual — vCenter will only recommend moving resources.
  • Partially Automated — After you create a VM and power it ON, vCenter will automatically place the VM on the best host to keep your cluster in balance. Once the VM is powered on, vCenter will present a migration recommendation, taking into consideration the CPU and memory consumption. The vSphere admin will have to approve the migration.
  • Fully Automated — vCenter is in control of initial placement and VM migrations. Everything is fully automatic, and the admin does not see any messages concerning recommendations. No decision from the admin is necessary to keep the cluster balanced.
vSphere DRS in Fully Automated Mode

vSphere DRS in Fully Automated Mode

By default, when you enable DRS on a cluster, the automation level selected at the cluster level is applicable to all VMs that reside in that cluster. You can, however, create individual rules for VMs that need to be separated (or kept together).

Migration Threshold — This option allows you to set a threshold that, when hit, causes DRS to kick in and move VMs around to achieve a perfectly balanced state. As the performance of each VM varies, the host's CPU and memory usage vary as well.

You can move the threshold slider to use one of five settings, ranging from Conservative to Aggressive. The five migration settings generate recommendations based on their assigned priority level.

As you move the slider to the right, each setting allows the inclusion of one lower level of priority. The Conservative setting generates only priority-one recommendations (mandatory recommendations), the next level to the right generates priority-two recommendations and higher, and so on, down to the Aggressive level, which generates priority-five recommendations and higher (that is, all recommendations).

To do that, select your Cluster > Configure > vSphere DRS > Edit > The slider allows you to move from the Conservative (left) to the Aggressive (right) position.

Set DRS migration threshold in vSphere 6.7

Set DRS migration threshold in vSphere 6.7

You must determine how aggressively or conservatively that you want DRS to run. I usually keep it in the middle, because if you’re too aggressive, you will most likely be moving your VMs around way too frequently. And remember that with each move, you create pressure on the underlying infrastructure, such as storage or CPU usage. This is because the copy operations during vMotion might saturate network links, and if you don’t have 10GbE (or more), the vMotion operations will be never-ending.

If you leave the setting too low (too conservative), your VMs will not move enough, and the imbalance of your cluster will rise, or will happen more often, without being corrected.

Power off VMs you don't use — Leave powered ON only the VMs you really need. Powered-on VMs consume memory resources and typically consume some CPU resources even when idle.

Even idle VMs with their small utilization of resources can affect DRS decisions. You can obtain a small performance increase by shutting down or suspending VMs that are not being used.

DRS Affinity rules — DRS affinity rules can keep two or more virtual machines on the same ESXi host ("VM/VM affinity"), or, on the other hand, they can make sure they are always on different hosts ("VM/VM anti-affinity").

DRS affinity rules can also be used to make sure a group of virtual machines runs only on a specific group of ESXi hosts ("VM/Host affinity") or never runs on a specific group of hosts ("VM/Host anti-affinity").

Usually it's best to leave the affinity settings unchanged. In some specific and rare cases, however, specifying affinity rules can help improve performance.

To change affinity settings: Select a cluster > Configure > VM/Host Rules > Add, enter a name for the new rule, choose a rule type, and proceed through the GUI as appropriate for the rule type you selected.

Create VM:Host rule

Create VM:Host rule

Besides the default setting, the affinity setting types are:

Keep Virtual Machines Together — This affinity type can improve performance due to lower latencies of communication between machines.

Separate Virtual Machines — This affinity type can maintain maximal availability of the VMs. For instance, if they are both web server front ends to the same application, you might want to make sure that they aren't affected by server failure (if that happens). So those two VMs would not be powered off at the same time. This can also keep two domain controllers separated on two different hosts, so users can be authenticated and can access resources.

Virtual Machines to Hosts — These affinity types can be useful for clusters with software licensing restrictions or specific availability zone requirements.

Final notes ^

As you can see, VMware vSphere DRS is adaptive for many scenarios. The default settings work out of the box, but you have many choices to adapt it to your environment if needed.

Subscribe to 4sysops newsletter!

By understanding your workflows and your requirements, you'll be able to configure vSphere DRS to get the maximum performance and maximum benefit from your virtual infrastructure.

  1. Craig Tompkins 2 years ago

    DRS is not a load balancing technology.  Your hosts can be way out of balance, but if there is no contention on any of the VMs DRS will not move anything around.  Duncan has a great article here talking about this


  2. Author

    Nowhere in this post, it is mentioned. It is certainly not. Via DRS you are able to balance your clustered CPU resources across...

    vCenter Server system monitors distribution and usage of CPU and memory resources for all hosts and VMs in the cluster. DRS compares these metrics to an ideal resource utilization given the attributes of the cluster’s resource pools and virtual machines, the current demand, and the imbalance target. DRS then performs (or recommends) VM migrations.

    Quote from VMware:

    "Automated Load Balancing

    DRS spreads the virtual machine workloads across vSphere hosts inside a cluster and monitors available resources for you. Based on your automation level, DRS will migrate (VMware vSphere vMotion) virtual machines to other hosts within the cluster to maximize performance."


  3. Ferdinando Simonetti 2 years ago

    Hello Vladan.

    I need to keep a set of virtual machines together on the same ESXi host (vSphere 6.7), I've already managed to use PowerCLI (or Ansible) to generate the required DRS rule.

    But. There's always a but (at least for me). I've specified, for my test rule, some VMs previously running on different ESXi hosts. After the creation of the DRS rule, these VMs are not "converging" on the same ESXi host.

    DRS is Enabled for the vSphere cluster
    Automation Level is Fully Automated
    Apply priority 1, priority 2, and priority 3 recommendations.
    DRS provides recommendations when workloads are moderately imbalanced.
    VM distribution: Use DRS defaults: DRS distributes virtual machines across hosts to optimally provide resources for running workloads

    I have to mention, however, that the VMs have been deployed via VMware Integrated Openstack.

    Help? Suggestions? Hints? Thanks in advance!

  4. Petr Klíma 2 years ago

    Is it possible to limit number of VM's RDS moves at once?

    It is issue mainly when you put host back from maitenance. Some VM's are moved to newly enabled host and in right next DRS check they are moved away ...


Leave a reply

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *


© 4sysops 2006 - 2021


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account