Ask a VCI – Jesse Hauf
Have you ever noticed that sometimes (not always) vSphere’s Distributed Resource Scheduler (DRS) prefers to move just a few virtual machines or even one virtual machine in particular between hosts to maintain balance? I like to call these “candy virtual machines” and much like we prefer sweets over something healthy, DRS prefers some virtual machines over other virtual machines.
DRS uses an algorithm to find which hosts deviate the furthest from overall cluster resource usage. In order to rebalance an unbalanced cluster, DRS uses a well thought out algorithm to find the best way to move virtual machines.
Part of DRS’s algorithm is to do a risk analysis to look at historically stable versus unstable workloads across virtual machines running in a cluster. Virtual machines with a low and stable workload (both CPU and Memory is analyzed) will tend to be preferred by DRS. Thus, these virtual machines are our “Candy VMs”. This is because DRS tries to be as proactive as possible. If DRS moved an unstable VM to another host in the cluster, the likelihood of that virtual machines resources changing is much higher. This will also correlate to a higher probability that DRS will have to move another virtual machine to rebalance the load. The goal of DRS is to get the best balance of resources across a cluster in the least amount of moves possible in order to minimized overall potential cluster impact. “Candy VMs” will insure the over longevity of maintaining balanced cluster resources because the likelihood of that virtual machines workload changing is much lower.
If this becomes troublesome you have two options. The first is to override this individual VMs DRS automation level and set it to “Partially Automated.” If you continue to see “Candy VMs” flourish you may also consider tuning the cluster settings to a more conservative level of “Full Automation.”
Do you have “Candy VMs” running in your cluster? How many and what are they running?