Skip to content

Distributed Resource Scheduler (DRS) and High Availability (HA)

Cockpit features intelligent resource scheduling and cluster-level high availability to maximize performance, balance hypervisor workloads, and protect virtualized services from host outages.


1. Distributed Resource Scheduler (DRS)

DRS dynamically monitors CPU and memory utilization across physical hypervisor hosts in a cluster, executing live migrations to resolve resource congestion and maintain workload balance.

1.1 Overload Threshold Formula

DRS calculates the overload limit of a physical host using the following formula:

$$\text{Threshold} = 90 - (\text{MigrationThreshold} \times 5)$$

The Migration Threshold is configured on a scale of 1 (Conservative) to 5 (Aggressive). The resulting overload thresholds are:

Migration Threshold SettingCalculated Overload Threshold (CPU / Memory)Sensitivity Behavior
1 (Conservative)85%Migrates workloads only when hosts are under extreme, prolonged saturation.
280%Standard conservative setting.
3 (Balanced)75%Default balanced setting.
470%Higher sensitivity.
5 (Aggressive)65%Highly sensitive; triggers migrations at minor load imbalances.

1.2 DRS Automation Levels

Administrators can choose from three automation levels:

  1. Fully Automated: The DRS scheduler automatically executes live migrations when an imbalance exceeds the threshold.
  2. Partially Automated: The DRS scheduler evaluates placements and prompts the administrator with migration recommendations in the Tasks panel.
  3. Manual: Automatic scheduling is disabled. Workloads must be migrated manually by the administrator. The threshold slider is disabled in this mode.

1.3 Compute-Only Live Migration Rule

DRS migrations are strictly compute-only. The scheduler transfers the CPU registers and RAM state of the running virtual machine to the destination host over the network.

IMPORTANT

To be eligible for DRS load balancing, the target VM must reside entirely on a shared datastore (such as NFS or clustered OCFS2). DRS will skip any VM that contains local storage disks, as migrating local storage (block migration) incurs too much I/O overhead to be handled in automated balance loops.


2. High Availability (HA)

Cluster High Availability protects virtual workloads against physical host crashes. When HA is enabled, the Cockpit orchestrator monitors host heartbeat statuses and automatically restarts virtual machines on surviving hosts in the event of a hypervisor failure.

2.1 Configuration Parameters

  • Enable HA: Toggle switch to activate or deactivate the HA watchdog scheduler.
  • Failover Delay: The wait time in seconds (e.g., 15 seconds) before Cockpit initiates VM restarts on secondary hosts after a host is marked offline. This delay prevents split-brain VM conflicts during transient network partitions.

2.2 Control Plane Anti-Affinity Scheduling

For highly available workloads, such as a 3-node Kubernetes cluster control plane, DRS enforces strict anti-affinity rules:

  • During initial VM creation, the scheduler verifies host availability.
  • DRS schedules the 3 HA Master Control Plane VMs onto three separate physical hypervisor hosts.
  • If a host fails, the HA engine restarts the affected Master VM on a remaining host that does not already run a Master VM, maintaining quorum availability and avoiding single-point-of-failure outages.