Brian Babcock, Shivnath Babu, Mayur Datar, and Rajeev Motwani

Slides:



Advertisements
Similar presentations
Sampling From a Moving Window Over Streaming Data Brian Babcock * Mayur Datar Rajeev Motwani * Speaker Stanford University.
Advertisements

Analysis of : Operator Scheduling in a Data Stream Manager CS561 – Advanced Database Systems By Eric Bloom.
Maintaining Variance and k-Medians over Data Stream Windows Brian Babcock, Mayur Datar, Rajeev Motwani, Liadan O’Callaghan Stanford University.
Maintaining Variance over Data Stream Windows Brian Babcock, Mayur Datar, Rajeev Motwani, Liadan O ’ Callaghan, Stanford University ACM Symp. on Principles.
Michael Markovitch Joint work with Gabriel Scalosub Department of Communications Systems Engineering Ben-Gurion University Bounded Delay Scheduling with.
CSE506: Operating Systems Disk Scheduling. CSE506: Operating Systems Key to Disk Performance Don’t access the disk – Whenever possible Cache contents.
Adaptive Monitoring of Bursty Data Streams Brian Babcock, Shivnath Babu, Mayur Datar, and Rajeev Motwani.
Static Optimization of Conjunctive Queries with Sliding Windows over Infinite Streams Presented by: Andy Mason and Sheng Zhong Ahmed M.Ayad and Jeffrey.
Towards Feasibility Region Calculus: An End-to-end Schedulability Analysis of Real- Time Multistage Execution William Hawkins and Tarek Abdelzaher Presented.
Providing Performance Guarantees in Multipass Network Processors Isaac KeslassyKirill KoganGabriel ScalosubMichael Segal EE, TechnionCISCO & CSE, BGU.
Scheduling in Batch Systems
October 5th, 2005 Jitter Regulation for Multiple Streams David Hay and Gabriel Scalosub Technion, Israel.
6/25/2015Page 1 Process Scheduling B.Ramamurthy. 6/25/2015Page 2 Introduction An important aspect of multiprogramming is scheduling. The resources that.
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
Chain: Operator Scheduling for Memory Minimization in Data Stream Systems Authors: Brian Babcock, Shivnath Babu, Mayur Datar, and Rajeev Motwani (Dept.
Ecole Polytechnique, Nov 7, Online Job Scheduling Marek Chrobak University of California, Riverside.
1 Minimizing Latency and Memory in DSMS CS240B Notes By Carlo Zaniolo CSD--UCLA.
Modified from Silberschatz, Galvin and Gagne ©2009 Lecture 8 Chapter 5: CPU Scheduling.
Cloud and Big Data Summer School, Stockholm, Aug Jeffrey D. Ullman.
Chapter 6 CPU SCHEDULING.
Freshness-Aware Scheduling of Continuous Queries in the Dynamic Web Mohamed A. Sharaf Alexandros Labrinidis Panos K. Chrysanthis Kirk Pruhs Advanced Data.
Maintaining Variance and k-Medians over Data Stream Windows Paper by Brian Babcock, Mayur Datar, Rajeev Motwani and Liadan O’Callaghan. Presentation by.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
Competitive Queue Policies for Differentiated Services Seminar in Packet Networks1 Competitive Queue Policies for Differentiated Services William.
Load Shedding Techniques for Data Stream Systems Brian Babcock Mayur Datar Rajeev Motwani Stanford University.
Constructions of Optical Priority Queues Jay Cheng Department of Electrical Engineering & Institute of Communications Engineering National Tsing Hua University.
Loss-Bounded Analysis for Differentiated Services. By Alexander Kesselman and Yishay Mansour Presented By Sharon Lubasz
Adaptivity in continuous query systems Luis A. Sotomayor & Zhiguo Xu Professor Carlo Zaniolo CS240B - Spring 2003.
Non-Preemptive Buffer Management for Latency Sensitive Packets Moran Feldman Technion Seffi Naor Technion.
CSE 421 Algorithms Richard Anderson Lecture 8 Greedy Algorithms: Homework Scheduling and Optimal Caching.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
Memory Management.
Processes and threads.
The Stream Model Sliding Windows Counting 1’s
Load Shedding CS240B notes.
Packet Forwarding.
Virtual Memory Networks and Communication Department.
Process Scheduling B.Ramamurthy 9/16/2018.
Transport Layer Unit 5.
Chapter 6: CPU Scheduling
Load Shedding Techniques for Data Stream Systems
Process Scheduling B.Ramamurthy 11/18/2018.
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
Richard Anderson Autumn 2015 Lecture 8 – Greedy Algorithms II
Operating System Concepts
Process Scheduling B.Ramamurthy 12/5/2018.
Operating systems Process scheduling.
Greedy Algorithms: Homework Scheduling and Optimal Caching
Scheduling Algorithms to Minimize Session Delays
Richard Anderson Lecture 6 Greedy Algorithms
Process Scheduling B.Ramamurthy 2/23/2019.
Figure Areas in an autonomous system
Process Scheduling B.Ramamurthy 2/23/2019.
Richard Anderson Lecture 7 Greedy Algorithms
Query Optimization Minimizing Memory and Latency in DSMS
Richard Anderson Winter 2019 Lecture 8 – Greedy Algorithms II
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
Uniprocessor scheduling
Process Scheduling B.Ramamurthy 4/19/2019.
Load Shedding CS240B notes.
Process Scheduling B.Ramamurthy 4/24/2019.
Richard Anderson Autumn 2016 Lecture 8 – Greedy Algorithms II
Process Scheduling B.Ramamurthy 5/7/2019.
Computational Advertising and
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Richard Anderson Autumn 2015 Lecture 7
Richard Anderson Autumn 2019 Lecture 7
Presentation transcript:

Brian Babcock, Shivnath Babu, Mayur Datar, and Rajeev Motwani Chain: Operator Scheduling for Memory Minimization in Data Stream Systems Brian Babcock, Shivnath Babu, Mayur Datar, and Rajeev Motwani

Data Streams are Bursty Data stream arrival rates are often: Fast Irregular Examples: Network traffic (IP, telephony, etc.) E-mail messages Web page access patterns Peak rate much higher than average rate 1-2 orders of magnitude Impractical to provision system for peak rate

Bursts Create Backlogs Arrival rate temporarily exceeds throughput Queues of unprocessed elements build up Two options when memory fills up Page to disk Slows system, lowers throughput Admission control (i.e. drop packets) Data is lost, answer quality suffers Our goal: reduce memory needed for queueing

Outline Problem Definition Intuition Behind the Solution Chain Scheduling Algorithm Near-Optimality of Chain Scheduling Open Problems

Problem Definition Inputs: Data flow path(s) consisting of sequences of operators For each operator we know: Execution time (per block) Selectivity σ Σ Query #1 σ Query #2 Time: t4 Time: t2 Selectivity: s4 Selectivity: s2 Time: t1 Time: t3 Selectivity: s1 Selectivity: s3 Stream Stream

Progress charts σ (0,1) Opt1 Block Size (1,0.5) Opt2 (4,0.25) Opt3 (0,0) (6,0) Time

Problem Definition Inputs: Data flow path(s) consisting of sequences of operators For each operator we know: Execution time (per block) Selectivity At each time step: Adversary may add blocks of tuples to initial input queue(s) Scheduler selects one block of tuples Selected block moves one step on its progress chart Objective: Minimize peak memory usage (sum of queue sizes) σ Σ Query #1 σ Query #2 Time: t4 Time: t2 Selectivity: s4 Selectivity: s2 Time: t1 Time: t3 Selectivity: s1 Selectivity: s3 Stream Stream

Main Solution Idea Fast, selective operators release memory quickly Therefore, to minimize memory: Give preference to fast, selective operators Postpone slow, unselective operators Greedy algorithm: Operator priority = selectivity per unit time (si/ti) Always schedule the highest-priority available operator Greedy doesn’t quite work… A “good” operator that follows a “bad” operator rarely runs The “bad” operator doesn’t get scheduled Therefore there is no input available for the “good” operator

Bad Example for Greedy Tuples build up here Opt1 Opt2 Opt3 Block Size Time

Chain Scheduling Algorithm Opt1 Block Size Opt2 Lower envelope Opt3 Time

Chain Scheduling Algorithm Calculate lower envelope Priority = |slope of lower envelope segment| Always schedule highest-priority available operator Break ties using operator order in pipeline Favor later operators

FIFO: Example (0,1) Opt1 (1,0.5) Block Size Opt2 (4,0.25) Opt3 (0,0) (6,0) Time

Chain: Example (0,1) Opt1 Block Size (1,0.5) Opt2 (4,0.25) Lower envelope Opt3 (0,0) (6,0) Time

Memory Usage

Chain is Near-Optimal Theorem: Given a system with k queries, all operator selectivities ≤ 1, Let C(t) = # of blocks of memory used by Chain at time t. At every time t, any algorithm must use ≥ C(t) - k memory. Memory within constant factor of optimal offline algorithm Proof sketch: Greedy scheduling is optimal for convex progress charts “Best” operators are immediately available Lower envelope is convex Lower envelope closely approximates actual progress chart Proof on next slide…

Lemma: Lower Envelope is Close to Actual Progress Chart At most one block in the middle of each lower envelope segment Due to tie-breaking rule (Lower envelope + 1) gives upper bound on actual memory usage Additive error of 1 block per progress chart Difference

Performance Comparison spike in memory due to burst

Open Problems Avoid starvation Handle sharing between query plans Introduce deadlines (maximum allowable latency) Handle sharing between query plans Shared computation Shared data (queues store pointers) Sliding-window joins between streams Time synchronization complicates scheduling Heuristics proposed in SIGMOD ‘03 paper

Thanks for Listening! http://www-db.stanford.edu/stream