Analysis and Approximation of Optimal Co-Scheduling on Chip - - PowerPoint PPT Presentation

analysis and approximation of optimal co scheduling on
SMART_READER_LITE
LIVE PREVIEW

Analysis and Approximation of Optimal Co-Scheduling on Chip - - PowerPoint PPT Presentation

Analysis and Approximation of Optimal Co-Scheduling on Chip Multiprocessors Yunlian Jiang Xipeng Shen The College of William & Mary, USA Jie Chen DoE Jefferson Lab , USA Rahul Tripath University of South Florida, USA Cache


slide-1
SLIDE 1

Analysis and Approximation

  • f Optimal Co-Scheduling on

Chip Multiprocessors

Yunlian Jiang Xipeng Shen The College of William & Mary, USA Jie Chen DoE Jefferson Lab , USA Rahul Tripath University of South Florida, USA

slide-2
SLIDE 2

Cache Sharing on CMP

 Shorten inter-thread

communication

 Flexible usage of cache

The College of William and Mary

2

CPU

Shared Cache

CPU

 degrade performance  impair fairness  hurt performance isolation

slide-3
SLIDE 3

Degradation is affected by co-runner

Performance degradation range

The College of William and Mary

3

20 40 60 80 100 120 140 160 180 200 Degradation min median max

slide-4
SLIDE 4

Job Co-Scheduling

 To assign jobs to chips in a manner to

minimize contention

The College of William and Mary

4

Shared cache 1 Shared cahe 2

P1 P3 P4 P2

slide-5
SLIDE 5

Job Co-Scheduling

 To assign jobs to chips in a manner to

minimize contention

The College of William and Mary

5

Shared cache 1 Shared cahe 2

P1 P3 P4 P2 Resource Waste Resource Contention

slide-6
SLIDE 6

Job Co-Scheduling

 To assign jobs to chips in a manner to

minimize contention

The College of William and Mary

6

Shared cache 2 Shared cache 1

P1 P3 P2 P4

slide-7
SLIDE 7

Job Co-Scheduling

 To assign jobs to chips in a manner to

minimize contention

The College of William and Mary

7

Shared cache 2 Shared cache 1

P1 P3 P2 P4

slide-8
SLIDE 8

The Goal of this Work

 Related work

 Snavely etc. [00’ ASPLOS]

 Goal of this work

 Find the optimal schedule on CMP system

 Benefits

 Evaluate current schedule quality  Applied in real system

The College of William and Mary

8

slide-9
SLIDE 9

Contributions

 Polynomial optimal solution on Dual-core

systems

 NP-Completeness proof on K-core (K>2)

systems

 Polynomial approximation algorithms on K-

core (K>2) systems

The College of William and Mary

9

slide-10
SLIDE 10

Contributions

 Polynomial optimal solution on Dual-core

systems

 NP-Completeness proof on K-core (K>2)

systems

 Polynomial approximation algorithms on K-

core (K>2) systems

The College of William and Mary

10

slide-11
SLIDE 11

Problem Formulation

 M jobs  N Core processors The College of William and Mary

11

slide-12
SLIDE 12

Problem Formulation

 M jobs  N Core processors The College of William and Mary

12

slide-13
SLIDE 13

Problem Formulation

 Assignment The College of William and Mary

13

i i i i

cCPI sCPI Deg sCPI − =

 Goal Minimize ∑Degi

slide-14
SLIDE 14

Dual-Core System

 Polynomial Solution

 Minimum-weight perfect matching

[Edmonds: 1965]  Matching

 A matching M in graph G is a set of edges with no

common vertex.

 perfect matching is a matching which

matches all vertices of the graph

The College of William and Mary

14

slide-15
SLIDE 15

Dual-Core System

 Minimum-weight perfect

matching

 In edge weighted

graph

 Sum of weight of

edges in the match is minimum

the College of William and Mary

15

slide-16
SLIDE 16

Dual-Core System

 Job

  • Nodes

 Corun-Degradation

  • Edge Weight

 Optimal Schedule

  • Minimum weight

perfect matching

the College of William and Mary

16

slide-17
SLIDE 17

Contributions

 Polynomial optimal solution on Dual-core

systems

 NP-Completeness proof on K-core (K>2)

systems

 Polynomial approximation algorithms on K-

core (K>2) systems

the College of William and Mary

17

slide-18
SLIDE 18

NP-Completeness proof

 NP proof

 Given a schedule, can compute

 Reduction

 NP-Complete problem  Job Co-scheduling

 Multidimensional Assignment Problem (MAP)

the College of William and Mary

18

slide-19
SLIDE 19

NP-Completeness Proof

 MAP the College of William and Mary

19

slide-20
SLIDE 20

NP-Completeness Proof

 MAP the College of William and Mary

20 Weight

slide-21
SLIDE 21

NP-Completeness Proof

 MAP the College of William and Mary

21

Minimize Total Weight

Weight

slide-22
SLIDE 22

NP-Completeness Proof

 Job Co-Scheduling on CMP the College of William and Mary

22

slide-23
SLIDE 23

NP-Completeness Proof

 Job Co-Scheduling on CMP the College of William and Mary

23

Minimize Total Weight

Weight

Sum of Degradations in the Assignment

slide-24
SLIDE 24

NP-Completeness Proof

 MAP  Job Co-Scheduling the College of William and Mary

24

slide-25
SLIDE 25

NP-Completeness Proof

 MAP  Job Co-Scheduling the College of William and Mary

25 Weight

=

Weight

slide-26
SLIDE 26

NP-Completeness Proof

 MAP  Job Co-Scheduling the College of William and Mary

26 Weight Weight

= =∞

Weight

slide-27
SLIDE 27

Contributions

 Polynomial optimal solution on Dual-core

systems

 NP-Completeness proof on K-core (K>2)

systems

 Polynomial approximation algorithms on K-

core (K>2) systems

the College of William and Mary

27

slide-28
SLIDE 28

Approximation algorithms

 Hierarchical Perfect Matching  Greedy the College of William and Mary

28

slide-29
SLIDE 29

Hierarchical Perfect Matching

 Dual-core system optimal solution the College of William and Mary

29

N Core N/2 Core Dual Core

slide-30
SLIDE 30

Hierarchical Perfect Matching

the College of William and Mary

30

slide-31
SLIDE 31

Hierarchical Perfect Matching

the College of William and Mary

31

slide-32
SLIDE 32

Hierarchical Perfect Matching

the College of William and Mary

32

slide-33
SLIDE 33

Hierarchical Perfect Matching

the College of William and Mary

33

slide-34
SLIDE 34

Hierarchical Perfect Matching

the College of William and Mary

34

slide-35
SLIDE 35

Greedy Algorithm

 Basic idea

 Schedule the least “polite” job first

 “politeness” of a Job

 Sum of degradations of all the assignments

contain this job.

 Impact of a job on others

the College of William and Mary

35

slide-36
SLIDE 36

Greedy Algorithm

I.

Sort unassigned jobs based on politeness

II.

Pick the least politeness job J to schedule

  • III. Add assignment contains J with least

degradation to schedule

  • IV. Update unassigned job list

the College of William and Mary

36

slide-37
SLIDE 37

Local Optimization

 Main Scheme the College of William and Mary

37

for i  1 to K-1 for j  i+1 to K Local-Optimization( i, j )

K: number of assignments

slide-38
SLIDE 38

Performance Evaluation

 Machine

 AMD Opteron 4 core processors

 Benchmarks

 15 SPEC CPU2000, 1 Stream

 Metrics

 Performance Degradation  Scheduling time  Fairness

the College of William and Mary

38

slide-39
SLIDE 39

Performance Degradation

the College of William and Mary

39

10 20 30 40 50 60 70

  • Perf. Degradation(%)

Benchmarks

OPT Greedy Hierarchical Random

slide-40
SLIDE 40

Performance Degradation

the College of William and Mary

40

10 20 30 40 50 60 70 ammp art applu bzip crafty equake facerec gap mcf parser stream swim twolf vpr Average Benchmarks

  • Perf. Degradation(%)

OPT Greedy-Opt Hierarchical-Opt Random

slide-41
SLIDE 41

Scheduling Time

5 10 15 20 16 32 48 64 80 96 112 128 144 Number of Jobs Running Time(s)

Greedy Greedy-opt Hierarchical Hierarchical-opt

the College of William and Mary

41

slide-42
SLIDE 42

Fairness

0.05 0.1 0.15 0.2 0.25

1

Unfairness Factor

OPT Greedy

  • pt

Greedy Hierarchical

  • pt

Hierarchical Random the College of William and Mary

42

 Unfairness Factor

 Coefficient of Variation of normalized degradation

slide-43
SLIDE 43

Conclusion

 Job co-scheduling on CMP is crucial

 Different schedule performance varies

 Dual-core system

 Polynomial solvable

 K-core (K>2) system

 NP-Complete problem  Heuristics

 Hierarchical  Greedy

the College of William and Mary

43

slide-44
SLIDE 44

Acknowledgement

 Weizhen Mao William and Mary  Cliff Stein Columbia University  William Cook Georgia Tech  National Science Foundation  IBM CAS Fellowship the College of William and Mary

44

slide-45
SLIDE 45

Thanks!

Questions?

the College of William and Mary

45