scheduling jobs with dependenciessamir/dcscheduling18/slides...robert grandl, srikanth kandula,...

116
Scheduling Jobs With Dependencies: New Applications, Classic Problems Janardhan Kulkarni, Microsoft Research, Redmond. 31 July 2018, TTI, Chicago TTIC SUMMER WORKSHOP: DATA CENTER SCHEDULING FROM THEORY TO PRACTICE

Upload: others

Post on 08-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Scheduling Jobs With Dependencies: New Applications, Classic Problems

JanardhanKulkarni,MicrosoftResearch,Redmond.

31July2018,TTI,ChicagoTTICSUMMERWORKSHOP:DATACENTERSCHEDULINGFROMTHEORYTOPRACTICE

Page 2: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Roadmap

Ø  Whichtheorymodelsaremoreclosertodata-centersettings.

SrikanthKandulaRatulMahajanAmarPhanishayeeMoniaGhobadi

Ø Focusonalgorithms Evencomplexalgorithmscanhavealgorithmicintuitionswhichareusefulinpractice.

Ø OneexampleOnesystemheuristicandonecomplexprovablealgorithm(UsingLPHierarchies)thathasgoodheuristicvalue.

Page 3: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

LuleåFBDataCenter,SouthofArticCircle

Page 4: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

LuleåFBDataCenter,SouthofArticCircle

Itisbeautifullikethisfor3days…..

Page 5: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

LuleåFBDataCenter,SouthofArticCircle

cold,cold,place…

Page 6: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

5%“aslargeascities”

Efficiency Matters a Lot

Page 7: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Efficiency Matters a Lot:

“aslargeascities”Emphasis on Principled Algorithms

Cost

Time

Simpleheuristics

TheoreticallySoundAlgorithms

Simplicityisnoteverything!

Page 8: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

How we Measure Efficiency

Ø Makespan

Minimizingthemaximumcompletiontimeamongasetofjobs.Lengthoftheschedule.

Ø  Average(ortotal)Flow-time(aka,JobCompletion-time)

•  sameasresponsetime•  measuresthetimeajobspendsinasystem

Fj = Cj � rj

Page 9: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

How we Measure Efficiency

Ø Makespan

Minimizingthemaximumcompletiontimeamongasetofjobs.Lengthoftheschedule.

Ø  Average(ortotal)Flow-time(aka,JobCompletion-time)

•  sameasresponsetime•  measuresthetimeajobspendsinasystem

Fj = Cj � rj

Throughput,energy,fairness,utilization,etc..

Page 10: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Challenges of Data Center Scheduling

ResourcesHeterogeneous(FPGA+CPU,GPU+CPU)Multidimensional(CPU,memory,network)

JobsComplexdependencies:DAGs,Co-flows,etc.

Algorithms

Fast,simple,oftenonline.

Page 11: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Challenges of Data Center Scheduling

ResourcesHeterogeneous(FPGA+CPU,GPU+CPU)Multidimensional(CPU,memory,network)

JobsComplexdependencies:DAGs,Co-flows,etc.

Algorithms

Fast,simple,oftenonline.

Richtheorywithmanynicealgorithmswhenjobshavesimplestructures.

Page 12: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Scheduling on Heterogeneous Clusters

Page 13: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Ø SpecialpurposehardwareØ Datalocality

Ø Geographiclocation

Ø Privacyconcerns

Whyareclustersheterogeneous?

Scheduling on Heterogeneous Clusters

Page 14: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

1000

100

300

jobsrunfasteronsomeclustersandsloweronothersModeling Heterogeneity

Page 15: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Jobsarriveovertime

jobs

machines

1151000…..10

661005…..98

11588…..13

1007889…..13

Modeling Heterogeneity jobsrunfasteronsomeclustersandsloweronothers

Page 16: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Jobsarriveovertime

jobs

machines

1151000…..10

661005…..98

11588…..13

1007889…..13

Heterogeneous == “Unrelated Machines Scheduling”

Assign(match)jobstoclusters+scheduletoMinimizeQoS.

Page 17: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Beautiful Algorithms For Unrelated Machines Scheduling Problems

MakespanFlow-timeEnergyLST’87 CGK’09 AGK’12 ST’89 AGK’12 KLS’10

Svensson’12 BK’15IKMP’14AAFPW’97 IKMP’14P’07

KD’18 A’06

Offline,Online,Multidimensional,Clairvoyant,Non-Clairvoyant,Stochastic,Truthfulness…`

Hasleadtodevelopmentofveryniceideas:Useofvertexsolutionsanddualityindesignofalgorithms,configurationLPs,potentialfunctions,connectionstogametheoreticideas…

Page 18: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Beautiful Algorithms For Unrelated Machines Scheduling Problems

MakespanFlow-timeEnergyLST’87 CGK’09 AGK’12 ST’89 AGK’12 KLS’10

Svensson’12 BK’15IKMP’14AAFPW’97 IKMP’14P’07

KD’18 A’06

Offline,Online,Multidimensional,Clairvoyant,Non-Clairvoyant,Stochastic,Truthfulness…`

Hasleadtodevelopmentofveryniceideas:Useofvertexsolutionsanddualityindesignofalgorithms,configurationLPs,potentialfunctions,connectionstogametheoreticideas…

RESEARCHDIRECTION:FewMachinetypes:Canwegetbetteralgorithmsforsomeclassicunrelated

machinesscheduling?

Page 19: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Challenges of Data Center Scheduling

ResourcesHeterogeneous(FPGA+CPU,GPU+CPU)Multidimensional(CPU,memory,network)

JobsComplexdependencies:DAGs,Co-flows,etc.

Algorithms

Fast,simple,oftenonline.

Page 20: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

The plan

GRAPHENE:PackingandDependency-AwareSchedulingforData-ParallelClusters.OSDI2016.

OneHeuristic

RobertGrandl,SrikanthKandula,SriramRao,AdityaAkella,JanardhanKulkarni.

OneComplexTheoreticalFramework

Verygeneral,workswellinpractice,asbadasanyotheralgorithmonpaperJ

LeveyandRothvoss’16.Garg,Kulkarni,Li’18.Garg,Kukarni,Li’18.

Veryspecific,provable,andquitecomplex.

Page 21: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

The plan

GRAPHENE:PackingandDependency-AwareSchedulingforData-ParallelClusters.OSDI2016.

OneHeuristic

RobertGrandl,SrikanthKandula,SriramRao,AdityaAkella,JanardhanKulkarni.

OneComplexTheoreticalFramework

LeveyandRothvoss’16.Garg,Kulkarni,Li’18.Garg,Kukarni,Li’18.

Oneofthebiggesthammersinapproximationalgorithms.“LiftandProject”

Verygeneral,workswellinpractice,asbadasanyotheralgorithmonpaperJ

Veryspecific,provable,andquitecomplex.

Page 22: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

The plan

GRAPHENE:PackingandDependency-AwareSchedulingforData-ParallelClusters.OSDI2016.

OneHeuristic

RobertGrandl,SrikanthKandula,SriramRao,AdityaAkella,JanardhanKulkarni.

OneComplexTheoreticalFramework

LeveyandRothvoss’16.Garg,Kulkarni,Li’18.Garg,Kukarni,Li’18.

Verygeneral,workswellinpractice,asbadasanyotheralgorithmonpaperJ

Veryspecific,provable,andquitecomplex.

Page 23: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

ADirectedAcyclicGraph(DAG)SchedulingProblem inLargeClusters

GRAPHENE:PackingandDependency-AwareSchedulingforData-ParallelClusters.OSDI2016.

RobertGrandl,SrikanthKandula,SriramRao,AdityaAkella,JanardhanKulkarni.

Page 24: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

DAG Model Supported in Hadoop

Multidimensionality

Heterogeneityofclusters

Page 25: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Resourcesofacluster

(1,1,1)Dtypesofresources

Cluster Scheduling

AsinglejobrepresentedasaDAG(task)

Page 26: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Resourcesofacluster

(1,1,1)Dtypesofresources

Cluster Scheduling

AsinglejobrepresentedasaDAG(task)

DemandVector (1,0,…,1/2)

(1/2,1/2,…,1/2)

(1/4,1,…,1/10)

Page 27: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Resourcesofacluster

(1,1,1)Dtypesofresources

Cluster Scheduling

AsinglejobrepresentedasaDAG(task)

DemandVector (1,0,…,1/2)

(1/2,1/2,…,1/2)

(1/4,1,…,1/10)

Processinglength(duration)

Page 28: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Cluster Scheduling: Minimize Makespan

AsinglejobrepresentedasaDAG

(1,0),2

(0,1),1

(1,1),1

(1,1),1(0,1),1

1 234567 1 234567

(1,1)

Cluster

Page 29: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Is There a Good Algorithm?

Itisunlikely(UGC-hard)thatapolynomialtimealgorithmcanachievebetterthanDapproximationtotheDAGschedulingproblem.ThisholdsevenifalltasksoftheDAGhave1)samelength,2)requireexactlyoneresource.

Theorem:BansalandKhot‘09.

Ø  Anynon-idlingalgorithmisequallygoodorequallybad!

Notausefulintuitionforsystemdesigners.

Page 30: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Is There a Good Algorithm?

Itisunlikely(UGC-hard)thatapolynomialtimealgorithmcanachievebetterthanDapproximationtotheDAGschedulingproblem.ThisholdsevenifalltasksoftheDAGhave1)samelength,2)requireexactlyoneresource.

Theorem:BansalandKhot‘09.

1 234567

OptimalAlgorithm:Doagreedyschedulerespectingprecedenceconstraints

Atleastoneresourceisused.Congestionforthatresourcedecreases.

Page 31: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Is There a Good Algorithm?

Itisunlikely(UGC-hard)thatapolynomialtimealgorithmcanachievebetterthanDapproximationtotheDAGschedulingproblem.ThisholdsevenifalltasksoftheDAGhave1)samelength,2)requireexactlyoneresource.

Theorem:BansalandKhot‘09.

1 234567

OptimalAlgorithm:Doagreedyschedulerespectingprecedenceconstraints

Atleastoneresourceisused.Congestionforthatresourcedecreases.

Page 32: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Is There a Good Algorithm?

Itisunlikely(UGC-hard)thatapolynomialtimealgorithmcanachievebetterthanDapproximationtotheDAGschedulingproblem.ThisholdsevenifalltasksoftheDAGhave1)samelength,2)requireexactlyoneresource.

Theorem:BansalandKhot‘09.

1 234567

OptimalAlgorithm:Doagreedyschedulerespectingprecedenceconstraints

Atleastoneresourceisused.Congestionforthatresourcedecreases.

Page 33: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

When did System Designers Care for Lowerbounds?

GRAPHENE:PackingandDependency-AwareSchedulingforData-ParallelClusters.OSDI2016.

RobertGrandl,SrikanthKandula,SriramRao,AdityaAkella,JanardhanKulkarni.

² CouldfindalmostoptimalsolutionsonMSdatasets.² Improvesmakespanby30%atleastcomparedtosimplegreedyheuristics.

Page 34: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Intuition of Graphene

“pathologicallybadschedulesintoday’sapproachesmostlyariseduetotworeasons:(a)long-runningtaskshavenootherworktooverlapwiththem,whichreducesparallelism,and(b)thetasksthatarerunnabledonotpackwellwitheachother,whichincreasesresourcefragmentation.”

Whatgreedyalgorithmsmiss?(List-Scheduling,CriticalPath,etc)

Page 35: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Intuition of Graphene

MainSteps

Ø  Ourapproachistoidentifythepotentiallytroublesometasks,suchasthosethatrunforaverylongtimeorarehardtopack.

Page 36: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Intuition of Graphene

MainSteps

Ø  Ourapproachistoidentifythepotentiallytroublesometasks,suchasthosethatrunforaverylongtimeorarehardtopack.Ø  Placethetroublesometasksfirstontoavirtualresource-timespace.Thisspacewouldhaved+1dimensionswhentasksrequiredresources;thelastdimensionbeingtime.

Page 37: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Intuition of Graphene

MainSteps

Ø  Ourapproachistoidentifythepotentiallytroublesometasks,suchasthosethatrunforaverylongtimeorarehardtopack.Ø  Placethetroublesometasksfirstontoavirtualresource-timespace.Thisspacewouldhaved+1dimensionswhentasksrequiredresources;thelastdimensionbeingtime.Ø  Ourintuitionisthatplacingthetroublesometasksfirstleadstoagoodschedulesincetheremainingtaskscanbeplacedintoresultantholesinthisspace.

Page 38: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality
Page 39: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Canweform

alizethisin

tuition?

Page 40: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

A-ApproximationforMakespanSchedulingwithPrecedenceConstraintsusingLPHierarchies.(1 + ✏)

LeveyandRothvoss‘16

Page 41: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

AsingleDAG.Eachtaskneedstobescheduledonexactlyonemachine.Eachtaskneeds1unitofCPU.

midenticalmachines(orCPUs)

MinimizeMakespan

(SpecialcaseofDAGscheduling)

Page 42: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

AsingleDAG.Eachtaskneedstobescheduledonexactlyonemachine.Eachtaskneeds1unitofCPU.

midenticalmachines(orCPUs)

Page 43: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

AsingleDAG.Eachtaskneedstobescheduledonexactlyonemachine.Eachtaskneeds1unitofCPU.

midenticalmachines(orCPUs)

Chainoflength4

Page 44: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

AsingleDAG.Eachtaskneedstobescheduledonexactlyonemachine.Eachtaskneeds1unitofCPU.

midenticalmachines(orCPUs)

Chainoflength4

Page 45: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

GreedyorList-Schedulingis2approximationforminimizingmakespan.

Theorem.Graham1960.

Page 46: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

GreedyorList-Schedulingis2approximationforminimizingmakespan.

Theorem.Graham1960.

BADSLOTS GOODSLOTS

Page 47: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

GreedyorList-Schedulingis2approximationforminimizingmakespan.

Theorem.Graham1960.

BADSLOTS GOODSLOTS+Makespan

Page 48: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

GreedyorList-Schedulingis2approximationforminimizingmakespan.

Theorem.Graham1960.

BADSLOTS GOODSLOTS

LengthofLongestchain n/m+Makespan

Page 49: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

GreedyorList-Schedulingis2approximationforminimizingmakespan.

Theorem.Graham1960.

BADSLOTS GOODSLOTS

LengthofLongestchain n/m+Makespan OPT � OPT �

Page 50: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

GreedyorList-Schedulingis2approximationforminimizingmakespan.

Theorem.Graham1960.

BADSLOTS GOODSLOTS

LengthofLongestchain n/m+Makespan OPT � OPT �

Ø Optimaltheoretically.Butconveysverylittleinformationinpractice.

Ø  Doesnotworkwellinpracticewhentherearemorethanoneresourcetype.

Page 51: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

Thereisaquasi-polynomialtimeapproximationforminimizingmakespanwhenjobshaveunitlengths,whennumberofmachinesisaconstant.

Theorem.LevyandRothvoss’16.

(1 + ✏)

Garg’17madeitstrictlyquasi-polynomialtime.

Page 52: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

Thereisaquasi-polynomialtimeapproximationforminimizingmakespanwhenjobshavearbitrarylengths,whennumberofmachinesisaconstant.Thealgorithmschedulesjobsonasinglemachineandmaypreemptjobswithinamachine.

Theorem.Kulkarni,Li’18.

(1 + ✏)

Page 53: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

Thereisapolynomialtimeoptimalapproximationforminimizingweightedcompletiontimeofjobs,whennumberofmachinesandjobsizesareuniform.

Theorem.Garg,Kulkarni,Li’18.

(2 + ✏)

Page 54: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Identical Machines Scheduling

GreedyorList-Schedulingis2approximationforminimizingmakespan.

Theorem.Graham1960.

BADSLOTS GOODSLOTS

LengthofLongestchain n/m+Makespan OPT � OPT �

Page 55: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Crucial Observation

BADSLOTS GOODSLOTS

LengthofLongestchain n/m+Makespan OPT � ✏ ·OPT

(1 + ✏) ·OPT

Page 56: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Crucial Observation

BADSLOTS GOODSLOTS

LengthofLongestchain n/m+Makespan OPT � ✏ ·OPT

(1 + ✏) ·OPT

troublesometasks

Howtoscheduletroublesometasks?

Page 57: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

Partitionthetasksintoasetofbottomtasksandasinglesetoftoptasks.Foreachsetofbottomtaskswefindasub-intervalwheretheyshouldbescheduled.

Thendoarecursiveschedulingofbottomtasks.

Page 58: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

Toptasks

BottomtasksBottomtasksBottomtasks

Page 59: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

BottomtasksBottomtasksBottomtasks

Precedenceconstraintsacrossbottomtasksareautomaticallysatisfied.

Page 60: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

BottomtasksBottomtasksBottomtasks

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

Page 61: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

BottomtasksBottomtasksBottomtasks

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

[T2, T3]

Page 62: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Foreverytaskinthesetoftoptaskswehavebasedonthetentativeassignmentofbottomjobs.

T0 T1 T2 T3

[rj , dj ]

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

Thereisenoughspacetoscheduletoptasks

Page 63: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

T0 T1 T2 T3

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

Thereisenoughspacetoscheduletoptasksiftherearenoprecedenceconstraintsbetweentoptasks.

Foreverytaskinthesetoftoptaskswehavebasedonthetentativeassignmentofbottomjobs.

[rj , dj ]

Page 64: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

T0 T1 T2 T3

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

Thereisenoughspacetoscheduletoptasksiftherearenoprecedenceconstraintsbetweentoptasks.

EDFwillschedulealltoptasksintheemptyspacebutmayviolatetheprecedenceconstraintsbetweentoptasks

Foreverytaskinthesetoftoptaskswehavebasedonthetentativeassignmentofbottomjobs.

[rj , dj ]

Page 65: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Intuition of Graphene

MainSteps

Ø  Ourapproachistoidentifythepotentiallytroublesometasks,suchasthosethatrunforaverylongtimeorarehardtopack.Ø  Placethetroublesometasksfirstontoavirtualresource-timespace.Thisspacewouldhaved+1dimensionswhentasksrequiredresources;thelastdimensionbeingtime.Ø  Ourintuitionisthatplacingthetroublesometasksfirstleadstoagoodschedulesincetheremainingtaskscanbeplacedintoresultantholesinthisspace.

Page 66: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

BottomtasksBottomtasksBottomtasks

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

[T2, T3]

Page 67: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

BottomtasksBottomtasksBottomtasks

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

[T2, T3]

Thechainlengthamongtoptasksisverysmall.

Page 68: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

BottomtasksBottomtasksBottomtasks

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

[T2, T3]

Thechainlengthamongtoptasksisverysmall.

Page 69: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Framework

TimeInterval

T0 T1 T2 T3

BottomtasksBottomtasksBottomtasks

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

[T2, T3]

Thechainlengthamongtoptasksisverysmall.

Thealgorithmhasrecognizedacrudeschedulefortroublesometasks.That’swhychainlengthamongtoptasksissmall.

Page 70: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Intuition of Graphene

MainSteps

Ø  Ourapproachistoidentifythepotentiallytroublesometasks,suchasthosethatrunforaverylongtimeorarehardtopack.Ø  Placethetroublesometasksfirstontoavirtualresource-timespace.Thisspacewouldhaved+1dimensionswhentasksrequiredresources;thelastdimensionbeingtime.Ø  Ourintuitionisthatplacingthetroublesometasksfirstleadstoagoodschedulesincetheremainingtaskscanbeplacedintoresultantholesinthisspace.

Page 71: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

LR’16 Framework

TimeInterval

T0 T1 T2 T3

BottomtasksBottomtasksBottomtasks

Precedenceconstraintsgoingfrombottomtotoptasksareloose.

[T2, T3]

Thechainlengthamongtoptasksisverysmall.

Page 72: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Foreverytaskinthesetoftoptaskswehave

T0 T1 T2 T3

[rj , dj ]Precedenceconstraintsgoingfrombottomtotoptasksareloose.

Thereisenoughspacetoscheduletoptasksiftherearenoprecedenceconstraintsbetweentoptasks.

EDFwillschedulealltoptasksintheemptyspacebutmayviolatetheprecedenceconstraintsbetweentoptasks

allexceptfew

Page 73: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TimeInterval

T0 T1 T2 T3

Toptasks

BottomtasksBottomtasksBottomtasks

HowtopartitiontheDAG?

1.   Precedenceconstraintsbetweenbottomtasksshouldbeimplied.2.   Theprecedenceconstraintsbetweentopandbottomtasksareloose.3.   Thechainlengthamongtoptasksissmall.

Page 74: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Linear Programming Formulation

TX

t=1

xjt = 1

BinarysearchtheoptimalmakespanasT

Foreverytaskj

X

j

xjt m

isscheduled.

Fortimeslott hasatmostmjobs.

Forprecedencerelation issatisfiedateachtimestept.

xjt > 0Allvariables arenon-negative

i ! j,X

t0<t

xit0 �X

t0t

xjt0

Page 75: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

LP Cheats…

2/3 1/3 2/3

Optimalmakespanis4butLPcancompletein3timeslots.

Time

DAG

LPcanscheduleajobfractionallyinatimeslot.

Page 76: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Interval of a task

Time

ConsidertheLPsolution.Intervalofataskissmallestintervalthatcontainsfractionalscheduleofthetask.

1/10 1/10 3/10 5/10

t1 t2

Page 77: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

What LP gives? Anintervalforeachtask.

Time

Page 78: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

What LP gives? Anintervalforeachtask.

Time

WeusetheseintervalstopartitiontheDAGintotopandbottomtasks.

Page 79: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Building Binary Tree

0 TLPSchedulesalltasksbetween [0, T ]

0 TT/2 T

2+ 1

0 T

4+ 1

T

4

T

2

Page 80: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Building Binary Tree LPSchedulesalltasksin[0, T ]

log T

[0, T ]

[0, T/2][T/2 + 1, T ]

Assigneachtasktothesmallestintervalnodeinthetreethatfullycontainsit.

Page 81: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Building Binary Tree LPSchedulesalltasksin[0, T ]

log T

[0, T ]

[0, T/2][T/2 + 1, T ]

Assigneachtasktothesmallestintervalnodeinthetreethatfullycontainsit.

Page 82: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Building Binary Tree LPSchedulesalltasksin[0, T ]

log T

[0, T ]

[0, T/2][T/2 + 1, T ]

Assigneachtasktothesmallestintervalnodeinthetreethatfullycontainsit.

Page 83: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Building Binary Tree LPSchedulesalltasksin[0, T ]

log T

[0, T ]

[0, T/2][T/2 + 1, T ]

Assigneachtasktothesmallestintervalnodeinthetreethatfullycontainsit.

Page 84: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Defining Top and Bottom Tasks [0, T ]

[0, T/2][T/2 + 1, T ]

(log log T )2

Page 85: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Defining Top and Bottom Tasks [0, T ]

[0, T/2][T/2 + 1, T ]

(log log T )2

ThrowThemAway!!

log log T

Page 86: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Defining Top and Bottom Tasks [0, T ]

[0, T/2][T/2 + 1, T ]

(log log T )2

TopTasks

BottomTasksSets

ThrowThemAway!!

log log T

Page 87: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Defining Top and Bottom Tasks [0, T ]

[0, T/2][T/2 + 1, T ]

(log log T )2

TopTasks

BottomTasksSets

ThrowThemAway!!

1.   Precedenceconstraintsbetweenbottomtasksshouldbeimplied.2.   Theprecedenceconstraintsbetweentopandbottomtasksareloose.3.   Thechainlengthamongtoptasksissmall.

Page 88: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Defining Top and Bottom Tasks [0, T ]

[0, T/2][T/2 + 1, T ]

TopTasks

BottomTasksSets

ThrowThemAway!!

log log T

Page 89: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TimeInterval

0 T1 T2 T3

Precedenceconstraintsgoingfrombottomtotoptasksareloose. [T2, T3]

T4

Everytoptaskcanlooseoneintervaltotheleftandoneintervaltotherightintermsofspaceinwhichitshouldbescheduled.But,bottomintervalsaretinycomparedtotop,sothisisnotabigloss.

Toptasks

Bottomtasks

Bottomtasks

Page 90: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TimeInterval

0 T1 T2 T3

Precedenceconstraintsgoingfrombottomtotoptasksareloose. [T2, T3]

T4

Everytoptaskcanlooseoneintervaltotheleftandoneintervaltotherightintermsofspaceinwhichitshouldbescheduled.But,bottomintervalsaretinycomparedtotop,sothisisnotabigloss.

Toptasks

Bottomtasks

Bottomtasks

1.   Precedenceconstraintsbetweenbottomtasksshouldbeimplied.2.   Theprecedenceconstraintsbetweentopandbottomtasksareloose.3.   Thechainlengthamongtoptasksissmall.

Page 91: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Lift and Project Method (LP Hierarchies) Dimensions

NumberofvariablesinLPthatyouwantintegral

OriginalLP

Allthevariablesareintegral.

Asystematicwayofplacingtroublesometasks!

Page 92: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Lift and Project Method (LP Hierarchies) Dimensions

NumberofvariablesinLPthatyouwantintegral

OriginalLP

Allthevariablesareintegral.

RunningtimeIncreasesbyafactorofn.

O(nS)

Asystematicwayofplacingtroublesometasks!

Page 93: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Lift and Project Method (LP Hierarchies)

Time

1/10 1/10 3/10 5/10

t1 t2

“Conditioning”

Touchavariable,anditbecomesintegral!

Page 94: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Lift and Project Method (LP Hierarchies)

Time

1/10 1/10 3/10 5/10

t1 t2

“Conditioning”

Touchavariable,anditbecomesintegral!

Page 95: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Lift and Project Method (LP Hierarchies)

Time

10/10

“Conditioning”

Touchavariable,anditbecomesintegral!

Page 96: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Lift and Project Method (LP Hierarchies)

Time

10/10

t1 t2“Conditioning”

Touchavariable,anditbecomesintegral!

Page 97: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Lift and Project Method (LP Hierarchies)

Time

“Conditioning”

Touchavariable,anditbecomesintegral!

TheLPsolutionchangesinsuchawaythat,foreveryothertaskon,theintervalinwhichitisscheduledinthenewsolutiononlyshrinks.

Ihaveabetterunderstandingofwherethistaskgotscheduled.

Page 98: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Reducing Chain Length of Top Tasks [0, T ]

[0, T/2][T/2 + 1, T ]

Page 99: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TheintervalisoflengthT.Wewillmakesurethatthereisnochainoflengthassignedtothisinterval.

Reducing Chain Length of Top Tasks

0 T✏T

Page 100: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TheintervalisoflengthT.Wewillmakesurethatthereisnochainoflengthassignedtothisinterval.

Reducing Chain Length of Top Tasks

0 T✏Txjt > 0

Page 101: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TheintervalisoflengthT.Wewillmakesurethatthereisnochainoflengthassignedtothisinterval.

Reducing Chain Length of Top Tasks

0 T✏Txjt > 0

Page 102: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TheintervalisoflengthT.Wewillmakesurethatthereisnochainoflengthassignedtothisinterval.

Reducing Chain Length of Top Tasks

0 T✏T

Page 103: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Reducing Chain Length of Top Tasks [0, T ]

[0, T/2][T/2 + 1, T ]

Page 104: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TheintervalisoflengthT.Wewillmakesurethatthereisnochainoflengthassignedtothisinterval.

Reducing Chain Length of Top Tasks

0 T✏T

Howmanyconditioningarerequired? m/✏Nowrecallthatnumberofintervalsintoptasksis 2(log logT )2 (log T )log log T

Page 105: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

TheintervalisoflengthT.Wewillmakesurethatthereisnochainoflengthassignedtothisinterval.

Reducing Chain Length of Top Tasks

0 T✏T

Howmanyconditioningarerequired? m/✏Nowrecallthatnumberofintervalsintoptasksis 2(log logT )2 (log T )log log T

O(m/✏ · (log T )log log T )

Runningtime.

Page 106: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Thereisaquasi-polynomialtimeapproximationforminimizingmakespanwhenjobshavearbitrarylengths,whennumberofmachinesisaconstant.Thealgorithmschedulesjobsonasinglemachineandmaypreemptjobswithinamachine.

Theorem.Garg,Kulkarni,Li’18.

(1 + ✏)

Thereisapolynomialtimeoptimalapproximationforminimizingweightedcompletiontimeofjobs,whennumberofmachinesandjobsizesareuniform.

(2 + ✏)

Moresophisticateduseofconditioningandnewalgorithmsforschedulingtoptasks.

Page 107: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Ø  Ourapproachistoidentifythepotentiallytroublesometasks,suchasthosethatrunforaverylongtimeorarehardtopack.Ø  Placethetroublesometasksfirstontoavirtualresource-timespace.Thisspacewouldhaved+1dimensionswhentasksrequiredresources;thelastdimensionbeingtime.Ø  Ourintuitionisthatplacingthetroublesometasksfirstleadstoagoodschedulesincetheremainingtaskscanbeplacedintoresultantholesinthisspace.

IntuitionofGraphene

Ø  UsingLiftandProjecttofigureoutplacinglongtasks.Isthereasimple,sayDPapproachtoit?Ø  CanweuseLPsupportforplacingtasks?

Ø  CanrecursionhelpinGraphenesetting?

LiftandProjectAlgorithms

Big Picture

Page 108: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

IdenticalMachinesSchedulingandTrainingNeuralNetworks

PipeDream:FastandEfficientPipelineParallelDNNTrainingAaronHarlap,DeepakNarayanan,AmarPhanishayee,VivekSeshadri,NikhilDevanur,GregGanger,PhilGibbons

Page 109: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Training Deep Learning Models

Ø  Largefractionofthedatacenterworkloadsformanycompanies.

Ø  Improvingtrainingtimeisconsideredveryimportant.

Ø  DAGsaregoodabstractionsofDNNtrainingcomputations.

Ø  ConnectionstoDAGschedulingandcommunicationdelayproblems.

Page 110: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Two Paradigms

DataParallelism

ModelParallelism

Page 111: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Model Parallelism

Ø Schedulethelayersamongasetofmachines.TypicallyIdentical.

Ø Oratmost2types:CPU+FPGA,CPU+GPUsetc.

Page 112: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Model Parallelism

Ø Schedulethelayersamongasetofmachines.TypicallyIdentical.

Ø Oratmost2types:CPU+FPGA,CPU+GPUsetc.

Ø Thereiscommunicationbetweenlayers.Communicationcostiscrucial.

Page 113: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Model Parallelism

Theseproblemsarequitesimilartoschedulingwithcommunicationdelays,whenthereareprecedenceconstraints.(PY’90,VLL’90,MH’95,HLV’94)Verypoorlyunderstood.

Goodschedulinghassameeffectascaching!

ZhichengYin,JinSun,MingLi,JaliyaEkanayake,HaiboLin,MarcFriedman,JoséA.Blakeley,ClemensA.Szyperski,NikhilR.Devanur.BubbleExecution:Resource-awareReliableAnalyticsatCloudScale.PVLDB11(7).

PipeDream:FastandEfficientPipelineParallelDNNTrainingAaronHarlap,DeepakNarayanan,AmarPhanishayee,VivekSeshadri,NikhilDevanur,GregGanger,PhilGibbons

Page 114: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Summary: Data Center Scheduling

ResourcesHeterogeneous(FPGA+CPU,GPU+CPU)Multidimensional(CPU,memory,network)

JobsComplexdependencies:DAGs,Co-flows,etc.

Algorithms

Fast,simple,oftenonline.

Page 115: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Summary: Data Center Scheduling

ResourcesHeterogeneous(FPGA+CPU,GPU+CPU)Multidimensional(CPU,memory,network)

JobsComplexdependencies:DAGs,Co-flows,etc.

Algorithms

Fast,simple,oftenonline.

Ø  Oftenhardinworstcase.What’stherightmodel?Ø  UnderstandDAGsthatariseinpractice.SayDNNs.Ø  Whatarethehigh-levelalgorithmicintuitions?

Page 116: Scheduling Jobs With Dependenciessamir/DCscheduling18/slides...Robert Grandl, Srikanth Kandula, Sriram Rao, Aditya Akella, Janardhan Kulkarni. DAG Model Supported in Hadoop Multidimensionality

Summary: Data Center Scheduling

ResourcesHeterogeneous(FPGA+CPU,GPU+CPU)Multidimensional(CPU,memory,network)

JobsComplexdependencies:DAGs,Co-flows,etc.

Algorithms

Fast,simple,oftenonline.

Ø  Oftenhardinworstcase.What’stherightmodel?Ø  UnderstandDAGsthatariseinpractice.SayDNNs.Ø  Whatarethehigh-levelalgorithmicintuitions?