Business Hypervisors for Real-Time Applications
Total Page:16
File Type:pdf, Size:1020Kb
Engineering, Technology & Applied Science Research Vol. 5, No. 4, 2015, 832-840 832 Business Hypervisors for Real-time Applications Luc Perneel H. Fayyad-Kazan Long Peng Fei Guan Martin Timmerman Department of Electronics Department of Department of Electronics Department of Department of Electronics and and Informatics, Vrije Electronics and and Informatics, Vrije Electronics and Informatics, Vrije Universiteit Universiteit Brussel, Informatics, Vrije Universiteit Brussel and Informatics, Vrije Brussel, Belgium and Dedicated- Belgium Universiteit Brussel, Dedicated-Systems Universiteit Systems Experts, Belgium luc.perneel Belgium Experts, Belgium Brussel, Belgium martin.timmerman @vub.ac.be [email protected] [email protected] [email protected] @vub.ac.be Abstract— System virtualization is one of the hottest trends in commercial ones as VMware vSphere ESXi, VirtualBox, information technology today. It is not just another nice to use OKL4, Parallels Workstation and Microsoft Hyper-V [3]. technology but has become fundamental across the business world. It is successfully used with many business application classes where Theoretically speaking, as a bare-metal hypervisor has cloud computing is the most visual one. Recently, it started to be direct access to the hardware resources rather than going used for soft Real-Time (RT) applications such as IP telephony, through a hosting operating system, it is more efficient, media servers, audio and video streaming servers, automotive and delivers greater scalability, robustness and performance [4]. communication systems in general. Running these applications on Therefore, bare-metal hypervisors are our focus in this paper. a traditional system (Hardware + Operating System) guarantee their Quality of Service (QoS); virtualizing them means inserting a Virtualization is successfully used with many business new layer between the hardware and the (virtual) Operating System application classes where cloud computing is the most visual (OS), and thus adding extra overhead. Although these applications’ one. However, the growing set of applications also includes areas do not always demand hard time guarantees, they require the soft-real time applications such as media-based ones. It is underlying virtualization layer supports low latency and provide obvious that the hypervisor layer between the hardware and the adequate computational resources for completion within a OS running in a VM incurs extra overhead compared to a non- reasonable or predictable timeframe. These aspects are intimately virtualized system. This overhead can vary from one intertwined with the logic of the hypervisor scheduler. In this paper, hypervisor type to another. Moreover, there is no quantitative a series of tests are conducted on three hypervisors (VMware ESXi, benchmark of these overheads (added latencies), which in turn Hyper-V server and Xen) to provide a benchmark of the latencies makes it difficult for users to choose the hypervisor that fits added to the applications running on top of them. These tests are their requirements. conducted for different scenarios (use cases) to take into consideration all the parameters and configurations of the Currently, there are just some technical publications [5, 6], hypervisors’ schedulers. Finally, this benchmark can be used as a initiated by the hypervisor vendors themselves, comparing reference for choosing the best hypervisor-application combination. mainly the hypervisors’ supported features. More recently, a number of unbiased scientific papers originated by researchers Keywords: ESXi; Hyper-V; Virtualization; Xen; Real-time focused on the I/O performance, network throughput and CPU utilization, using public benchmark tools which are not really I. INTRODUCTION adapted for the comparison job [7, 8]. As a consequence, most System virtualization is a technology that allows the publications are not at all quantifying their statements; others physical machine resources to be shared among different give only a limited scientific proof. Virtual Machines (VMs) via the use of a software layer called Our contribution started from this point. We want to go hypervisor or Virtual Machine Monitor (VMM). The beyond theoretical statements and quantify the performance hypervisor can be either Type-1 which runs directly on the differences (in matters of latencies) between virtualization system hardware and thus is often referred to as bare-metal solutions by focusing on their architectures and internal hypervisor, or Type-2 which runs as an application on top of a components such as scheduling policies. conventional Operating System (OS) and is referred to as hosted hypervisor [1, 2]. To achieve this, different types of tests (explained further on) are executed on the top three market hypervisors: Microsoft Due to the low cost availability of multi-core chips used in (MS) Hyper-V Server 2012R2, Xen 4.2.1 and VMware a symmetrical multiprocessor way, virtualization in the server VSphere ESXi 5.1U1. All these versions were the latest and desktop world has already matured with both software and shipping releases at the time of doing this study. The tests are hardware solutions available for several years [3]. Currently, conducted for different use cases to take into consideration all there are numerous virtualization products ranging from open- the parameters and configurations of the hypervisors’ source hypervisors such as Xen, KVM, and OpenVZ to schedulers. www.etasr.com Perneel et al.: Business Hypervisors for Real-time Applications Engineering, Technology & Applied Science Research Vol. 5, No. 4, 2015, 832-840 833 II. HYPERVISORS ARCHITECTURES VM sits idle at 10% most of the time, the other 90% of the processing time is still unavailable to any other VMs. A. Microsoft Hyper-V Server 2012 R2 Note that using the “reserve” setting limits the amount of Microsoft Hyper-V is a bare-metal micro-kernerlized virtual processors that can be shared on a physical machine, hypervisor that enables platform virtualization on x86-64 and therefore limits the number of concurrent virtual machines systems [9]. It exists in two variants: as a stand-alone product you can power on. For example, if you have 20 VMs where called Hyper-V Server [10] and as an installable feature in each one is configured to have one single virtual processor Windows Server OS. In both versions, the hypervisor is exactly whose “reserve” value is 100%, and the physical machine has the same and must have at least one parent, or root VM, four cores, then you can only power on only four virtual running Windows OS 64-bit Edition [11]. The difference machines. If you try to start a 5th VM, you would get an error between the two products are the features and components message stating that you cannot initialize the virtual machine. found in the parent (privileged) VM guest OS. Note that you will get this error even if all four running virtual Once Hyper-V is installed, VMs atop it are created. All the machines are completely idle and are not using any CPU VMs except the parent VM are called child VMs (un- resource (reason mentioned before). privileged). Hyper-V supports a number of different types of A final interesting note about the virtual machine reserve is guest OSs running in the child VMs. They can be either Hyper- that by default it is set to “0%” – which means the reserve is V Aware (enlightened/para-virtualized) Windows OSs, Hyper- disabled. Furthermore – if you have a configuration like the V Aware non-Windows OSs and Non Hyper-V Aware OSs one where all CPUs are reserved, you can still start extra virtual [12]. The hypervisor needs to deal with CPU scheduling. The machines as long as their CPU reserve is set to 0% [13]. CPU scheduler shares the same role as conventional operating systems. This role is to assign execution contexts to processors Virtual machine limit: This setting is the opposite of in a way that meets system objectives such as responsiveness, “virtual machine reserve” setting. It allows you to specify the throughput, and utilization. On conventional operating systems, maximum amount of processing power that a virtual machine the execution context corresponds to a process or a thread; on can consume and is relative to the number of processors hypervisor, it corresponds to a VM. assigned to a VM. When a VM is created atop Hyper-V, several Relative Weight: It specifies how Hyper-V allocates configurations have to be set to define its behaviour when resources to a VM when more than one VMs are running and accessing hardware resources. The basic ones are shown in compete for resources. This value ranges from 0-10000 and the Figure 1 below followed by their explanations. VM with high value receives more CPU time. By default, all VMs are assigned the same weight value (100). There is no official document explaining the scheduling algorithms of Hyper-V. Fortunately, Ben Armstrong, virtualization program manager at Microsoft, posted a four part article about CPU scheduling in Hyper-V [13]. From these articles, the scheduling algorithm of Hyper-V can be summarized as follow: If there is only one VM which has one virtual CPU (vCPU), and the hosting machine has many physical cores, then this vCPU shares the processing resources of all the physical cores. It runs on all the cores in round-robin way. The parent VM is the only VM that stays parked on the first core (core 0) [14]. Thus, Hyper-V uses a weighted round-robin scheduling algorithm. The time a vCPU spends on one physical core before being scheduled to another is not specifically mentioned in any of the public resources. This is something we measured in the testing phase. Fig. 1. Hyper-V VM configuration for resources access B. Xen Virtual machine reserve: This setting specifies the Xen is an open source hypervisor developed by Barham et percentage of the physical machine’s overall CPU resources al. [30] at the University of Cambridge in 2003. It is released reserved for this particular VM.