Balancing Specula-ve Loads in Parallel Discrete Event - - PowerPoint PPT Presentation

balancing specula ve loads in parallel discrete event
SMART_READER_LITE
LIVE PREVIEW

Balancing Specula-ve Loads in Parallel Discrete Event - - PowerPoint PPT Presentation

Balancing Specula-ve Loads in Parallel Discrete Event Simula-on Eric Mikida Brief PDES Descrip-on Simula-on made up of Logical Processes (LPs) LPs


slide-1
SLIDE 1

Balancing ¡Specula-ve ¡Loads ¡in ¡ Parallel ¡Discrete ¡Event ¡Simula-on ¡

Eric ¡Mikida ¡

slide-2
SLIDE 2

Brief ¡PDES ¡Descrip-on ¡

  • Simula-on ¡made ¡up ¡of ¡Logical ¡Processes ¡(LPs) ¡
  • LPs ¡process ¡events ¡in ¡-mestamp ¡order ¡
  • Synchroniza-on ¡is ¡conserva-ve ¡or ¡op-mis-c ¡
  • Periodically ¡compute ¡global ¡virtual ¡-me ¡(GVT) ¡

2 ¡

slide-3
SLIDE 3

Op-mis-c ¡Execu-on ¡

1 ¡

Pending ¡events ¡ Processed ¡events ¡

3 ¡

3 ¡ 6 ¡ 7 ¡ 9 ¡ 10 ¡

LP ¡

slide-4
SLIDE 4

Op-mis-c ¡Execu-on ¡

1 ¡

4 ¡

3 ¡ 6 ¡ 7 ¡ 9 ¡ 10 ¡

LP ¡

slide-5
SLIDE 5

Op-mis-c ¡Execu-on ¡

1 ¡

5 ¡

3 ¡ 6 ¡ 7 ¡ 9 ¡ 10 ¡ 4 ¡

LP ¡

slide-6
SLIDE 6

Op-mis-c ¡Execu-on ¡

1 ¡

6 ¡

3 ¡ 6 ¡ 7 ¡ 9 ¡ 10 ¡ 4 ¡

LP ¡

slide-7
SLIDE 7

Op-mis-c ¡Execu-on ¡

1 ¡

7 ¡

3 ¡ 4 ¡ 6 ¡ 7 ¡ 9 ¡ 10 ¡

LP ¡

slide-8
SLIDE 8

Op-mis-c ¡Execu-on ¡

1 ¡

8 ¡

3 ¡ 4 ¡ 6 ¡ 7 ¡ 9 ¡ 10 ¡

GVT ¡

LP ¡

slide-9
SLIDE 9

Performance ¡Metrics ¡

Event ¡Rate ¡= ¡ Event ¡Efficiency ¡= ¡ Load ¡Balance ¡= ¡ EcommiTed ¡/ ¡s ¡ EcommiTed ¡/ ¡Etotal ¡ ?? ¡

9 ¡

slide-10
SLIDE 10

What ¡is ¡“load”? ¡

  • Charm++ ¡automa-cally ¡measures ¡CPU ¡-me ¡

– Makes ¡sense ¡when ¡all ¡work ¡is ¡useful ¡work ¡ – Relies ¡on ¡principle ¡of ¡persistence ¡ – Balances ¡CPU ¡-me ¡per ¡PE ¡

10 ¡

slide-11
SLIDE 11

What ¡is ¡“load”? ¡

  • Charm++ ¡automa-cally ¡measures ¡CPU ¡-me ¡

– Makes ¡sense ¡when ¡all ¡work ¡is ¡useful ¡work ¡ – Relies ¡on ¡principle ¡of ¡persistence ¡ – Balances ¡CPU ¡-me ¡per ¡PE ¡

Does ¡this ¡make ¡sense ¡in ¡a ¡specula-ve ¡se^ng? ¡

11 ¡

slide-12
SLIDE 12

Example ¡

12 ¡

Executed: ¡5 ¡ CommiTed: ¡4 ¡ Rolled ¡Back: ¡0 ¡

LP ¡1 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡4 ¡

LP ¡2 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡0 ¡

LP ¡3 ¡

slide-13
SLIDE 13

Example ¡

13 ¡

Executed: ¡5 ¡ CommiTed: ¡4 ¡ Rolled ¡Back: ¡0 ¡

LP ¡1 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡4 ¡

LP ¡2 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡0 ¡

LP ¡3 ¡

slide-14
SLIDE 14

Example ¡

14 ¡

Executed: ¡5 ¡ CommiTed: ¡4 ¡ Rolled ¡Back: ¡0 ¡

LP ¡1 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡4 ¡

LP ¡2 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡0 ¡

LP ¡3 ¡

slide-15
SLIDE 15

Example ¡

15 ¡

Executed: ¡5 ¡ CommiTed: ¡4 ¡ Rolled ¡Back: ¡0 ¡

LP ¡1 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡4 ¡

LP ¡2 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡0 ¡

LP ¡3 ¡

slide-16
SLIDE 16

Example ¡

Roughly ¡the ¡same ¡CPU ¡-me ¡spent ¡execu-ng ¡events ¡

16 ¡

Executed: ¡5 ¡ CommiTed: ¡4 ¡ Rolled ¡Back: ¡0 ¡

LP ¡1 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡4 ¡

LP ¡2 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡0 ¡

LP ¡3 ¡

slide-17
SLIDE 17

Example ¡

Roughly ¡the ¡same ¡CPU ¡-me ¡spent ¡execu-ng ¡events ¡ How ¡does ¡the ¡load ¡balancer ¡differen-ate? ¡

17 ¡

Executed: ¡5 ¡ CommiTed: ¡4 ¡ Rolled ¡Back: ¡0 ¡

LP ¡1 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡4 ¡

LP ¡2 ¡

Executed: ¡5 ¡ CommiTed: ¡0 ¡ Rolled ¡Back: ¡0 ¡

LP ¡3 ¡

slide-18
SLIDE 18

How ¡does ¡GVT ¡affect ¡balance? ¡

Count-­‑Based ¡GVT ¡

  • GVT ¡computed ¡every ¡X ¡

events ¡

  • Doesn’t ¡aTempt ¡to ¡bound ¡
  • p-mism ¡
  • Can ¡lead ¡to ¡poor ¡event ¡

efficiency ¡ Leash-­‑Based ¡GVT ¡

  • GVT ¡computed ¡every ¡X ¡units ¡
  • f ¡virtual ¡-me ¡
  • Keeps ¡virtual ¡-mes ¡

balanced ¡across ¡PEs ¡

  • Can ¡lead ¡to ¡poor ¡CPU ¡

balance ¡across ¡PEs ¡

18 ¡

slide-19
SLIDE 19

Benchmarks ¡

PHOLD ¡

  • Common ¡PDES ¡benchmark ¡
  • Execu-ng ¡an ¡event ¡causes ¡a ¡

new ¡event ¡for ¡a ¡random ¡LP ¡

  • Changing ¡event ¡distribu-on ¡

causes ¡imbalance ¡ Traffic ¡

  • Simulates ¡a ¡grid ¡of ¡

intersec-ons ¡

  • Events ¡are ¡cars ¡arriving, ¡

leaving, ¡and ¡changing ¡lanes ¡

  • Cars ¡travel ¡from ¡source ¡to ¡

des-na-on ¡

19 ¡

slide-20
SLIDE 20

GVT ¡Trigger ¡Event ¡Rates ¡

64 ¡nodes ¡of ¡Vesta ¡(BG/Q) ¡ PHOLD: ¡

  • ­‑

32 ¡LPs ¡per ¡rank ¡

  • ­‑

50% ¡remote ¡events ¡ Traffic: ¡

  • ­‑

64K ¡intersec-ons ¡

  • ­‑

1M ¡cars ¡

20 ¡

0 ¡ 5 ¡ 10 ¡ 15 ¡ 20 ¡ 25 ¡ 30 ¡ 35 ¡ 40 ¡ PHOLD ¡ Traffic ¡ Event ¡Rate ¡(millions/s) ¡ Count ¡ Leash ¡

slide-21
SLIDE 21

GVT ¡Trigger ¡Comparison ¡

64 ¡nodes ¡of ¡Vesta ¡(BG/Q) ¡ PHOLD: ¡

  • ­‑

32 ¡LPs ¡per ¡rank ¡

  • ­‑

50% ¡remote ¡events ¡ Traffic: ¡

  • ­‑

64K ¡intersec-ons ¡

  • ­‑

1M ¡cars ¡

21 ¡

0 ¡ 10 ¡ 20 ¡ 30 ¡ 40 ¡ 50 ¡ 60 ¡ 70 ¡ 80 ¡ 90 ¡ 100 ¡ PHOLD ¡ Traffic ¡ Efficiency ¡(%) ¡ Count ¡ Leash ¡

slide-22
SLIDE 22

Our ¡Load ¡Balancing ¡Goal ¡

  • Make ¡sure ¡all ¡PEs ¡have ¡useful ¡work ¡

– Balance ¡the ¡CPU ¡load ¡ – Only ¡count ¡useful ¡work ¡

  • Maintain ¡a ¡high ¡event ¡efficiency ¡

– Balance ¡rate ¡of ¡progress ¡ – Leads ¡to ¡less ¡overall ¡work ¡

22 ¡

slide-23
SLIDE 23

Redefine ¡“Load” ¡for ¡PDES ¡

Past-­‑Looking ¡Metrics ¡

  • CPU ¡Time ¡
  • Current ¡Timestamp ¡
  • CommiTed ¡Timestamp ¡
  • CommiTed ¡Events ¡
  • Poten-al ¡CommiTed ¡Events ¡

Future-­‑Looking ¡Metrics ¡

  • Next ¡Timestamp ¡
  • Pending ¡Events ¡
  • Weighted ¡Pending ¡Events ¡
  • “Ac-ve” ¡Events ¡

23 ¡

slide-24
SLIDE 24

PHOLD ¡Event ¡Rate ¡

24 ¡

0 ¡ 10 ¡ 20 ¡ 30 ¡ 40 ¡ 50 ¡ 60 ¡ 70 ¡ 80 ¡ 90 ¡ 100 ¡ Count ¡ Leash ¡ Event ¡Rate ¡(millions/s) ¡ No ¡LB ¡ CPU ¡Time ¡ CommiTed ¡TS ¡ ¡Current ¡TS ¡ Next ¡TS ¡ CommiTed ¡Events ¡ Pending ¡Events ¡ Ac-ve ¡Events ¡ 4.5x ¡Speedup ¡ 2.5x ¡Speedup ¡

slide-25
SLIDE 25

PHOLD ¡Efficiency ¡

25 ¡

0 ¡ 10 ¡ 20 ¡ 30 ¡ 40 ¡ 50 ¡ 60 ¡ 70 ¡ 80 ¡ 90 ¡ 100 ¡ Count ¡ Leash ¡ Efficiency ¡(%) ¡ No ¡LB ¡ CPU ¡Time ¡ CommiTed ¡TS ¡ ¡Current ¡TS ¡ Next ¡TS ¡ CommiTed ¡Events ¡ Pending ¡Events ¡ Ac-ve ¡Events ¡

slide-26
SLIDE 26

Traffic ¡Event ¡Rate ¡

26 ¡

0 ¡ 5 ¡ 10 ¡ 15 ¡ 20 ¡ 25 ¡ 30 ¡ 35 ¡ Count ¡ Leash ¡ Event ¡Rate ¡(millions/s) ¡ No ¡LB ¡ CPU ¡Time ¡ CommiTed ¡TS ¡ ¡Current ¡TS ¡ Next ¡TS ¡ CommiTed ¡Events ¡ Pending ¡Events ¡ Ac-ve ¡Events ¡ 3x ¡Speedup ¡ 3x ¡Speedup ¡

slide-27
SLIDE 27

Traffic ¡Efficiency ¡

27 ¡

0 ¡ 10 ¡ 20 ¡ 30 ¡ 40 ¡ 50 ¡ 60 ¡ 70 ¡ 80 ¡ 90 ¡ 100 ¡ Count ¡ Leash ¡ Efficiency ¡(%) ¡ No ¡LB ¡ CPU ¡Time ¡ CommiTed ¡TS ¡ ¡Current ¡TS ¡ Next ¡TS ¡ CommiTed ¡Events ¡ Pending ¡Events ¡ Ac-ve ¡Events ¡

slide-28
SLIDE 28

What’s ¡next? ¡

  • BeTer ¡visualiza-on/analysis ¡tools ¡
  • More ¡diverse ¡set ¡of ¡models ¡
  • Conserva-ve ¡synchroniza-on ¡
  • Vector ¡load ¡balancing ¡strategies ¡
  • Adap-ve ¡load ¡balancer ¡
  • Combine ¡with ¡GVT ¡work ¡

28 ¡