Home » Intel » APIC Virtualization Performance Testing and Iozone*

APIC Virtualization Performance Testing and Iozone*

         

Introduction

Digital computer displays (VMM) emulate most visitor get entry to to interrupts and the evolved programmable interrupt controller (APIC) in a digital setting.  Additionally they virtualize all visitor interrupts. These actions require the exit and reentry of the digital machines (VM), however they’re time eating and are an enormous supply of overhead.  with a purpose to decrease that impact, Intel(R) new processors, Xeon(R) Et v2, emulate these actions within the hardware.  This new function is known as APIC virtualization (APICv).  Extra data may also be discovered at [6] and in chapter 29 of [7].

                            Determine 1 – VM-VMM interplay with and with out APICv

Determine 1 displays that every one virtualized actions touching on interrupts and APIC to and from the visitor OS have to head via VMM in techniques with out APICv.  They’re done within the hardware for techniques with APICv, no longer within the VMM.  This manner all actions can keep within the VM, consequently getting rid of the want to problem the “VM exit” command leading to lowering overhead and lengthening throughput.

In his weblog we will be able to check this new characteristic to look if it improves the throughput and the way it impacts the CPU utilization.

Terminology

Evolved Programmable Interrupt Controller (APIC) is programmable interrupt controller (PIC) that may deal with interrupts from a couple of processors.  Extra details about PIC will also be discovered right here[2].

Fread is studying a file the usage of the perform fread().  Extra details about this will also be discovered right here[8] within the obtain documentation hyperlink.

Fwrite is writing a file the use of the perform fwrite().  Extra details about this will also be discovered right here[8] within the obtain documentation hyperlink.

Visitor Running Gadget (OS) is an OS that runs in a VM.  Extra details about the visitor OS may also be discovered right here[5].

Pread is studying from a file at a given offset.

Pwrite is writing to a file at a given offset.

Random Learn is studying from a file with get right of entry to being made to random areas throughout the file.  Extra details about it may be discovered here8] in the obtain documentation hyperlink.

Random Write is writing to a file with get right of entry to being made to random places with the file.  Extra details about it may be discovered right here[8] within the obtain documentation hyperlink.

Virtualization is a solution to run a couple of impartial digital running methods on a single bodily pc.  Extra details about it may be discovered right here[1].

Digital Computer (VM) is a bit of pc software, firmware or hardware that creates and run VMs.  Extra details about it may be discovered right here[4].

The Take a look at

Iozone v3.forty two used to be chosen to check the file I/O efficiency of a machine. The beta model of the sixty four-bit Undertaking adaptation of Redhat* 7 was once used with kvm* put in on a machine with two pre-manufacturing Intel(R) Xeon(R) E5-2697 v2 processors and 64GB of RAM.  We created twelve VMs, and every VM had the identical OS on it: beta model of sixty four-bit Undertaking model of Redhat 7.

On each and every VM, Iozone will operate the check on a 100MB file with file measurement of 64KB.

The next steps had been used to assemble file I/O actions and CPU utilization:

1) Let APICv function in kvm

2) Activate just one VM

three) Ssh to execute Iozone an all working VMs

four) On the primary console, run the command sar (device process document) to gather the share CPU utilization.

5) Elevate the choice of working VMs through one and repeat the above steps ranging from step three

6) Repeat unless all VMs created are working

7) Disable APICv characteristic in kvm

eight) Repeat the above steps ranging from step three via step 7

Observe that the implications can differ from gadget to device relying on many components just like the report measurement, file measurement, form of knowledge disk and so forth.

Outcomes

Determine 2 – Share Share CPU utilization with and with out APICv

Determine 2 displays the CPU utilization raise starting from zero.26% to four.ninety eight% when in comparison with programs with and with out APICv options. This is sensible in programs with APICv. They have got requests actions served inside VMs with out going out to VMM. The outcome is much less overhead.  This interprets into extra requests being able to execute inside the comparable time period, in comparison with these of techniques with out APICv leading to extra CPU actions.  We wish to work out which elements within the CPU utilization that reasons it to extend in methods with APICv.  Additional inspecting the parts of the CPU utilization printed the values of the iowait element in programs with APICv are decrease than these in device with out APICv as can also be considered in determine 2a.  Iowait is the component of time the CPU is idle all over which the machine has a great disk I/O request.  Considering that extra requests had been being accomplished with techniques outfitted with APICvFigure eight.

~~Determine 2a – Proportion of iowait with and with out APICv

~~Determine three – Throughput of random learn with and with out APICv
With APICv the random-learn throughput elevate starting from zero.29% – 2.seventy three%

~~Determine four – Throughput of random write with and with out APICv
With APICv the random-write throughput raise starting from zero% – eight.fifty one%

~~Determine 5 – Throughput of pread with and with out APICv
With APICv the pread throughput raise starting from zero.fifty two% – 9.three%

~~Determine 6 – Throughput of pwrite with and with out APICv
With APICv the pwrite throughput elevate starting from zero.eight% – three.forty four%

~~Determine 7 – Throughput of fread with and with out APICv
With APICv the fread throughput elevate starting from zero.08% – 1.39%

~~Determine eight – Throughput of fwrite with and with out APICv
With APICv the fwrite throughput elevate starting from zero.seventy three% – four.18%

Conclusion
APICv will assist support the throughput because of much less overhead for the reason that actions when it comes to APIC are carried out within the hardware, now not in VMM.  APICv additionally will increase CPU utilization leading to much less idle time for servers. 

References
[1] http://en.wikipedia.org/wiki/Virtualization
[2] http://en.wikipedia.org/wiki/Programmable_Interrupt_Controller
[3] http://en.wikipedia.org/wiki/Virtual_machine
[4] http://en.wikipedia.org/wiki/Hypervisor
[5] http://searchservervirtualization.techtarget.com/definition/guest-OS
[6] http://www.linuxplumbersconf.org/2012/wp-content/uploads/2012/09/2012-lpc-virt-intel-vt-feat-nakajima.pdf
[7] http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf
[8] http://www.iozone.org/