Top Banner
Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen Computer Science The College of William and Mary, USA
25

Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

May 31, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

Exploration of Influence of Program Inputs on

CMP Co-Scheduling

Yunlian JiangXipeng Shen

Computer ScienceThe College of William and Mary, USA

Page 2: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

2

Cache sharing in CMP

CPU

Shared Cache

CPU

Commercial CMPsIntel Core 2 Duo E6750

AMD Athlon X2 6400+

Page 3: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

3

Cache sharing

Pros Shorten inter-thread communication Flexible usage of cache

Cons: causes cache contention degrade performance impair fairness hurt performance isolation

Page 4: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

4

Job co-scheduling

P2

P1

P4

P3

CMP Chip1

CMP Chip2

To assign jobs to chips in a manner to minimize contention

Example

Page 5: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

5

P4P3

Job co-scheduling

P2

P1

P4

P3

CMP Chip1

CMP Chip2

Chip2P1 P2

To assign jobs to chips in a manner to minimize contention

Example

Page 6: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

6

Job co-scheduling

P2

P1

P4

P3

CMP Chip1

CMP Chip2Chip2

Chip1

P1

P2

P4

P3

To assign jobs to chips in a manner to minimize contention

Example

Page 7: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

7

Previous co-scheduling work

Runtime sampling based Online sampling the performance on different

schedules and pick the best E.g., [Tullsen+: ASPLOS’00, ….]

Profiling directed Offline profiling to learn program cache behavior E.g., [Nussbaum+: USENIX’05….]

Page 8: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

8

Our focus

Two factors determining cache contention Programs running together Inputs to the programs

Page 9: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

9

Contributions of this work

Exposing input impact on cache contention Construction of cross-input predictive models Evaluation on a proactive co-scheduler

Page 10: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

10

Contributions of this work

Exposing input impact on cache contention Construction of cross-input predictive models Evaluation on a proactive co-scheduler

Page 11: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

11

Measurement of input impact

Machine: Intel Xeon dual-core processors Compiler: gcc4.1 Hardware performance API: PAPI3.5 Experiments

Measure the performance degradation

every pair of 12 SPEC CPU2k programs

3 different input sets (test, train, and ref)

Page 12: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

12

Metric

sCPI : Cycles per Instruction (CPI) when running alone

cCPI : CPI when co-running with other programs

Page 13: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

13

Co-run degradation on different inputs

Page 14: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

14

Contributions of this work

Exposing input impact on cache contention Construction of cross-input predictive models Evaluation on a proactive co-scheduler

Page 15: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

15

Objective

Predictivemodel

An arbitrary input

Cache behavior

CAPSScheduler

Corun schedule

Page 16: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

16

Proactive Co-Scheduler: CAPS

Page 17: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

17

Single-run behaviors to predict

Access per Instruction Density of memory references in an execution

Distinct Memory Blocks per Cycle (DPC) Aggressiveness of cache contention

Reuse Signature

DPC = Distinct Blocks per Instruction (DPI)x

Instructions per cycle

Page 18: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

18

Reuse signature

Reuse distance Number of distinct data between data reuse E.g,

b a a c b

Reuse signature Histogram of reuse distances in an execution

Predictable with over 94% accuracy [Zhong+:TC’07]

2

Page 19: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

19

Construction of predictive models

< I1 B1 >

< Ik Bk >

< In Bn >

……

Regression Model

PredictiveModel

New Input

MemoryBehavior

Page 20: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

20

Regression models Linear model Least Mean Squares (LMS) method

Linear function between inputs and outputs

Non-linear model K-Nearest-Neighbor

Use k similar instances to estimate new output value

Hybrid method Pick the model with minimum training errors for a program

Page 21: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

21

Contributions of this work

Exposing input impact on cache contention Construction of cross-input predictive models Evaluation on a proactive co-scheduler

Page 22: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

22

Prediction accuracy resultPrograms Access per instruction DPI

LMS NN Hybrid LMS NN Hybrid

ammp 89.58 98.76 98.76 39.83 86.72 86.72

art 98.86 94.25 98.86 98.96 94.25 98.96

bzip 75.79 78.62 78.62 67.69 64.05 67.69

crafty 99.54 99.24 99.54 76.31 72.50 76.31

equake 54.58 54.42 54.58 82.27 82.13 82.27

gap 74.75 79.35 79.35 79.87 78.08 79.87

gzip 82.76 86.98 86.98 77.85 66.47 77.85

mcf 90.25 92.45 92.45 89.73 88.11 89.73

mesa 96.39 96.98 96.98 89.43 93.33 93.33

parser 96.02 98.61 98.61 89.49 70.42 89.49

twolf 97.11 98.10 98.10 52.12 86.75 86.75

vpr 81.50 81.50 81.50 96.30 95.28 96.30

Average 86.43 88.27 88.69 78.32 81.51 85.44

Page 23: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

23

Effects on Co-Scheduling

0

0.5

1

1.5

2

2.5

optimal CAPS-real CAPS-pred random

Normalized Corun Degradation

Page 24: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

24

Conclusion

Input influence to job co-scheduling Co-schedulers should adapt to program inputs

Cross-input predictive models Reasonable accuracy through LMS and NN Effective in proactive co-scheduling

Page 25: Exploration of Influence of Program Inputs on CMP Co ... · Exploration of Influence of Program Inputs on CMP Co-Scheduling Yunlian Jiang Xipeng Shen. Computer Science. The College

25

Thanks!Questions?