HyperBench-2.0

HyperBench

HyperBench is a set of micro-benchmarks for analyzing how much hardware mechanisms and hypervisor designs support virtualization. HyperBench is implemented as a a custom Linux kernel driver, which runs in a VM. Currently, it can run on both x86 and ARM platforms. There are 8 micro-benchmarks currently covering CPU, memory system, and I/O. These benchmarks cause various hypervisor-level events, such as transitions between VMs and the hypervisor, two-dimensional page walk, and notification from front-end to back-end driver. HyperBench aimed at quantifying these costs.

Quick Start

Download HyperBench

git clone https://github.com/Second222None/HyperBench-V2.0.git -b dev

Run HyperBench manually

cd Hyperbench-V2.0
sudo ./loop.sh

If the kernel is installed from source code. The compile command looks like so (our kernel version linux-5.0):

make BASEINCLUDE=~/linux-5.0

Run HyperBench automatically

Prerequisite

 +---------+                  +---------+
 |  Host   |                  |   VM    |
 +----+----+                  +----+----+
      |                            |     
      |                            |
      |<---------hyperbench--------+
      |                            |
      +------------start---------->|
      |                            |
      |<------------ack------------+
      |                            |
      |<----------finish-----------+
      |                            |
      |------------stop----------->|
      |                            |
      |<-----------ack-------------+
      |                            |
      |<----------finish-----------+
      |                            |
      |<------------scp------------+
      |                            |
                                   

Host:

python server.py

VM: This command executes automatically after the vm boots.

python client.py 10.10.27.18 hyperbench

Start the above command automatically after the VM has booted.

[Unit]
Description=HyperBench
After=network.target auditd.service
ConditionPathExists=/home/ubuntu/HyperBench-V2.0/hyperbench.sh
ConditionUser=root

[Service]
ExecStart=/home/ubuntu/HyperBench-V2.0/hyperbench.sh

[Install]
WantedBy=multi-user.target
Alias=hyperbench.service

E7-4820v2

Benchmarks

Idle

Idle benchmark performs two consecutive reads of the time counter. It is used to check the stability of the measurement results. Ideally, the result is zero.

Sensitive Instruction

Nearly all CPU virtualization techniques are developed to handle sensitive instructions correctly. Therefore, sensitive instructions are necessary for comparing different CPU virtualization techniques.

Virtualization Extension Instructions

Memory

I/O

Appendix

  <cputune>
    <vcpupin vcpu="0" cpuset="4"/>
    <vcpupin vcpu="1" cpuset="5"/>
    <vcpupin vcpu="2" cpuset="6"/>
    <vcpupin vcpu="3" cpuset="7"/>
  </cputune>

Notes: