Scheduling Shared Scans of Large Data Files - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Scheduling Shared Scans of Large Data Files

Description:

Like the web crawl. Many users and queries. Shared scans (Previous Work) Multiple queries use the same scan. Web Crawl. Executor. 1. 2. 3. Scheduling Shared Scans ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 23
Provided by: paraga6
Category:

less

Transcript and Presenter's Notes

Title: Scheduling Shared Scans of Large Data Files


1
Scheduling Shared Scans of Large Data Files
  • Parag Agrawal, Daniel Kifer, Christopher Olston

Stanford University
Yahoo! Research
2
Shared Scans
  • Scans
  • DBMS access method
  • MapReduce, Hadoop, etc
  • Hadoop at Yahoo!
  • Few popular datasets
  • Like the web crawl
  • Many users and queries
  • Shared scans (Previous Work)
  • Multiple queries use the same scan

3
Scheduling Shared Scans
1
4
looks at queues and anticipates arrivals
7
Scheduler
2
3
5
8
9
10
6
Idle
not popular
4
Scheduling Objective
  • Keep wait times small
  • User-centric metric
  • Perceived Wait Time (PWT)
  • (Finish time arrival time) standalone
    execution time
  • Time in queue batch execution overhead
  • Overall
  • Maximum vs. Average
  • Hybrid
  • Trade-off
  • Parametera

5
Query Family
  • Group of shareable queries
  • Eg. scan same file
  • Shared cost S
  • Eg. IO cost
  • Non-shared costs
  • N1, N2, and N3
  • Eg. CPU cost
  • Standalone execution cost
  • SN1, SN2, SN3
  • Batch execution cost
  • SN1N2N3
  • Arrival rate ?
  • Captures popularity
  • Single file queries
  • Most Hadoop queries
  • Joins are future work

6
Practical Considerations
  • Scheduler should be lightweight
  • Priority based
  • Limited information
  • Shared cost S estimated using file size
  • Arrival rate? estimated as jobs arrive
  • Non-shared cost N hard to estimate
  • Typically small compared to S since IO-bound
  • Dropped terms
  • Analytically and experimentally justified

7
Rest of the Talk
  • Average perceived wait time (PWT)
  • Shortest Job First (SJF)
  • Resource Allocation Model
  • Wait Aware Model
  • Maximum PWT
  • Hybrid PWT
  • Experiments

8
Running Example
  • Two query families
  • Family F(requent and small)
  • S 1
  • ? ß
  • Family L(arge and infrequent)
  • S ß
  • ? 1
  • N ltlt S (take N 0)
  • ß gt 1
  • Average perceived wait time (PWT)

9
Running Example Analysis
  • Two effects
  • L frequently scanned wait times of F dominate
  • L infrequently scanned wait times of L dominate
  • Optimal schedule (computed analytically)
  • L every ß1.5 time units
  • Average perceived wait time (PWT)
  • O(ß0.5)

10
Shortest Job First (SJF)
  • Often used for response time metrics
  • Modified for batch execution
  • Job length batch time required / batch size
  • Schedule
  • L every ß2 time units
  • Average perceived wait time (PWT)
  • O(ß) vs. O(ß0.5) (optimal)

11
Shortest Job First(SJF) Analyzed
  • SJF policy can look arbitrarily bad
  • Large ß
  • Executes L too infrequently
  • Wait times for L dominate
  • ? Doesnt anticipate arrivals
  • Ignores arrival rates
  • ? Considers time spent waiting for others
  • Small jobs first

12
Resource Allocation Model
  • Continuous fractional arrival of queries
  • Dedicated executor for every query family
  • Total work constrained F/PF L/PL 1
  • Minimize average wait time PF.?F.(PF - F)
    PL.?L.(PL - L)
  • Resource allocation problem
  • Solved using Lagrange multipliers

13
Resource Allocation Model Result
  • Batch size B
  • Invariant
  • B2/?. S is constant across query families
  • Translate to scheduling policy
  • Use this as priority
  • Running Example
  • Schedule
  • Round robin
  • Average perceived wait time (PWT)
  • O(ß) vs. O(ß0.5) (optimal)

14
Resource Allocation Model Analyzed
  • Relaxation policy can look arbitrarily bad
  • Large ß
  • Executes L too frequently
  • Wait times for F dominate
  • ? Doesnt consider time spent waiting for others
  • Dedicated executors
  • ? Anticipates arrivals
  • Resource allocation

15
Wait Aware Model
  • Single executor
  • New way to count wait times
  • Priority B2/?. S - S .S?
  • Optimal for running example (O(ß0.5))
  • ? Anticipates arrivals
  • ? Considers time spent waiting for others

In paper
Resource Allocation
Shortest Job First
16
Rest of the Talk
  • Average perceived wait time
  • Shortest Job First (SJF)
  • Resource Allocation Model
  • Wait Aware Model
  • Maximum First In First Out (FIFO)
  • Hybrid Priority expression
  • Experiments

In paper
17
Experiments
  • Compare scheduling policies
  • Sensitivity to non-shared costs, estimators
  • Bursty workloads
  • Setup
  • Simulations
  • Synthetic workloads
  • Mimic Hadoop workloads at Yahoo!

18
Average PWT
FIFO Wait Aware Hybrid (0.99) SJF
Average perceived wait time
Load (?increasing)
19
Hybrid Policies
Average Maximum
Average perceived wait time
Maximum perceived wait time
Hybrid parameter a
20
Maximum PWT
FIFO Wait Aware Hybrid (0.99) SJF
Maximum perceived wait time
Load (?increasing)
21
Handling Bursty Workloads
FIFO Wait Aware Hybrid (0.99) SJF
Moving average of PWT
Time
22
Conclusion
  • Anticipating queries to
  • schedule shared scans
  • decreases wait times for users.

Thank You Parag Agrawal paraga_at_cs.stanford.edu
Write a Comment
User Comments (0)
About PowerShow.com