Friday, 2 June 2023

Failover Cluster VM Load Balancing in Windows Server

Windows Server 2016 introduced the Virtual Machine Load Balancing feature for Failover Clusters. This feature optimizes node utilization by redistributing VMs based on memory pressure and CPU utilization. In this blog post, we will explore the command and usage of this feature.

Heuristics for Balancing:

VM Load Balancing considers two heuristics:

  • Current Memory pressure: Evaluates the memory usage of each node.
  • CPU utilization: Monitors CPU usage averaged over a 5-minute window.

Controlling Aggressiveness of Balancing:

To configure the balancing aggressiveness:

Open PowerShell.
Run (Get-Cluster).AutoBalancerLevel = <value>

AutoBalancerLevel values:

  1. (default): Low aggressiveness, moves VMs when host is >80% loaded.
  2. Medium aggressiveness, moves VMs when host is >70% loaded.
  3. High aggressiveness, averages nodes, and moves VMs when host is >5% above average.

Controlling VM Load Balancing:

To configure when load balancing occurs:
Using Failover Cluster Manager:

  1. Right-click on cluster name, select "Properties."
  2. Go to the "Balancer" pane and configure desired settings.

Using PowerShell:

  1. Open PowerShell.
  2. Run (Get-Cluster).AutoBalancerMode = <value>

AutoBalancerMode values:
  • 0: Disabled.
  • 1: Load balance on node join.
  • 2 (default): Load balance on node join and every 30 minutes.

VM Load Balancing vs. SCVMM Dynamic Optimization:

For deployments without SCVMM, VM Load Balancing provides in-box functionality. However, for SCVMM deployments, SCVMM Dynamic Optimization is recommended for load balancing. SCVMM automatically disables VM Load Balancing when Dynamic Optimization is enabled.

No comments:

Post a Comment