An Efficient Virtual CPU Scheduling Algorithm for Xen Hypervisor in Virtualized Environment

Similar documents
The Performance Improvement of an Enhanced CPU Scheduler Using Improved D_EDF Scheduling Algorithm

Improving CPU Performance of Xen Hypervisor in Virtualized Environment

RT- Xen: Real- Time Virtualiza2on. Chenyang Lu Cyber- Physical Systems Laboratory Department of Computer Science and Engineering

RT#Xen:(Real#Time( Virtualiza2on(for(the(Cloud( Chenyang(Lu( Cyber-Physical(Systems(Laboratory( Department(of(Computer(Science(and(Engineering(

RT- Xen: Real- Time Virtualiza2on from embedded to cloud compu2ng

Real-Time Internet of Things

Real-time scheduling for virtual machines in SK Telecom

Abstract. Testing Parameters. Introduction. Hardware Platform. Native System

Janus: A-Cross-Layer Soft Real- Time Architecture for Virtualization

CFS-v: I/O Demand-driven VM Scheduler in KVM

Real-Time Virtualization and Cloud Computing

Supporting Soft Real-Time Tasks in the Xen Hypervisor

Virtual Asymmetric Multiprocessor for Interactive Performance of Consolidated Desktops

PROCESS SCHEDULING Operating Systems Design Euiseong Seo

A Virtual Storage Environment for SSDs and HDDs in Xen Hypervisor

A Real-Time Scheduling Framework Based on Multi-core Dynamic Partitioning in Virtualized Environment

Multiprocessor Scheduling. Multiprocessor Scheduling

Scheduler Support for Video-oriented Multimedia on Client-side Virtualization

Evaluate the Performance and Scalability of Image Deployment in Virtual Data Center

CISC 7310X. C05: CPU Scheduling. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 3/1/2018 CUNY Brooklyn College

An Asymmetry-aware Energy-efficient Hypervisor Scheduling Policy for Asymmetric Multi-core

International Journal of Computer & Organization Trends Volume5 Issue3 May to June 2015

Using MySQL in a Virtualized Environment. Scott Seighman Systems Engineer Sun Microsystems

Multimedia Systems 2011/2012

Virtualization. join, aggregation, concatenation, array, N 1 ühendamine, agregeerimine, konkateneerimine, massiiv

RT-OpenStack: CPU Resource Management for Real-Time Cloud Computing

Multi-Mode Virtualization for Soft Real-Time Systems

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

A Virtual Storage Environment for SSDs and HDDs in Xen Hypervisor

Tackling the Management Challenges of Server Consolidation on Multi-core System


Recap. Run to completion in order of arrival Pros: simple, low overhead, good for batch jobs Cons: short jobs can stuck behind the long ones

8: Scheduling. Scheduling. Mark Handley

A Robust Cloud-based Service Architecture for Multimedia Streaming Using Hadoop

Chapter 5 C. Virtual machines

CHAPTER 16 - VIRTUAL MACHINES

监控您的 SmartCloud 刘鹤 IBM 软件部

Boosting GPU Virtualization Performance with Hybrid Shadow Page Tables

International Journal of Modern Trends in Engineering and Research e-issn No.: , Date: 2-4 July, 2015

Power-Aware Scheduling of Virtual Machines in DVFS-enabled Clusters

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

Keywords: disk throughput, virtual machine, I/O scheduling, performance evaluation

Module 1: Virtualization. Types of Interfaces

Dynamic processing slots scheduling for I/O intensive jobs of Hadoop MapReduce

Embedded Systems: OS

Double Threshold Based Load Balancing Approach by Using VM Migration for the Cloud Computing Environment

Effects of Hard Real-Time Constraints in Implementing the Myopic Scheduling Algorithm

OPS-9: Fun With Virtualization. John Harlow. John Harlow. About John Harlow

MAPREDUCE FOR BIG DATA PROCESSING BASED ON NETWORK TRAFFIC PERFORMANCE Rajeshwari Adrakatti

Exploiting hardware heterogeneity in public clouds

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

Optimizing and Enhancing VM for the Cloud Computing Era. 20 November 2009 Jun Nakajima, Sheng Yang, and Eddie Dong

Virtualization. Michael Tsai 2018/4/16

Unit 5: Distributed, Real-Time, and Multimedia Systems

Fixed-Priority Multiprocessor Scheduling. Real-time Systems. N periodic tasks (of different rates/periods) i Ji C J. 2 i. ij 3

CLOUD COMPUTING IT0530. G.JEYA BHARATHI Asst.Prof.(O.G) Department of IT SRM University

Virtualization. ...or how adding another layer of abstraction is changing the world. CIS 399: Unix Skills University of Pennsylvania.

Distributed Systems COMP 212. Lecture 18 Othon Michail

A priority based dynamic bandwidth scheduling in SDN networks 1

SUSE Linux Enterprise Server: Supported Virtualization Technologies

Nested Virtualization and Server Consolidation

Task Scheduling of Real- Time Media Processing with Hardware-Assisted Virtualization Heikki Holopainen

Design of the Data-Retrieving Engine for Distributed Multimedia Presentations

CHAPTER 16 - VIRTUAL MACHINES

CS370 Operating Systems

How it can help your organisation

Microkernel/OS and Real-Time Scheduling

Virtualization and the Metrics of Performance & Capacity Management

Practice Exercises 305

CS 470 Spring Virtualization and Cloud Computing. Mike Lam, Professor. Content taken from the following:

Controlled duplication for scheduling real-time precedence tasks on heterogeneous multiprocessors

International Journal of Advanced Research in Computer Science and Software Engineering

Interrupt Coalescing in Xen

Virtual Machines. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

An Experimental Study of Load Balancing of OpenNebula Open-Source Cloud Computing Platform

INNOV-4: Fun With Virtualization. Or, How I learned to love computers that don t really exist...

A Fuzzy-based Multi-criteria Scheduler for Uniform Multiprocessor Real-time Systems

davidklee.net gplus.to/kleegeek linked.com/a/davidaklee

Implementing Virtual NVMe for Flash- Storage Class Memory

Automated Control for Elastic Storage Harold Lim, Shivnath Babu, Jeff Chase Duke University

Data Path acceleration techniques in a NFV world

HPC Performance in the Cloud: Status and Future Prospects

Windows Server 2012: Server Virtualization

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

Limitations and Solutions for Real-Time Local Inter-Domain Communication in Xen

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

SNS COLLEGE OF ENGINEERING

Accelerating NVMe-oF* for VMs with the Storage Performance Development Kit

Scalability Testing with Login VSI v16.2. White Paper Parallels Remote Application Server 2018

A comparison between the scheduling algorithms used in RTLinux and in VxWorks - both from a theoretical and a contextual view

[This is not an article, chapter, of conference paper!]

Monitoring and Analyzing Virtual Machines Resource Overcommitment Detection and Virtual Machine Classification

Accelerating String Matching Algorithms on Multicore Processors Cheng-Hung Lin

Introduction to Embedded Systems

Properties of Processes

Virtualization of the MS Exchange Server Environment

SecurOS Server / Workstation Specifications INTELLIGENT SECURITY SYSTEMS 1480 US 9 NORTH, SUITE 202 WOODBRIDGE, NJ v.2.1

Amazon EC2 Deep Dive. Michael #awssummit

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Computer Based Image Algorithm For Wireless Sensor Networks To Prevent Hotspot Locating Attack

Transcription:

An Efficient Virtual CPU Scheduling Algorithm for Xen Hypervisor in Virtualized Environment Chia-Ying Tseng 1 and Po-Chun Huang 2 Department of Computer Science and Engineering, Tatung University #40, Sec. 3, Zhongshan N. Rd., Taipei, Taiwan (R.O.C.) 1 cytseng@ttu.edu.tw, 2 g10006025@ms.ttu.edu.tw Abstract. The core of virtualization is hypervisor which directly determines the platform performance. How to allocate resource effectively becomes an important problem. Xen is an open source hypervisor and used as a virtual machine monitor. In this paper, we designed an efficient virtual CPU scheduling algorithm that combined Deadline-Monotonic Scheduling with Simple Earliest Deadline First (EDF) scheduler which was implemented on Xen. Our experiment demonstrates that the proposed algorithm reduced kernel latency better than Simple EDF in overloaded condition. Keywords: Scheduling Algorithm, Virtualization, Xen, Earliest Deadline First Scheduling 1 Introduction With the development of cloud computing, mobile device and industry automation, virtualization is widely adopted, include enterprise infrastructure, embedded virtualization and embedded systems. The core of virtualization is virtual machine monitor (hypervisor) that is responsible for allocate resource and manage virtual machine. Therefore, hypervisor is directly deciding the performance of platform. Hypervisor includes type-1 and type-2. Type-1 (Native hypervisor) which has its own scheduler is running directly on the hardware and allocates resource to virtual machine. Some examples are Xen Hypervisor and VMware ESX, etc. The type-2 (Hosted hypervisor) is running on the operating system level. Since type-2 hypervisor does not have scheduler itself, therefore, depend on operating system task scheduler. Some examples are VirtualBox and VMware Workstation. 2 Background Xen has Credit and Simple Earliest Deadline First (SEDF) scheduler. SEDF, which is implemented by famous EDF scheduling algorithm, is a dynamic-priority real-time scheduler. It provides five parameters which are period, slice, latency, extra and weight. It has different result with different combination of five parameters. In realtime environment, SEDF basically use period and slice, fully specify a domain. The ITCS 2013, ASTL Vol. 25, pp. 334-338, 2013 SERSC 2013 334

Proceedings, The 2nd International Conference on Information Technology and Computer Science period determined the period of VCPU. And slice stands for the worse case execution time. Although EDF have been proved to be an optimal algorithm for single processor system under the preemptive and under-loaded condition. In higher load, it guarantees deadline can be met, but in over-loaded condition it will cause many of deadline miss. Deadline-Monotonic (DM) scheduling is fixed-priority preemptive scheduling algorithm. Deadline is relative with absolutely deadline. In higher load, it can t achieve real-time like the EDF. But in the overloaded condition, it can guarantee the higher priority task met the deadline and let lower priority task miss deadline [1]. Therefore, in overloaded condition, DM is better than EDF scheduling algorithm. Devendra Thakor [2] proposed D_EDF scheduling algorithm which combines EDF with DM. Switch algorithm by recording the deadline miss count and deadline met count. If two jobs miss the deadline continuously occur then switch EDF to DM. If ten jobs achieve the deadline then switch back to EDF. In this way, we combine with those advantages of two algorithms to speed up overall performance. This is a good concept, but there was an issue about the threshold of switch. For example, the number of domain is dynamic in Xen environment. Power on a domain, the number of VCPU is increase. Power down a domain, the number of VCPU is decrease. So the number of VCPU is dynamically in Xen environment. Consider the two situations that we have 5 and 512 of VCPUs in soft real-time systems which 6% deadline miss ratio is significant. If 2 of the 5 VCPUs that miss deadline mean miss ratio is 40%, then we should switch to DM to guarantee high priority to meet the deadline. If 2 out of the 512 VCPUs that miss deadline mean miss ratio is 0.3%, then it is not necessary to switch scheduling algorithm. Therefore, directly consider threshold by the deadline miss ratio is better than deadline miss count. In this paper, we improve the D_EDF scheduling algorithm depend on miss ratio as threshold in Xen environment. 3 Improved D_EDF Scheduling Algorithm As described in Section 2, EDF algorithm will miss deadline in overloaded condition. D_EDF is a solution of guarantee that the high priority task is completed on schedule. In the Xen environment, the number of VCPU is dynamic. It can be 1~512. The scheduling model we have two levels where guest operating system scheduler is responsible for scheduling the tasks, and virtual machine monitor scheduler is responsible for deploying VCPU on PCPU. Every domain has allocate one VCPU and unmodified kernel. All the VCPU 0 of domain-u are used PCPU 0. And VCPU 0 of Domain-0 pin to PCPU 1. To avoid high frequency switching between two strategies that may cause heavy overhead by little change, define a suitable threshold is very important. First, scheduler must record deadline miss count and deadline met count, then calculate deadline miss ratio. Second, it will check the deadline ratio of past 256 VCPUs if it is achieving threshold or not. Define each 256 VCPUs as one period. Observe past period and decide which strategy should be used on next period. If deadline miss ratio greater than 6% means system overloaded, then switch to DM from SEDF. Otherwise, 335

An Efficient Virtual CPU Scheduling Algorithm for Xen Hypervisor in Virtualized Environment if deadline miss ratio equal zero in past period, then switch to SEDF from DM. Finally, reset the miss_count and total every period. Fig. 1. SEDF_DM switching threshold We extend the SEDF algorithm using improved D_EDF algorithm. SEDF defines that each PCPU has a runnable queue which store runnable VCPU defined in SEDF. The runnable queue is ordered by using deadl_abs as comparing operator. When a VCPU needed to be run, it picks the first VCPU from the queue and returns it. We create a scheduler called sched_sedfdm.c which based on sched_sedf.c that Xen provided. The scheduler sorts the runnable queue by using merge sort with variable slice for DM. When switch back to SEDF, re-sorting the run queue with variable deadl_abs. In update_queues(), create two variable that miss_count and total to record deadline miss and total number of VCPUs in queue. If deadline miss, then miss_count increase. And determine whether deadline miss ratio greater than 6% by following relationship: Deadline Miss Ratio = FOR each VCPU in runnable queue total increase IF deadline miss THEN miss_count increase END IF END FOR Fig. 2. Pseudo code of partly update_queue() Miss Count Total > 6% 4 Evaluation 4.1 Experiment Setup The experiment hardware platform was on Intel Core i7-920 2.66 GHz (Turbo 2.93 GHz) without hyper-threading, MSI X58 Pro-E motherboard, six 2 GB DDR3 336

Proceedings, The 2nd International Conference on Information Technology and Computer Science SDRAM memory, and WD5000AALS 500 GB disk. Software platform was on Kernel 3.2.0-38, Ubuntu 12.04.2 LTS server 64-bit and Xen 4.2.1 version. Domain-0 has a VCPU with pin to PCPU 1, 1 GB memory, and 40 GB LVM. All domain-u which paravirtualization machine each has a VCPU without pin, 1 GB memory, and 40 GB LVM. The six domain-u named Domain-1, Domain-2,, and Domain-6. The values of slice were 50, 54, 58, 62, 66 and 70. And the value extra was zero. 4.2 Comparison of SEDF, D_EDF and SEDF_DM We use Cyclictest to measure kernel latency of SEDF, D_EDF, and SEDF_DM. To make the 100% CPU load environment, Domain-5 and Domain-6 both run CPUintensive work. Domain-1~Domain-4 run simultaneously the Cyclictest with 150,000 times. In Fig. 3, x-axis means number of domain and y-axis means average kernel latency time in microseconds. In 100% load condition, the average kernel latency of D_EDF is 81% ~ 89k% of SEDF, and SEDF_DM is 82% ~ 85% of SEDF. In no load condition, D_EDF and SEDF_DM are approximately the same as SEDF. Fig. 3. The kernel latency of each scheduler 5 Conclusion In this paper, we implement SEDF_DM scheduler which based on improved D_EDF algorithm, and compare kernel latency of SEDF, D_EDF and SEDF_DM. The experiment result was shown that the overhead of records which are deadline miss count, total or met count is very little. We evaluate the kernel latency in underloaded and overloaded condition. The result shows D_EDF and SEDF_DM are approximate the same as SEDF in under-loaded condition. The CPU time of SEDF_DM is 89 percent of SEDF, and kernel latency is 86 percent of SEDF in overloaded condition. 337

An Efficient Virtual CPU Scheduling Algorithm for Xen Hypervisor in Virtualized Environment References 1. Zheng, Zhiyun, Ying Zhang, Zhenfei Wang, Xingjin Zhang, Liping Lu: The multiprocessor load balance scheduler based on XEN. In: 2012 International Conference on Systems and Informatics (ICSAI), May. 2012: 905-909. 2. Thakor, Devendra, and Apurva Shah: "D_EDF: An efficient scheduling algorithm for realtime multiprocessor system. In: 2011 World Congress on Information and Communication Technologies (WICT), Dec. 2011: 1044-1049. 3. Tseng, Chia-Ying, Sheng-Chih Lin, Lee-Chung Chen, Hui-Kuang Chung: The Performance Improvement and Evaluation of an Enhanced CPU Scheduler in Virtualized Environment. In: Proceedings of the 2011 International Conference on e-case & e-tech, Jan. 2011: 3107-3123. 4. Xi, Sisu, Justin Wilson, Chenyang Lu, Christopher Gill: Rt-xen: Towards real-time hypervisor scheduling in xen. In: 2011 Proceedings of the International Conference on Embedded Software (EMSOFT), Oct. 2011: 39-48. 5. Ye, Kejiang, Xiaohong Jiang, Siding Chen, Dawei Huang, Bei Wang: Analyzing and modeling the performance in xen-based virtual cluster environment. In: 2010 IEEE 12th International Conference on High Performance Computing and Communications (HPCC), Sep. 2010: 273-280. 6. Yu, Peijie, Mingyuan Xia, Qian Lin, Min Zhu, Shang Gao, Zhengwei Qi, Kai Chen, Haibing Guan: Real-time Enhancement for Xen hypervisor. In: 2010 IEEE/IFIP 8th International Conference on Embedded and Ubiquitous Computing (EUC), Dec. 2010: 23-30. 7. Kim, Hwanju, Hyeontaek Lim, Jinkyu Jeong, Heeseung Jo, Joowon Lee: Task-aware virtual machine scheduling for I/O performance. In: Proceedings of the 2009 ACM SIGPLAN/SIGOPS international conference on Virtual execution environments, Mar. 2009: 101-110. 338