25
Decentralized Dynamic Scheduling across Heterogeneous Multi core across Heterogeneous Multicore Desktop Grids J h L Pt Klh Al S Jaehwan Lee, P ete K eleher, Alan Sussman Department of Computer Science University of Maryland

Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Decentralized Dynamic Scheduling across Heterogeneous Multi coreacross Heterogeneous Multi‐core 

Desktop Grids

J h L P t K l h Al SJaehwan Lee, Pete Keleher, Alan Sussman

Department of Computer Science University of Maryland

Page 2: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Multi‐core is not enoughMulti core is not enough

• Multi‐core CPU is the current trend of desktop pcomputing

• Not easy to exploit Multi‐core in a singlemachine for high throughput computingfor high throughput computing

“Multicore is Bad news for Supercomputers”, S. Moore, IEEE Spectrum, 2008

• We have proposed decentralized solution for initial job placement for Multi‐core Grids, but..

Dynamic Re‐scheduling can surely improve performance even moreperformance even more ...

Page 3: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Motivation and ChallengesMotivation and Challenges• Why is dynamic scheduling needed?

Stale load informationUnpredictable job completion timesProbabilistic initial job assignment

• Challenges for decentralized dynamic scheduling for multi‐core grids

Multiple resource requirementsDecentralized algorithm neededN J b i ll dNo Job starvation allowed

Page 4: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Our ContributionOur Contribution

• New Decentralized Dynamic SchedulingNew Decentralized Dynamic Scheduling Schemes for Multi‐core Grids

Intra‐node schedulinggInter‐node schedulingAggressive job migration via Queue Balancing

• Experimental Results via extensive simulationpPerformance better than static schedulingCompetitive with an online centralized scheduler

Page 5: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

OutlineOutline

• Background

l d k• Related work

• Our approach• Our approach

• Experimental Resultsp

• Conclusion & Future Work

Page 6: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Overall System ArchitectureOverall System Architecture

• P2P gridP2P grid OwnerNode

Job J

Route

InitiateMatchmaking(Scheduling)Heartbeat

Route Job J

FindSend Job J

Heartbeat

ClientsRunNode

InjectionNode

Insert Job J

Peer-to-PeerClients NodeNode

Assign GUID to Job J

J

FIFO Job Queue

Peer to PeerNetwork

(DHT - CAN)

Page 7: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Matchmaking Mechanism in CANMatchmaking Mechanism in CANMemory

A D G Run A D G

PushingJob J

NodeJFIFO Queue

B E HClientJob J

Heartbeat

C F IJob J

Owner

Job JCPU >= CJ

&&

Insert J

CPU

&&Memory >= MJ

CJ

MJ

Page 8: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

OutlineOutline

k d• Background

l d k• Related work

O h• Our approach

• Experimental ResultsExperimental Results

• Conclusion & Future Work

Page 9: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

BackfillingBackfilling• Basic Concept

CPUCPUs

Job1

Job2

Job3

Job4

• Features

Time

FeaturesJob running timemust be knownConservative vs. EASY BackfillingInaccurate job running time estimates reduce overall performance

Page 10: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Approaches for K‐resource requirementsApproaches for K resource requirements

• Backfilling with multiple resource requirements (Leinberger:SC’99)

Backfilling in a singlemachineHeuristic approachesHeuristic approachesAssumption : Job Running times are known

J b i ti t b l K b t d• Job migration to balance K‐resources between nodes  (Leinberger:HCW’00)

Reduce local load imbalance by exchanging jobs, but does id ll l dnot consider overall system loads

No backfilling schemeAssumption : near‐homogeneous environmentp g

Page 11: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

OutlineOutline

B k d• Background

• Related workRelated work

• Our approachOur approach

• Experimental Resultsp

• Conclusion & Future Work

Page 12: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Dynamic SchedulingDynamic Scheduling

• After Initial Job assignment, but before the job te t a Job ass g e t, but be o e t e jobstarts running, dynamic scheduling algorithm invoked Periodically

• Costs for dynamic schedulingJob Migration Cost

• None : For intra‐node scheduling• Minimal : For inter‐node scheduling & Queue balancingMinimal : For inter node scheduling & Queue balancing

CPU cost : None• No preemptive scheduling : Once a job starts running, it 

’t b t d d t d i h d liwon’t be stopped due to dynamic scheduling.

Page 13: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Intra‐Node SchedulingIntra Node Scheduling• Extension of Backfilling with 

multiple resource requirements J3multiple resource requirements

• Backfilling Counter (BC) 

BackfillingRunning Job

BC

JR

3

Initial value : 0

Counts number of other jobs h h b d h b

Head of Queue 0

0

BC

J1

J2

1

1

that have bypassed the job

Only a job whose BC is equal to or greater than maximum

0

0

J3

J4

to or greater than maximum BC of jobs in the queue can be backfilled

Queue

Quad‐core CPU

No job starvation

Page 14: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Which job should be backfilled?Which job should be backfilled?• If multiple jobs can be backfilled,

Backfill Balanced (BB) (Leinberger:SC’99) algorithmBackfill Balanced (BB) (Leinberger:SC 99) algorithmChoose the job with minimum objective function(= BM x FM)

• Balance Measure (BM)

BMMaximum Utilization

BM =

Minimize uneven usage across multiple resourcesAverage Utilization

• Fullness Measure (FM) FM = 1 – Average UtilizationMaximize average utilization

Page 15: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Inter‐node SchedulingInter node Scheduling• Extension of Intra‐node scheduling across nodes• Node Backfilling Counter (NBC)• Node Backfilling Counter (NBC)

Maximum BC of jobs in the node’s waiting queueOnly jobs whose BC is equal to or greater than NBC of the target node can be migratednode can be migratedNo job starvation

Running JR i R i RunningJob

0

BC

JC

J

Running Job

2

BC

JA

J

Running Job

1

BC

JB JB’

J

NBC : 2 NBC : 0

J4

10

0

0

J8J9J10

2

2

0

J5J6J7

1

1

0

J1J2J4

1

1

1

Node CNode A Node B

Page 16: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Inter‐node Scheduling – PUSH vs. PULLg

• PUSH b d hA job sender initiates the process

Sender tries to match every job in its queue with residual resources in its neighbors in the CANIf a job can be sent to multiple nodes, pick the node with minimum objective function,  and prefer a node with the fastest CPU

• PULL• PULLA job receiver initiates the processReceiver sends a PULL‐Request message to the potential sender (the one with maximum current queue length)P t ti l d h k h th it h j b th t b b kfill d d th j bPotential sender checks whether it has a job that can be backfilled, and the job satisfies BC conditionIf multiple jobs can be sent, choose the job with minimum objective function (= BM x FM )If j b b f d d PULL R j iIf no job can be found, send a PULL‐Rejectmessage to receiverThe receiver looks for another potential sender among neighbors, if gets a PULL‐Rejectmessage

Page 17: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Queue BalancingQueue Balancing

• Intra‐node scheduling & Inter‐node scheduling look for job that can start running immediately, to use current residual resources

• Add Proactive job migration for queue (load) balancing• Add Proactive job migration for queue (load) balancingMigrated job does not have to start immediately

• Use normalized Loadmeasure for a node with multipleUse normalized Loadmeasure for a node with multiple resources (Leinberger:HCW’00)

For each resource, sum all job’s requirements in the queue and normalize it with respect to node’s resource capabilityp p yLoad on a node defined as the maximum of those

• PUSH & PULL schemes can be usedMinimize total local loads (= sum of loads of neighbors, TLL) Minimize maximum local load among neighbors (MLL)

Page 18: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

OutlineOutline

B k d• Background

• Related workRelated work

• Our approachpp

• Experimental Resultsp

• Conclusion & Future Work

Page 19: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Experimental SetupExperimental Setup

• Event‐driven SimulationsA t f d d tA set of nodes and events

• 1000 initial nodes and 5000 job submissions• Jobs are submitted with average inter‐arrival time τ (with a Poisson distribution)Poisson distribution) 

• A node has 1,2,4 or 8 cores• Job run times uniformly distributed between 30 and 90 minutesminutes

Node Capabilities and Job Requirements• CPU, Memory, Disk and the number of cores• Job requirement for a resource can be omitted (Don’t care)

Job Constraint Ratio :  The probability that each resource type for a job is specified

Steady state experiments

Page 20: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Comparison ModelsComparison Models• Centralized Scheduler (CENT)

Online and global scheduling mechanism with a single wait queueNot feasible in a complete implementation of P2P system

Job JCPU ≥ 2.0GHzMem ≥ 500MB

CentralizedScheduler

• Tested combinations of our schemes

Disk ≥ 1GB Scheduler

Tested combinations of our schemesVanilla : No dynamic scheduling (Static Scheduling only)L : Intra‐node scheduling onlyLI : L + Inter‐node schedulinggLIQ : LI + Queue balancingLI(Q)‐PUSH/PULL : LI & LIQ with PUSH/PULL options

Page 21: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Performance varying system loadPerformance varying system load

• LIQ‐PULL > LI‐PULL > LIQ‐PUSH> LI PUSH > L > Vanilla> LI‐PUSH > L >= Vanilla

• Inter‐node schedulingprovides big improvement

PULL i b tt th PUSH• PULL is better than PUSHIn overloaded system, PULL is better to spread information due to aggressive trial for job migration (Demers:PODC’87)

• Intra‐node scheduling cannot guarantee better performance than Vanillathan Vanilla

The Backfilling Counter  does not ensure that other waiting jobs will not be delayed (different from conservative(different from conservative backfilling)

Page 22: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

OverheadsOverheads

• PULL has higher cost than PUSHActive search (lots of trials and rejects)

• Other schemes are similar to VanillaNo significant additional overhead 

Page 23: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Performance varying Job Constraint RatioPerformance varying Job Constraint Ratio

• LIQ‐PULL : best• LIQ == LI• LIQ‐PULL is competitive to CENTto CENT

• For 80% Job Constraint Ratio, LIQ‐PULL 

f tperformance gets relatively worse

difficult to find a capable neighbor for job migration, because jobs are more highly constrainedconstrained

Page 24: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Evaluation SummaryEvaluation Summary

• Performance LIQ‐PULL is competitive to CENTInter‐node Scheduling has major impact on performancepPULL is better than PUSH (more aggressive search)Good performance can be achieved regardless of system load and job constraint ratiosystem load and job constraint ratio

it’s worthwhile to do dynamic load balancing

• OverheadsPULL > PUSH (more aggressive search)Competitive to VanillaCompetitive to Vanilla

Page 25: Decentralized Dynamic Scheduling across Heterogeneous …abenoit/hcw2010/slides/lee.pdf · 2010. 4. 28. · Multi‐core is not enough • Multi‐core CPU is the current trend of

Conclusion and Future WorkConclusion and Future Work

• New decentralized Dynamic Scheduling for Multi‐core P2P Grids

Extension of Backfilling (Intra‐node/Inter‐node)Backfilling Counter : No Job StarvationProactive Queue Balancing

• Performance Evaluation via simulationB tt th St ti S h d liBetter than Static SchedulingCompetitive performance to CENTLow overhead

• Future workReal grid experiments (in cooperation with Astronomy Dept.)Decentralized Resource Management for HeterogeneousDecentralized Resource Management for HeterogeneousAsymmetricMulti‐processors