the case for tiny tasks in compute clusters

29
The Case for Tiny Tasks in Compute Clusters Kay Ousterhout * , Aurojit Panda * , Joshua Rosen * , Shivaram Venkataraman * , Reynold Xin * , Sylvia Ratnasamy * , Scott Shenker *+ , Ion Stoica * * UC Berkeley, + ICSI

Upload: tamar

Post on 24-Feb-2016

25 views

Category:

Documents


0 download

DESCRIPTION

The Case for Tiny Tasks in Compute Clusters. Kay Ousterhout * , Aurojit Panda * , Joshua Rosen * , Shivaram Venkataraman * , Reynold Xin * , Sylvia Ratnasamy * , Scott Shenker *+ , Ion Stoica *. * UC Berkeley, + ICSI. Setting. …. Task. Task. Map Reduce/Spark/Dryad Job. Task. …. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The Case for Tiny Tasks in Compute Clusters

The Case for Tiny Tasks in Compute Clusters

Kay Ousterhout*, Aurojit Panda*, Joshua Rosen*, Shivaram Venkataraman*, Reynold Xin*,

Sylvia Ratnasamy*, Scott Shenker*+, Ion Stoica*

* UC Berkeley, + ICSI

Page 2: The Case for Tiny Tasks in Compute Clusters

Setting…

……

Task

Task

Task

Task

Map Reduce/Spark/

Dryad Job

Page 3: The Case for Tiny Tasks in Compute Clusters

Today’s tasks

Tiny Tasks

Use smaller tasks!

Page 4: The Case for Tiny Tasks in Compute Clusters

Why?

How?

Where?

Page 5: The Case for Tiny Tasks in Compute Clusters

Why?

How?

Where?

Page 6: The Case for Tiny Tasks in Compute Clusters

Problem: Skew and Stragglers

Contended machine?

Data skew?

Page 7: The Case for Tiny Tasks in Compute Clusters

Benefit: Handling of Skew and StragglersToday’s

tasks Tiny Tasks

As much as 5.2x reduction in job completion time!

Page 8: The Case for Tiny Tasks in Compute Clusters

Problem: Batch and Interactive Sharing

High priority interactive job

arrives

Low priority batch task

Clusters forced to trade off utilization and responsiveness!

Page 9: The Case for Tiny Tasks in Compute Clusters

Benefit: Improved SharingToday’s tasks Tiny Tasks

High-priority tasks not subject to long wait times!

Page 10: The Case for Tiny Tasks in Compute Clusters

Benefits: Recap(1)

Straggler mitigatio

n(2)

Improved

sharing

Mantri (OSDI ‘10)Scarlett (EuroSys ’11)

SkewTune (SIGMOD ‘12)Dolly (NSDI ’13)

Quincy (SOSP ‘09)Amoeba (SOCC ’12)

Page 11: The Case for Tiny Tasks in Compute Clusters

Why?

How?

Where?

Page 12: The Case for Tiny Tasks in Compute Clusters

Scheduling requirements:High

ThroughputLow LatencyDistributed Scheduling(e.g., Sparrow

Scheduler)

Schedule task

(millions per second)

(milliseconds)

Page 13: The Case for Tiny Tasks in Compute Clusters

Use existing thread pool to launch tasks

Launch task

Schedule task

Page 14: The Case for Tiny Tasks in Compute Clusters

Use existing thread pool to launch tasks

+Cache task

binariesTask launch = RPC

time (<1ms)

Launch task

Schedule task

Page 15: The Case for Tiny Tasks in Compute Clusters

Read input data

Smallest efficient file block size:

Distribute Metadata (à la Flat Datacenter Storage,

OSDI ‘12)

Launch task

Schedule task

8MB

Page 16: The Case for Tiny Tasks in Compute Clusters

Execute task + read

data for next task

Schedule task

… …

Tons of tiny transfers!

Framework-Controlled I/O(enables optimizations,

e.g., pipelining)

Read input data

Launch task

Page 17: The Case for Tiny Tasks in Compute Clusters

How low can you go?

Execute task + read

data for next task

Schedule task

100’s of milliseco

nds

Read input data

Launch task 8MB disk block

Page 18: The Case for Tiny Tasks in Compute Clusters

Why?

How?

Where?

Page 19: The Case for Tiny Tasks in Compute Clusters

Original Job

Map Task 1 …

Map Task 2 …

1234

N

…Map Task

s

Tiny Tasks Job

Reduce Task 1

…Reduce

Tasks

K1: K1: K1:

K2: K2: K3:

K5: K5: …

K1:

K1:

K1: K2

:

K2: Kn

:

Kn:

Kn:

Page 20: The Case for Tiny Tasks in Compute Clusters

Original Reduce Phase

Tiny Tasks = ?

Reduce Task 1

K1: K1: K1: K1:

K1: K1: K1: K1:

K1: K1: K1: K1:

K1: K1: K1: K1:

Page 21: The Case for Tiny Tasks in Compute Clusters

Splitting Large Tasks• Aggregation trees–Works for functions that are associative

and commutative

• Framework-managed temporary state store

• Ultimately, need to allow a small number of large tasks

Page 22: The Case for Tiny Tasks in Compute Clusters

Tiny tasks mitigate

stragglers+

Improve sharing

Distributed file

metadata

Launch task in existing thread pool

Distributed

scheduling

Pipelined task

execution

Questions? Find me or Shivaram:

Page 23: The Case for Tiny Tasks in Compute Clusters

Backup Slides

Page 24: The Case for Tiny Tasks in Compute Clusters

5.2x at the 95th percentile!

Benefit of Eliminating StragglersBased on Facebook Trace

Page 25: The Case for Tiny Tasks in Compute Clusters

Why Not Preemption?• Preemption only handles sharing (not

stragglers)

• Task migration is time consuming

• Tiny tasks improve fault tolerance

Page 26: The Case for Tiny Tasks in Compute Clusters

Dremel/Drill/Impala• Similar goals and challenges

(supporting short tasks)

• Dremel statically assigns tablets to machines; rebalances if query dispatcher notices that a machine is processing a tablet slowly standard straggler mitigation

• Most jobs expected to be interactive (no sharing)

Page 27: The Case for Tiny Tasks in Compute Clusters

10,000 Machines16 cores/machine

100 millisecond tasks

Scheduling Throughput

Over 1 million task scheduling decisions per

second

Page 28: The Case for Tiny Tasks in Compute Clusters

Sparrow: TechniquePlace m tasks on the least loaded of dm slaves

SlaveSlaveSlaveSlaveSlave

Slave

Scheduler

Scheduler

Scheduler

SchedulerJob

m = 2 tasks

4 probes (d =

2)

More at tinyurl.com/sparrow-scheduler

Page 29: The Case for Tiny Tasks in Compute Clusters

29

Sparrow: Performance on TPC-H Workload

Within 12% of offline optimal; median queuing delay of 8msMore at tinyurl.com/sparrow-scheduler