VSched: Mixing Batch And Interactive Virtual Machines Using Periodic Real-time Scheduling Bin Lin Peter A. Dinda Prescience Lab Department of Electrical.

Slides:



Advertisements
Similar presentations
VSched: Mixing Batch And Interactive Virtual Machines Using Periodic Real-time Scheduling Bin Lin Peter A. Dinda Prescience Lab Department of Electrical.
Advertisements

Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Automatic Run-time Adaptation in Virtual Execution Environments Ananth I. Sundararaj Advisor: Peter A. Dinda Prescience Lab Department of Computer Science.
Increasing Application Performance In Virtual Environments Through Run-time Inference and Adaptation Ananth I. Sundararaj Ashish Gupta Peter A. Dinda Prescience.
Chapter 6: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 6: CPU Scheduling Basic.
1 Thursday, June 15, 2006 Confucius says: He who play in root, eventually kill tree.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Hardness of Approximation and Greedy Algorithms for the Adaptation Problem in Virtual Environments Ananth I. Sundararaj, Manan Sanghi, John R. Lange and.
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
The User In Experimental Computer Systems Research Peter A. Dinda Gokhan Memik, Robert Dick Bin Lin, Arindam Mallik, Ashish Gupta, Sam Rossoff Department.
An Optimization Problem in Adaptive Virtual Environments Ananth I. Sundararaj Manan Sanghi Jack R. Lange Peter A. Dinda Prescience Lab Department of Computer.
Job scheduling Queue discipline.
A Prediction-based Real-time Scheduling Advisor Peter A. Dinda Prescience Lab Department of Computer Science Northwestern University
Dynamic Topology Adaptation of Virtual Networks of Virtual Machines Ananth I. Sundararaj Ashish Gupta Peter A. Dinda Prescience Lab Department of Computer.
The Design and Performance of A Real-Time CORBA Scheduling Service Christopher Gill, David Levine, Douglas Schmidt.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
Virtual Machine Scheduling for Parallel Soft Real-Time Applications
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
1 Distributed Energy-Efficient Scheduling for Data-Intensive Applications with Deadline Constraints on Data Grids Cong Liu and Xiao Qin Auburn University.
1 University of Maryland Linger-Longer: Fine-Grain Cycle Stealing in Networks of Workstations Kyung Dong Ryu © Copyright 2000, Kyung Dong Ryu, All Rights.
Experiences with Client-based Speculative Remote Display John R. Lange & Peter A. Dinda Department of Electrical Engineering and Computer Science Northwestern.
Performance Prediction for Random Write Reductions: A Case Study in Modelling Shared Memory Programs Ruoming Jin Gagan Agrawal Department of Computer and.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
Embedded System Lab. 정범종 A_DRM: Architecture-aware Distributed Resource Management of Virtualized Clusters H. Wang et al. VEE, 2015.
Cpr E 308 Spring 2005 Process Scheduling Basic Question: Which process goes next? Personal Computers –Few processes, interactive, low response time Batch.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 5 CPU Scheduling Slide 1 Chapter 5 CPU Scheduling.
6.1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Timeshared Parallel Machines Need resource management Need resource management Shrink and expand individual jobs to available sets of processors Shrink.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
Ensieea Rizwani An energy-efficient management mechanism for large-scale server clusters By: Zhenghua Xue, Dong, Ma, Fan, Mei 1.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 32 – Multimedia OS Klara Nahrstedt Spring 2010.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
Real-Time Operating Systems RTOS For Embedded systems.
OPERATING SYSTEMS CS 3502 Fall 2017
Memory Management.
CPU SCHEDULING.
Chapter 2 Scheduling.
Chapter 1: Introduction
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Miss rate versus (period, slice)
CPU Scheduling G.Anuradha
Module 5: CPU Scheduling
3: CPU Scheduling Basic Concepts Scheduling Criteria
Ananth I. Sundararaj Ashish Gupta Peter A. Dinda Prescience Lab
Chapter5: CPU Scheduling
Dynamic Voltage Scaling
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Outline Scheduling algorithms Multi-processor scheduling
CPU scheduling decisions may take place when a process:
User-driven Scheduling Of Interactive Virtual Machines
Chapter 6: CPU Scheduling
Subject Name: Operating System Concepts Subject Number:
Processes and operating systems
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Shortest-Job-First (SJR) Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Presentation transcript:

VSched: Mixing Batch And Interactive Virtual Machines Using Periodic Real-time Scheduling Bin Lin Peter A. Dinda Prescience Lab Department of Electrical Engineering and Computer Science Northwestern University

2 Overview Periodic real-time model for scheduling diverse workloads onto hosts Virtual machines in our case Periodic real-time scheduler for Linux VSched – publicly available Works with any process We use it with type-II VMs Promising evaluation for many workloads Interactive, batch, batch parallel

3 Outline Scheduling virtual machines on a host Virtuoso system Challenges Periodic real-time scheduling VSched, our scheduler Evaluating our scheduler Performance limits Suitability for different workloads Conclusions and future work Putting the user in direct control of scheduling

4 Virtuoso: VM-based Distributed Computing User Orders a raw machine

5 User’s View in Virtuoso Model User User’s LAN VM A VM is a replacement for a physical computer Multiple VMs may run simultaneously on the same host

6 Challenges in Scheduling Multiple VMs Simultaneously on a Host VM execution priced according to interactivity and compute rate constraints –How to express? –How to coordinate? –How to enforce? Workload-diversity –Scheduling must be general

7 Our Driving Workloads Interactive workloads –substitute a remote VM for a desktop computer. –desktop applications, web applications and games Batch workloads –scientific simulations, analysis codes Batch parallel workloads –scientific simulations, analysis codes that can be scaled by adding more VMs Goals –interactivity does not suffer –batch machines meet both their advance reservation deadlines and gang scheduling constraints.

8 Scheduling Interactive VMs is Hard Constraints are highly user dependent Constraints are highly application dependent Users are very sensitive to jitter Conclusions based on extensive user studies –User comfort with resource borrowing [HPDC 2004] –User-driven scheduling [Grid 2004, in submission papers]

9 Batch Workloads Notion of compute rate Application progress proportional to compute rate Ability to know when job will be done

10 Batch Parallel Workloads Notion of compute rate Application progress proportional to compute rate Ability to know when job will be done Coordination among multiple hosts –Effect of gang scheduling

11 Outline Scheduling virtual machines on a host Virtuoso system Challenges Periodic real-time scheduling VSched, our scheduler Evaluating our scheduler Performance limits Suitability for different workloads Conclusions and future work Putting the user in direct control of scheduling

12 Periodic Real-time Scheduling Model Task runs for slice seconds every period seconds [C.L. Liu, et al, JACM, 1973] –“1 hour every 10 hours”, “1 ms every 10 ms” Does NOT imply “1 hour chunk” (but does not preclude it) –Compute rate: slice / period 10 % for both examples, but radically different interactivity! –Completion time: size / rate 24 hour job completes after 240 hours Unifying abstraction for diverse workloads –We schedule a VM as a single task –VM’s (slice, period) enforced

13 EDF Online Scheduling Dynamic priority preemptive scheduler Always runs task with highest priority Tasks prioritized in reverse order of impending deadlines –Deadline is end of current period EDF=“Earliest Deadline First”

14 EDF Admission Control If we schedule by EDF, will all the (slice, period) constraints of all the VMs always be met? EDF Schedulability test is simple –Linear in number of VMs Schedulable

15 VM1 VM2 VM3 VM VM1(50, 20) VM2(100, 10) VM3(1000, 300) (period, slice)Unit: millisecond VM1 arrives VM2 arrives VM3 arrives Time(millisecond) A detailed VSched schedule for three VMs

16 Outline Scheduling virtual machines on a host Virtuoso system Challenges Periodic real-time scheduling VSched, our scheduler Evaluating our scheduler Performance limits Suitability for different workloads Conclusions and future work Putting the user in direct control of scheduling

17 Our implementation - VSched Provides soft real-time (limited by Linux) Runs at user-level (no kernel changes) Schedules any set of processes –We use it to schedule type-II VMMs Supports very fast changes in constraints –We know immediately whether performance improvement is possible or if VM needs to migrate

18 Our implementation – VSched Supports (slice, period) ranging into days –Fine millisecond and sub-millisecond ranges for interactive VMs –Coarser constraints for batch VMs Client/Server: remote control scheduling –Coordination with Virtuoso front-end –Coordination with other VScheds Publicly released

19 Exploiting SCHED_FIFO Linux feature for simple preemptive scheduling without time slicing FIFO queue of processes for each priority level Runs first runnable process in highest priority queue VSched uses the three highest priority levels VSched scheduling core VSched server front-end VSched scheduled VM

20 VSched structure Client –Securely manipulate Server over TCP/SSL –Remote control Server module –EDF admission control –Remote control Scheduling Core –Online EDF scheduler manipulates SCHED_FIFO priorities Kernel –Implements SCHED_FIFO scheduling TCP Scheduling Core Shared Memory PIPE Server module Admission Control Linux kernel SSL VSCHED Client VIRTUOSO Front-end VSCHED Server SCHED_FIFO Queues

21 Outline Scheduling virtual machines on a host Virtuoso system Challenges Periodic real-time scheduling VSched, our scheduler Evaluating our scheduler Performance limits Suitability for different workloads Conclusions and future work Putting the user in direct control of scheduling

22 Basic Metrics miss rate –Missed deadlines / total deadlines miss time –Time by which deadline is missed when it is missed –We care about its distribution How do these depend on (period, slice) and number of VMs?

23 Reasons For Missing Deadlines Resolution misses: The period or slice is too small for the available timer and VSched overhead to support. Utilization misses: The utilization needed is too high (but less than 1).

24 Performance Limits Resolution –How small can period and slice be before miss rate is excessive? Utilization limit –How close can we come to 100% utilization of CPU?

25 Deterministic study Deterministic sweep over period and slice for a single VM Determines maximum possible utilization and resolution –Safe region of operation for VSched We look at lowest resolution scenario here

26 Near-optimal Utilization ~0% Miss rate Possible and Achieved Impossible Region: utilization exceeds 100% 2 GHz P4 running a 2.4 kernel (10 ms timer) Extremely narrow range where feasible, near 100% utilizations cannot be achieved Period (ms) Slice (ms) Contour of (Period, Slice, Miss Rate)

27 Performance Limits on Three Platforms Machine 1: P4, 2GHz, Linux (RH Linux 9) (10 ms timer). Machine 2: PIII, 1GHZ, Linux patched with KURT (~10 us timer). Machine 3: P4, 2GHz, Linux (RH Linux 9) (1 ms timer). Beyond these limits, miss rates are close to 100% Within these limits, miss rates are close to 0%

28 Miss Times Small When Limits Exceeded Request 98.75% utilization; too high! < 2.5 % of slice

29 Randomized Study Testcase consists of –A random number of VMs –Each with a feasible, different, randomly chosen (period, slice) constraint We plot each testcase as a point in the following

30 (period, slice) testcase Average Miss Rates Very Low and Largely Independent of Utilization and Number of VMs Example: random testcases with 3 VMs ~1% Miss Rate For All Utilizations

31 Near 100% utilization limit Miss Rates Grow At Very High Utilization Example: random testcases with 3 VMs

32 Max missed percent Miss Time is Very Small When Misses Do Occur

33 Independence from number of VMs Miss rates are largely independent of the number of VMs after two VMs –more frequent context switches from one to two VMs Miss time is very small and independent of the number of VMs

34 User Study of Mixing Batch and Interactive VMs Each user ran an interactive VM simultaneously with a batch VM –P4 2GHz, 512MB Mem, Linux 2.6.3, VMWare GSX 3.1 –Interactive VM: WinXP Pro VM –Batch VM: RH 7.3 VM with cycle soaker

35 Activities in Interactive VM Listening to MP3 (Microsoft Media Player) Watching MPEG (Microsoft Media Player) Playing 3D First Person Shooter Game (QUAKE II) Browsing web (Internet Explorer) –using multiple windows, Flash Player content, saving pages, and performing fine-grain view scrolling.

36 Setup Batch VM: (1 minute, 10 minutes) (10%) Varied period and slice of interactive VM For each activity, user qualitatively assessed effect of different combinations of (period, slice) to find minimum acceptable combination

37 Impressive Worst Case Results Most sensitive user can still tolerate applications at very low utilization Can clearly run a mix of interactive and batch VMs on the same machine, keeping users of both happy Considerable headroom for interactive VMs 10-15% Utilization

38 Scheduling Batch Parallel Applications Can we linearly control the execution rate of a parallel application running on VMs mapped to different hosts in proportion to the cycles we give it? YES Can we protect such an application from external load? YES BSP benchmark; all-to-all communication; 4 cluster nodes; compute/communicate ratio = 0.5; MFLOP/s as our metric

39 Existence of (period, slice) constraint that achieves desired utilization while resulting in only a corresponding decrease in execution rate Our target line MFLOP/s varies in direct proportion to utilization given the right (period,slice) constraints Inappropriate (period, slice) combinations

40 VSched Makes Parallel Application Performance Impervious to External Load Imbalance Contention: average number of competing processes that are runnable VSched (30ms, 15ms)

41 Conclusions Proposed periodic real-time model for VM- based distributed computing Designed, implemented and evaluated a user-level scheduler (VSched) Mixed batch computations with interactive applications with no reduction in usability Applied VSched to schedule parallel applications

42 Future work Automating choosing schedules straightforwardly for all kinds of VMs Automating coordination of schedules across multiple machines for parallel applications Incorporate direct human input into the scheduling process –Forthcoming papers

43 Letting the Naïve User Choose Period and Slice Goal: Non-intrusive interface –Used only when user is unhappy with performance –Instantly manipulated to change the schedule Preview of further results –GUI (showing cost) –Non-centering joystick

44 For More Information –Prescience Lab (Northwestern University) –Virtuoso: Resource Management and Prediction for Distributed Computing using Virtual Machines VSched is publicly available from