Real-time task latency in general-purpose hypervisors - testing the limits
Emulating a RT task and measuring the response latency of its thread by means of the high-resolution testing tool Cyclictest. The thread was clocked at 10ms, and a FIFO scheduling policy was used, with the thread being assigned the highest priority. Measurements were performed in distinct testing environments, some of which had best effort concurrent threads competing for the machine resources. For this purpose, the workload generator tool stress was used. A total of 20 simultaneous workers were instantiated (10 exercising the CPU by spinning on square root function, and 10 spinning on malloc/free operations with 64 MB blocks), which was enough to overload the available cores. Each test had a duration of 8 hours, which led to over 2.5 million samples per test.
The underlying hardware consisted of an Asus PRIME H410M-A motherboard, with an Intel® Core™ i5-10400F 2.9GHz CPU with 6 cores, and 16GB DDR4 RAM running at 2666MHz.
- Asus PRIME H410M-A motherboard, with an Intel® Core™ i5-10400F 2.9GHz CPU with 6 cores, and 16GB DDR4 RAM running at 2666MHz.
Virtual Machine - General Purpose OS
- Ubuntu Server 20.04, with kernel version 5.4.0-86-generic
Virtual Machine - Real-time OS
- Ubuntu Server 20.04, with kernel version 5.4.0-86-generic patched with Xenomai 3.1 (Cobalt variant)
For each system profile there are 2 folders (general purpose OS, real-time OS). Inside each, one may find the outcome of the results for each test. The files are numbered according to the testing profile.
#1 - baseline (bare-metal ubuntu installation without any hypervisor)
#2 - hypervisor A (type 1 hypervisor)
#3 - hypervisor B (type 1 hypervisor)
#4 - hypervisor C (type 1 hypervisor)
#1 – RT task executed without core affinity or concurrent workload;
#2 – RT task executed with core affinity and without concurrent workload;
#3 – RT task executed without core affinity and with concurrent workload;
#4 – RT task executed with core affinity and with concurrent workload (RT task and concurrent workload running in distinct cores);
#5 – Three VMs running simultaneously. The first executing the RT task and the others running concurrent workloads. No core affinity was used for the RT task.
#6 – Three VMs running simultaneously. The first executing the RT task and the others running concurrent workloads. Core affinity was used for the RT task.