1 Mor Harchol-Balter Carnegie Mellon University Computer Science Heavy Tails: Performance Models & Scheduling Disciplines.

Slides:



Advertisements
Similar presentations
Quantifying the Properties of SRPT Scheduling Mingwei Gong and Carey Williamson Department of Computer Science University of Calgary.
Advertisements

Effects and Implications of File Size/Service Time Correlation on Web Server Scheduling Policies Dong Lu* + Peter Dinda* Yi Qiao* Huanyuan Sheng* *Northwestern.
 Liang Guo  Ibrahim Matta  Computer Science Department  Boston University  Presented by:  Chris Gianfrancesco and Rick Skowyra.
CPU Scheduling Questions answered in this lecture: What is scheduling vs. allocation? What is preemptive vs. non-preemptive scheduling? What are FCFS,
CPU Scheduling CPU Scheduler Performance metrics for CPU scheduling
Scheduling. Main Points Scheduling policy: what to do next, when there are multiple threads ready to run – Or multiple packets to send, or web requests.
1 Size-Based Scheduling Policies with Inaccurate Scheduling Information Dong Lu *, Huanyuan Sheng +, Peter A. Dinda * * Prescience Lab, Dept. of Computer.
Simulation Evaluation of Hybrid SRPT Policies
Web Server Request Scheduling Mingwei Gong Department of Computer Science University of Calgary November 16, 2004.
The War Between Mice and Elephants Presented By Eric Wang Liang Guo and Ibrahim Matta Boston University ICNP
Maryam Elahi Fairness in Speed Scaling Design Joint work with: Carey Williamson and Philipp Woelfel.
Operating Systems 1 K. Salah Module 2.1: CPU Scheduling Scheduling Types Scheduling Criteria Scheduling Algorithms Performance Evaluation.
1 Mor Harchol-Balter Carnegie Mellon University School of Computer Science.
1 Mor Harchol-Balter Carnegie Mellon University School of Computer Science.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling The key to multiprogramming is scheduling Scheduling is done to meet the goals of –Response time.
Effects and Implications of File Size/Service Time Correlation on Web Server Scheduling Policies Dong Lu* + Peter Dinda* Yi Qiao* Huanyuan Sheng* *Northwestern.
Looking at the Server-side of P2P Systems Yi Qiao, Dong Lu, Fabian E. Bustamante and Peter A. Dinda Department of Computer Science Northwestern University.
1 Connection Scheduling in Web Servers Mor Harchol-Balter School of Computer Science Carnegie Mellon
6/25/2015Page 1 Process Scheduling B.Ramamurthy. 6/25/2015Page 2 Introduction An important aspect of multiprogramming is scheduling. The resources that.
Join-the-Shortest-Queue (JSQ) Routing in Web Server Farms
Fundamental Characteristics of Queues with Fluctuating Load VARUN GUPTA Joint with: Mor Harchol-Balter Carnegie Mellon Univ. Alan Scheller-Wolf Carnegie.
Carnegie Mellon University Computer Science Department 1 CLASSIFYING SCHEDULING POLICIES WITH RESPECT TO HIGHER MOMENTS OF CONDITIONAL RESPONSE TIME Adam.
Bandwidth Allocation in a Self-Managing Multimedia File Server Vijay Sundaram and Prashant Shenoy Department of Computer Science University of Massachusetts.
Scheduling task with heavy tail distributions Eddie Aronovich.
1 Mor Harchol-Balter Carnegie Mellon University Joint work with Bianca Schroeder.
Fundamental Characteristics of Queues with Fluctuating Load (appeared in SIGMETRICS 2006) VARUN GUPTA Joint with: Mor Harchol-Balter Carnegie Mellon Univ.
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
RAQFM – a Resource Allocation Queueing Fairness Measure David Raz School of Computer Science, Tel Aviv University Jointly with Hanoch Levy, Tel Aviv University.
1 SCHEDULING FOR TODAY’S COMPUTER SYSTEMS: SCHEDULING FOR TODAY’S COMPUTER SYSTEMS: BRIDGING THEORY AND PRACTICE Adam Wierman Mor Harchol-Balter John.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Google File System Simulator Pratima Kolan Vinod Ramachandran.
1 Server Scheduling in the L p norm Nikhil Bansal (CMU) Kirk Pruhs (Univ. of Pittsburgh)
CS 3150 Presentation 1 Ihsan Ayyub Qazi “Achievable sojourn times in M/M/1 and GI/GI/1 systems: A Comparison between SRPT and Blind Policies” A(t), Q(t)Q(t)
Aalto_inria2.pptINRIA Sophia Antipolis, France, On the Gittins index in the M/G/1 queue Samuli Aalto (TKK) in cooperation with Urtzi Ayesta.
1 CSE451 Scheduling Autumn 2002 Gary Kimura Lecture #6 October 11, 2002.
Aalto.pptACM Sigmetrics 2007, San Diego, CA, June Mean Delay Optimization for the M/G/1 Queue with Pareto Type Service Times Samuli Aalto.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
1 The Effect of Heavy-Tailed Job Size Distributions on System Design Mor Harchol-Balter MIT Laboratory for Computer Science.
Providing Differentiated Levels of Service in Web Content Hosting Jussara Almeida, etc... First Workshop on Internet Server Performance, 1998 Computer.
Carnegie Mellon University Computer Science Department 1 OPEN VERSUS CLOSED: A CAUTIONARY TALE Bianca Schroeder Adam Wierman Mor Harchol-Balter Computer.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
1 Admission Control and Request Scheduling in E-Commerce Web Sites Sameh Elnikety, EPFL Erich Nahum, IBM Watson John Tracey, IBM Watson Willy Zwaenepoel,
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
Operating Systems 1 K. Salah Module 2.2: CPU Scheduling Scheduling Types Scheduling Criteria Scheduling Algorithms Performance Evaluation.
ITFN 2601 Introduction to Operating Systems Lecture 4 Scheduling.
Analysis of SRPT Scheduling: Investigating Unfairness Nikhil Bansal (Joint work with Mor Harchol-Balter)
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
Operating Systems CPU Scheduling Algorithms
1 Task Assignment with Unknown Duration Mor Harchol-Balter Carnegie Mellon.
BSnetworks.pptTKK/ComNet Research Seminar, SRPT Applied to Bandwidth Sharing Networks (to appear in Annals of Operations Research) Samuli Aalto.
1 Mor Harchol-Balter Carnegie Mellon with Nikhil Bansal with Bianca Schroeder with Mukesh Agrawal.
Providing Differentiated Levels of Service in Web Content Hosting J ussara Almeida, Mihaela Dabu, Anand Manikutty and Pei Cao First Workshop on Internet.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
Process Scheduling. Scheduling Strategies Scheduling strategies can broadly fall into two categories  Co-operative scheduling is where the currently.
Looking at the Server-side of P2P Systems
Load Balancing and Data centers
Urtzi Ayesta (LAAS-CNRS)
Scheduling Non-Preemptive Policies
Scheduling Preemptive Policies
CPU Scheduling Basic Concepts Scheduling Criteria
Scheduling Adapted from:
Admission Control and Request Scheduling in E-Commerce Web Sites
SRPT Applied to Bandwidth Sharing Networks
Process Scheduling B.Ramamurthy 4/11/2019.
Size-Based Scheduling Policies with Inaccurate Scheduling Information
M/G/1/MLPS Queue Mean Delay Analysis
Scheduling 21 May 2019.
Mean Delay Analysis of Multi Level Processor Sharing Disciplines
Don Porter Portions courtesy Emmett Witchel
FAIRNESS IN QUEUES Adam Wierman Carnegie Mellon University cmu
Presentation transcript:

1 Mor Harchol-Balter Carnegie Mellon University Computer Science Heavy Tails: Performance Models & Scheduling Disciplines

2 “size” = service requirement load  < 1 Q: Which minimizes mean response time?

3 “size” = service requirement jobs SRPT jobs load  < 1 jobs PS FCFS Q: Which best represents scheduling in web servers ?

4 IDEA: Use SRPT instead of PS in Web servers client 1 client 2 client 3 “Get File 1” “Get File 2” “Get File 3” Request for file Requested file Linux 0.S APACHE WEB SERVER Internet

5 Objections to SRPT:   Need to know “size” of request  Unfairness to requests for big files

6 Outline of Talk THEORY IMPLEMENT Papers are joint with Adam Wierman & Bianca Schroeder I: Investigating Unfairness in SRPT (M/G/1, c.f.m.f.v.) [Sigmetrics 01] II: Unfairness in All Scheduling Policies (M/G/1, c.f.m.f.v.) [Performance 02], [Sigmetrics 03] III: Implementation of SRPT in Web servers [Transactions on Computer Systems 03], [ITC03] THEORY

7 Outline of Talk THEORY IMPLEMENT I: Investigating Unfairness in SRPT (M/G/1, c.f.m.f.v.) [Sigmetrics 01] II: Unfairness in All Scheduling Policies (M/G/1, c.f.m.f.v.) [Performance 02], [Sigmetrics 03] III: Implementation of SRPT in Web servers [Transactions on Computer Systems 03], [ITC03] THEORY

8 SRPT has a long history Schrage & Miller derive M/G/1/SRPT response time: 1968 Schrage proves optimality 1979 Pechinkin & Solovyev & Yashkov generalize 1990 Schassberger derives distribution on queue length BUT WHAT DOES IT ALL MEAN?

9 SRPT has a long history (cont.) year long study at Univ. of Aachen under Schreiber SRPT WINS BIG ON MEAN! 1998, 1999 Slowdown for SRPT under adversary: Rajmohan, Gehrke, Muthukrishnan, Rajaraman, Shaheen, Bender, Chakrabarti, etc. SRPT STARVES BIG JOBS! Various o.s. books: Silberschatz, Stallings, Tannenbaum: Warn about starvation of big jobs... Kleinrock’s Conservation Law: “Preferential treatment given to one class of customers is afforded at the expense of other customers.”

10 Real-world job sizes are Heavy Tailed Job size (x seconds) log-log plot [Sigmetrics 96] Heavy-tailed Property: “Largest 1% of jobs comprise half the load.”

11 Unfairness Question SRPT PS ? ? Let  =0.9. Let G: Bounded Pareto(  = 1.1, max=10 10 ) Question: Which queue does biggest job prefer? M/G/1

12 Results on Unfairness Let  =0.9. Let G: Bounded Pareto(  = 1.1, max=10 10 ) SRPT PS I SRPT

13 Results on Unfairness Let G: Bounded Pareto(  = 1.1, max=10 10 ) PS SRPT

14 Unfairness – General Distribution All-can-win-theorem: For all distributions, if   ½, E[T(x)] SRPT  E[T(x)] PS for all x.

15 All-can-win-theorem: For all distributions, if   ½, E[T(x)] SRPT  E[T(x)] PS for all x. Proof:    x t dt 0 )1  )   x xFx 2 2 ))1(2 (  0  x dttft 2 )( E[Wait(x)] SRPT  E[Res(x)] SRPT E[T(x)] PS

16 All-can-win-theorem: For all distributions, if   ½, E[T(x)] SRPT  E[T(x)] PS for all x. Proof cont.    x t dt 0 )1   Need sufficient condition s.t. )   x xFx 2 2 ))1(2 (  0  x dttft 2 )(

17 All-can-win-theorem: For all distributions, if   ½, E[T(x)] SRPT  E[T(x)] PS for all x. Proof cont.  Need sufficient condition s.t. )   x xFx 2 2 ))1(2 (  0  x dttft 2 )(

18 All-can-win-theorem: For all distributions, if   ½, E[T(x)] SRPT  E[T(x)] PS for all x. Proof cont.  Need sufficient condition s.t. Observe: )   x xFx 2 2 ))1(2 (  0  x dttft 2 )(

19 Proof cont. All-can-win-theorem: For all distributions, if   ½, E[T(x)] SRPT  E[T(x)] PS for all x.   1  x 2 ))1(2  )  xFx 2 ( 0  x dttft 2 )( )  xFx 2 ( 0  x dttft 2 )( Suffices that: 2(1 - r (x)) 2 > 1 - r. Suffices that r (x) < 1 / 2

20 Intuition E[Wait(x)]E[Res(x)]: small small 1) All-can-win-theorem: For all distributions, if   ½, E[T(x)] SRPT  E[T(x)] PS for all x. 2) Under Bounded Pareto distribution ( a = 1.1), r < 0.96, E[T(x)] SRPT < E[T(x)] PS for all x. *HT Property* 

21 Outline of Talk THEORY IMPLEMENT I: Investigating Unfairness in SRPT (M/G/1, c.f.m.f.v.) [Sigmetrics 01] II: Unfairness in All Scheduling Policies (M/G/1, c.f.m.f.v.) [Performance 02], [Sigmetrics 03] III: Implementation of SRPT in Web servers [Transactions on Computer Systems 03], [ITC03] THEORY

22 What is fair? Slowdown for job of size x Response time for job of size x PS does not bias towards any particular job size. Slowdown is independent of size Definition: A policy P is fair if E[S(x)] P ≤ E[S(x)] PS for all x. Otherwise, P is unfair.

23 Always Fair Always Unfair Fair for all loads and distributions Unfair for all loads and distributions Sometimes Unfair Fair for some loads, and unfair for other loads* Classification of Scheduling Policies * and distributions

24 Testing your intuition: * and distributions Always FairAlways Unfair Fair for all loads and distributions Unfair for all loads and distributions Sometimes Unfair Fair for some loads, and unfair for other loads* Where does SRPT lie? __________ What about other policies that prioritize based on remaining size? ____ What about preemptive policies that prioritize based on age? _____ What about preemptive policies that prioritize based on size? _____

25 Classification of Scheduling Policies Lots of open problems… FSP Always FAIR Always Unfair Sometimes Unfair Age- Based Policies Preemptive Remaining-size based Policies Preemptive Size-based Policies Non- preemptive PS PLCFS FB PSJF LRPT FCFS LJFSJF SRPT

26 Always Unfair Unfair for all loads and distributions Theorem: Any preemptive, size based policy, P, is Always Unfair. Always Unfair Case1: A finite size, y, receives lowest priority Case 2: No finite size receives lowest priority (2a) Priorities decrease monotonically -- PSJF (2b) Priorities decrease non-monotonically.

27 Always Unfair Unfair for all loads and distributions Theorem: Any preemptive, size based policy, P, is Always Unfair. Always Unfair Case1: A finite size, y, receives lowest priority y V = Work in System

28 Always Unfair Unfair for all loads and distributions Theorem: Any preemptive, size based policy, P, is Always Unfair. Always Unfair Case2a: Priorities decrease monotonically (PSJF) Infinite sized job has lowest priority... … but that job is treated fairly?

29 Always Unfair Unfair for all loads and distributions Theorem: Any preemptive, size based policy, P, is Always Unfair. Always Unfair Case2a: Priorities decrease monotonically (PSJF) E[S(x)] 0 PS PSJF x Finding a hump shows PSJF is Always Unfair

30 Always Unfair Unfair for all loads and distributions Theorem: Any preemptive, size based policy, P, is Always Unfair. Always Unfair Case2b: Priorities decrease non-monotonically E[S(x)] 0 PS PSJF x Find y beyond which PSJF treats all jobs unfairly. Find x > y, where x has lower priority than y. => x is treated unfairly.

31 The mysterious hump 0 x 0 PS PSJF E[S(x)] x This hump appears in many common policies, 1. PSJF 2. FB 3. SRPT 4. SJF

32 Outline of Talk THEORY IMPLEMENT I: Investigating Unfairness in SRPT (M/G/1, c.f.m.f.v.) [Sigmetrics 01] II: Unfairness in All Scheduling Policies (M/G/1, c.f.m.f.v.) [Performance 02], [Sigmetrics 03] III: Implementation of SRPT in Web servers [Transactions on Computer Systems 03], [ITC03] THEORY

33 What does SRPT mean within a Web server? Many devices: Where to do the scheduling? Many jobs at once. From theory to practice:

34 Server’s Performance Bottleneck 5 Linux 0.S. WEB SERVER (Apache) client 1 client 2 client 3 “Get File 1” “Get File 2” “Get File 3” Rest of Internet ISP Site buys limited fraction of ISP’s bandwidth We schedule bandwidth at server’s uplink.

35 Network/O.S. insides of traditional Web server Sockets take turns draining --- FAIR = PS. Web Server Socket 1 Socket 3 Socket 2 Network Card Client1 Client3 Client2 BOTTLENECK

36 Network/O.S. insides of our improved Web server Socket corresponding to file with smallest remaining data gets to feed first. Web Server Socket 1 Socket 3 Socket 2 Network Card Client1 Client3 Client2 priority queues. 1 st 2 nd 3 rd S M L BOTTLENECK

37 Experimental Setup Implementation SRPT-based scheduling: 1) Modifications to Linux O.S.: 6 priority Levels 2) Modifications to Apache Web server 3) Priority algorithm design. Linux 0.S APACHE WEB SERVER Linux Linux Linux switch WAN EMU

38 Experimental Setup APACHE WEB SERVER Linux 0.S Linux Linux Linux switch WAN EMU Trace-based workload: Number requests made: 1,000,000 Size of file requested: 41B -- 2 MB Distribution of file sizes requested has HT property. Flash Apache WAN EMU Geographically- dispersed clients 10Mbps uplink 100Mbps uplink Surge Trace-based Open system Partly-open Load < 1 Transient overload + Other effects: initial RTO; user abort/reload; persistent connections, etc.

39 Load FAIR SRPT Mean Response Time (sec) Results: Mean Response Time......

40 Percentile of Request Size Mean Response time (  s) FAIR SRPT Load =0.8 Mean Response Time vs. Size Percentile

41 Transient Overload -- Mean response time SRPT FAIR

42 Transient overload Response time as function of job size small jobs win big! big jobs aren’t hurt! FAIR SRPT

43 New project: Scheduling dynamic web requests “$$$buy$$$” “buy” Web Server (eg: Apache/Linux) Internet Database Disks Low-Priority Client Locks High-Priority Client CPU(s) Need to schedule the database...

44 Conclusion Misconceptions about unfairness Discrimination against high-performance scheduling policies Good news: Many high-performing policies are also fair in practice! Classifying policies with respect to unfairness is counter-intuitive.