VMware has released a paper titled: “The CPU Scheduler in VMware vSphere 5.1“. The paper which contains 26 pages provides detailed explanations of ESXi CPU scheduling policies to help vSphere users who want to understand how virtual machines are scheduled.
The CPU scheduler is an essential component of vSphere 5.x. All workloads running in a virtual machine must be scheduled for execution and the CPU scheduler handles this task with policies that maintain fairness, throughput, responsiveness, and scalability of CPU resources.
The paper contains the following sections:
- Executive Summary
- Introduction
- Terminology
- CPU Scheduler Overview
- Proportional Share-Based Algorithm
- Relaxed Co-Scheduling
- Load Balancing
- Policy on Hyper-Threading
- NUMA Scheduling Policy
- Experiments
- Conclusion
- References
The ESXi CPU scheduler achieves fair distribution of compute resources among many virtual machines without compromising system throughput and responsiveness. Relaxed co-scheduling is a salient feature that enables both correct and efficient execution of guest instructions with low overhead. The ESXi CPU scheduler is highly scalable and supports very big systems and wide virtual machine.
vSphere 5.1 optimizes the load-balancing algorithm introduced in 5.0. It results in noticeable reductions in CPU scheduling overhead. A policy change on hyper-threaded systems enables out-of-the-box performance of 5.1 exceeding that of a tuned version of vSphere 4.1. No special tuning is required to achieve the best performance for most common application workloads. The irtual NUMA feature introduced in 5.0 can significantly improve performance of workloads that are optimized for a NUMA environment. With vNUMA, virtual machines of any size can display optimal performance on a NUMA system. The vNUMA feature is shown to significantly improve the performance of SPEC OMP workloads. Such improvement closes the performance gap between the virtual and the native environment for high-performance-computing (HPC) workloads.