Distributed Resource Scheduler or DRS is an add-on feature of VI 3 infrastructure that is managed by Virtual Center. DRS allow balancing the CPU and memory resources of the virtual machines or VMs and the other ESX servers in the cluster.
DRS helps to balance the CPU and memory of its cluster members based on the configured resource pool policies such as shares, reservations and limits. The hosts and VMs are continuously monitored by the virtual center. Based on the configuration, if there is any imbalance of resources, the VMs are moved across the hosts in the DRS cluster.
The placement of VMs across the cluster can be configured based on:
- Affinity and anti-affinity rules – Rules that define which VMs can run together (affinity) and cannot run together(anti-affinity) in any given host. A perfect example for anti-affinity would be placement of a SQL server and Exchange server. At any point of time, you don’t want to place both the servers in the same host.
- VMotion compatibility – VMotion has it’s own set of requirements to move the VMs across the hosts. For example, if a VM that has a local network (not connected to any physical adapter) cannot be moved using VMotion.
Based on the environment and needs DRS automation can be set to the following levels:
- Manual – DRS only provides recommendation on placing the VMs. Manual action is required to place them on recommended hosts
- Partially automated – During VM power-on, they will be placed on the DRS recommended hosts. VM migrations caused by resource imbalance will be recommended by DRS but won’t be moved automatically
- Fully automated – DRS automatically places the VM during power-on also during resource imbalance on the DRS recommended hosts. The migration threshold level can also be set with this level between conservative and aggressive using a slide bar.
Few factors to consider about DRS:
- There can be up to 32 hosts per DRS cluster.
- It’s recommended to use combination of DRS automation levels based on the critical nature of VMs. To accomplish this, the cluster level DRS automation can be overridden by the VM level automation setting.
- In the manual and partial automation level, it is important to pay attention to the number of stars on the recommendation. A 5-star recommendation should always be considered and applied.
- Swap file location for the VMs is configurable in the DRS cluster and it is recommended to keep the swap file in the same directory in the VMFS datastore for performance reasons. Choosing to keep the swap file of the VM in the datastore based on the host setting will result in a poor VMotion performance during a resource imbalance.
More details about DRS cluster can be found here: