Xen Project Schedulers

From Xen
Revision as of 16:10, 13 October 2016 by Dariof (talk | contribs) (Tidy up and restructure the 'historical xen scheduler' section)

Overview

The Xen Project Hypervisor supports several different schedulers with different properties.

Different schedulers can be assigned to

  • an entire host
  • a pool of physical CPU’s on a host (VMs need to be assigned to a pool or pinned to a CPU)

Scheduler parameters can be modified per

  • an entire host
  • a CPU pool
  • A Virtual Machine


Schedulers in Xen 4.5 and beyond

Legend:

  • likely in 4.6
  • possible in 4.6


Scheduler Use-cases Xen 4.5 Plans for 4.6+
Credit General Purpose Supported
Default
Supported
Credit 2 General Purpose

Optimized for lower latency, high VM density

Experimental Supported
Default
RTDS Soft & Firm Real-time
Multicore
Embedded, Automotive, Graphics & Gaming in the Cloud, Low Latency Workloads
Experimental Hardening
Optimization
Better XL support
<1μs granularity
Supported
ARINC 653 Hard Real-time
Single core
Avionics, Drones, Medical
Supported?
Compile time
No change

Historical Xen Schedulers

simple Earliest Deadline First (sEDF)

Quoting from sEDF (not any longer) in-tree documentation, "this scheduler provides weighted CPU sharing in an intuitive way and uses real-time algorithms to ensure time guarantees."

The real-time algorithm used was Earliest Deadline First (EDF), although it was modified for being used as a general purpose scheduler too. It could work in both work conserving and non-work conserving modes.

It was introduced in Xen 3.0, and was the default for a while. The scheduler was never properly adapted for dealing with SMP systems and multi vCPUs VMs. Both were working, but behavior and performance were unideal and unreliable. It was eventually removed from Xen 4.6.

Borrowed Virtual Time (BVT)

A virtual time based fair-share, general purpose, scheduler in use in Xen 2.0 and 3.0. Domains's shares of CPU time were determined by their weights. What it is traditionally called quantum, or timeslice, was known there as **context switch allowance**, and was configurable. It was SMP enabled, but lacked a non-work conserving mode.

Atropos

A soft real-time scheduler, capable of providing guarantees on the absolute shares of CPU time, and allowing using the slack on a best-effort basis. Of course (as it's always the case in RT schedulers) CPU slices were only really guaranteed in absence of CPU over-commitment.

It was in use in Xen 2.0.

Round Robin

It was... well... Round Robin! IT was there as a simple demonstration of Xen's internal scheduler API, not for real production use.

Also See