Slide 1

Slide 1 text

1 MICRO 2015 Microarchitectural Implications of Event-driven Server-side Web Applications Yuhao Zhu UT Austin with Daniel Richins, Matthew Halpern, Vijay Janapa Reddi

Slide 2

Slide 2 text

2 Instruction Supply is a Critical Aspect of Microarchitecture Design

Slide 3

Slide 3 text

Exploit Instruction Locality a.k.a., Common Case Design 3 Instruction Supply Cache Branch Predictor TLB

Slide 4

Slide 4 text

Exploit Instruction Locality a.k.a., Common Case Design 3 Instruction Supply Cache Branch Predictor TLB Hot instructions

Slide 5

Slide 5 text

Exploit Instruction Locality a.k.a., Common Case Design 3 Instruction Supply Cache Branch Predictor TLB Hot instructions Hot branch history patterns

Slide 6

Slide 6 text

Exploit Instruction Locality a.k.a., Common Case Design 3 Instruction Supply Cache Branch Predictor TLB Hot instructions Hot branch history patterns Hot pages

Slide 7

Slide 7 text

Exploit Instruction Locality a.k.a., Common Case Design 3 SPEC CPU (mostly) Instruction Supply Cache Branch Predictor TLB Hot instructions Hot branch history patterns Hot pages

Slide 8

Slide 8 text

Exploit Instruction Locality a.k.a., Common Case Design 3 SPEC CPU (mostly) Instruction Supply Cache Branch Predictor TLB Event-driven Applications Hot instructions Hot branch history patterns Hot pages

Slide 9

Slide 9 text

Locality Lost 4 SPEC CPU (mostly) Event-driven Applications Hot instructions Hot branch history pattern Hot pages Instruction Supply Cache Branch Predictor TLB

Slide 10

Slide 10 text

Locality Lost 5 SPEC CPU (mostly) Event-driven Applications Tight loops Hot pages Little branch aliasing Instruction Supply Cache Branch Predictor TLB

Slide 11

Slide 11 text

Locality Lost 5 SPEC CPU (mostly) Event-driven Applications Tight loops Hot pages Little branch aliasing Instruction Supply Cache Branch Predictor TLB

Slide 12

Slide 12 text

Event-driven Execution Model 6 Event Queue Head Tail

Slide 13

Slide 13 text

Event-driven Execution Model 6 Event Queue Client Request Head Tail

Slide 14

Slide 14 text

Event-driven Execution Model 6 Event Queue Single-threaded Event Loop Client Request Head Tail

Slide 15

Slide 15 text

Event-driven Execution Model 6 Event Queue Single-threaded Event Loop Client Request Head Tail

Slide 16

Slide 16 text

Event-driven Execution Model 6 Event Queue Single-threaded Event Loop DB Access File I/O Network Client Request Head Tail

Slide 17

Slide 17 text

Event-driven Execution Model 6 Event Queue Single-threaded Event Loop DB Access File I/O Network Client Request Head Tail

Slide 18

Slide 18 text

Event-driven Execution Model 6 Event Queue Single-threaded Event Loop DB Access File I/O Network Client Request Head Tail

Slide 19

Slide 19 text

Event-driven Execution Model 6 Event Queue Single-threaded Event Loop DB Access File I/O Network Client Request Head Tail

Slide 20

Slide 20 text

Event-driven Execution Model 6 Event Queue Single-threaded Event Loop DB Access File I/O Network Client Request Head Tail Our Focus

Slide 21

Slide 21 text

Applications 7 Application Domain Etherpad Lite Document Collaboration Let’s Chat Messaging Lighter Content Management Mud Gaming Todo Task Management Word Finder API Services https://github.com/nodebenchmark/

Slide 22

Slide 22 text

Locality Lost 8

Slide 23

Slide 23 text

Locality Lost 8 lbm leslie3d libquantum astar hmmer mcf bzip2 namd gromacs zeusmp calculix GemsFDTD soplex sphinx3 bwaves milc dealII wrf h264ref gamess tonto xalancbmk povray perlbench sjeng gcc gobmk omnetpp cactusADM L1 I-Cache MPKI 0 30 60 90 120 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS I-Cache Parameters 32 KB, 64 B cache line, 8-way

Slide 24

Slide 24 text

Locality Lost 9 lbm leslie3d libquantum astar hmmer mcf bzip2 namd gromacs zeusmp calculix GemsFDTD soplex sphinx3 bwaves milc dealII wrf h264ref gamess tonto xalancbmk povray perlbench sjeng gcc gobmk omnetpp cactusADM L1 I-Cache MPKI 0 30 60 90 120 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS I-Cache Parameters 32 KB, 64 B cache line, 8-way

Slide 25

Slide 25 text

Locality Lost 9 lbm leslie3d libquantum astar hmmer mcf bzip2 namd gromacs zeusmp calculix GemsFDTD soplex sphinx3 bwaves milc dealII wrf h264ref gamess tonto xalancbmk povray perlbench sjeng gcc gobmk omnetpp cactusADM L1 I-Cache MPKI 0 30 60 90 120 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS I-Cache Parameters 32 KB, 64 B cache line, 8-way SPEC CPU 2006 Average

Slide 26

Slide 26 text

Locality Lost 10 lbm leslie3d libquantum astar hmmer mcf bzip2 namd gromacs zeusmp calculix GemsFDTD soplex sphinx3 bwaves milc dealII wrf h264ref gamess tonto xalancbmk povray perlbench sjeng gcc gobmk omnetpp cactusADM L1 I-Cache MPKI 0 30 60 90 120 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS I-Cache Parameters 32 KB, 64 B cache line, 8-way SPEC CPU 2006 Average

Slide 27

Slide 27 text

Locality Lost 10 lbm leslie3d libquantum astar hmmer mcf bzip2 namd gromacs zeusmp calculix GemsFDTD soplex sphinx3 bwaves milc dealII wrf h264ref gamess tonto xalancbmk povray perlbench sjeng gcc gobmk omnetpp cactusADM L1 I-Cache MPKI 0 30 60 90 120 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS I-Cache Parameters 32 KB, 64 B cache line, 8-way SPEC CPU 2006 Average Node.js has 4.2 X higher MPKI than SPEC CPU.

Slide 28

Slide 28 text

Root Cause Analysis 11

Slide 29

Slide 29 text

Root Cause Analysis 11 High I-$ Miss Ratio

Slide 30

Slide 30 text

Root Cause Analysis 11 High I-$ Miss Ratio Large Instruction Reuse-distance

Slide 31

Slide 31 text

Root Cause Analysis 11 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) High I-$ Miss Ratio Large Instruction Reuse-distance

Slide 32

Slide 32 text

Root Cause Analysis 11 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) omnetpp (worst) lbm (best) High I-$ Miss Ratio Large Instruction Reuse-distance

Slide 33

Slide 33 text

Root Cause Analysis 11 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) omnetpp (worst) lbm (best) Let’s Chat High I-$ Miss Ratio Large Instruction Reuse-distance

Slide 34

Slide 34 text

Root Cause Analysis 11 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) 100 80 60 40 20 0 Dynamic Instructions (%) 20 24 28 212 216 Reuse Distance (log) High I-$ Miss Ratio Large Instruction Reuse-distance

Slide 35

Slide 35 text

Root Cause Analysis 12 High I-$ Miss Ratio Large Instruction Reuse-distance

Slide 36

Slide 36 text

Root Cause Analysis 12 … … Instruction
 Stream High I-$ Miss Ratio Large Instruction Reuse-distance

Slide 37

Slide 37 text

Root Cause Analysis 12 … … Instruction
 Stream High I-$ Miss Ratio Large Instruction Reuse-distance

Slide 38

Slide 38 text

Event 2 Event 1 Event 3 Root Cause Analysis 12 … … Instruction
 Stream High I-$ Miss Ratio Inter-event Code Reuse Large Instruction Reuse-distance

Slide 39

Slide 39 text

Event 2 Event 1 Event 3 Root Cause Analysis 12 … … Instruction
 Stream High I-$ Miss Ratio Inter-event Code Reuse Large Instruction Reuse-distance Large Event Footprint

Slide 40

Slide 40 text

Root Cause Analysis 13 100 80 60 40 20 0 Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses Intra-event Inter-event High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 41

Slide 41 text

Root Cause Analysis 13 100 80 60 40 20 0 Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses Intra-event Inter-event High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses

Slide 42

Slide 42 text

Root Cause Analysis 13 100 80 60 40 20 0 Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses Intra-event Inter-event High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses

Slide 43

Slide 43 text

Root Cause Analysis 13 100 80 60 40 20 0 Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses Intra-event Inter-event High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses

Slide 44

Slide 44 text

Root Cause Analysis 13 100 80 60 40 20 0 Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses Intra-event Inter-event High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses

Slide 45

Slide 45 text

Root Cause Analysis 13 100 80 60 40 20 0 Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses Intra-event Inter-event High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses 100 80 60 40 20 0 Static Instructions (%) 32 64 96 128 160 192 224 256 > 256 # of reuses Most instruction reuses are inter-event.

Slide 46

Slide 46 text

Root Cause Analysis 14 High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 47

Slide 47 text

Root Cause Analysis 14 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 48

Slide 48 text

Root Cause Analysis 14 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) L1-I$ Size 32KB High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 49

Slide 49 text

Root Cause Analysis 14 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) 13 215 217 219 221 Event Footprint (Bytes) L1 Cache Size 32 KB Word Finder Todo Mud Etherpad Let's Chat Lighter High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 50

Slide 50 text

Root Cause Analysis 14 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) 13 215 217 219 221 Event Footprint (Bytes) L1 Cache Size 32 KB Word Finder Todo Mud Etherpad Let's Chat Lighter Only 12% Events Fit in a 32 KB I-$ High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 51

Slide 51 text

Root Cause Analysis 15 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 52

Slide 52 text

Root Cause Analysis 15 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 53

Slide 53 text

Root Cause Analysis 15 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) 213 215 217 219 221 Event Footprint (Bytes) 100 80 60 40 20 0 Events (%) Most events’ footprints do not fit in a typical I-$. High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Large Instruction Reuse-distance

Slide 54

Slide 54 text

Root Cause Analysis 16 High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Few Event Types Large Instruction Reuse-distance

Slide 55

Slide 55 text

Root Cause Analysis 16 High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Few Event Types Minimal Tight Loops Large Instruction Reuse-distance

Slide 56

Slide 56 text

Root Cause Analysis 16 High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Few Event Types Minimal Tight Loops Large Instruction Reuse-distance Event-driven Applications

Slide 57

Slide 57 text

Microarchitecture Behaviors Root Cause Analysis 16 High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Few Event Types Minimal Tight Loops Large Instruction Reuse-distance Event-driven Applications

Slide 58

Slide 58 text

Application Characteristics Microarchitecture Behaviors Root Cause Analysis 16 High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Few Event Types Minimal Tight Loops Large Instruction Reuse-distance Event-driven Applications

Slide 59

Slide 59 text

Application Characteristics Microarchitecture Behaviors Root Cause Analysis 16 High I-$ Miss Ratio Inter-event Code Reuse Large Event Footprint Few Event Types Minimal Tight Loops Large Instruction Reuse-distance Event-driven Applications

Slide 60

Slide 60 text

17 Can we better capture instruction locality to improve instruction supply efficiency?

Slide 61

Slide 61 text

Scale Up Hardware Resources? 18 2.0 1.8 1.6 1.4 1.2 1.0 Norm. Time 3.2 2.4 1.6 Let's Chat Word Finder Todo Mud Etherpad Lighter

Slide 62

Slide 62 text

Scale Up Hardware Resources? 18 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 2.0 1.8 1.6 1.4 1.2 1.0 Norm. Time 3.2 2.4 1.6 Let's Chat Word Finder Todo Mud Etherpad Lighter

Slide 63

Slide 63 text

Scale Up Hardware Resources? 18 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) SPEC CPU 2006 Avarage @ 32KB 2.0 1.8 1.6 1.4 1.2 1.0 Norm. Time 3.2 2.4 1.6 Let's Chat Word Finder Todo Mud Etherpad Lighter

Slide 64

Slide 64 text

Scale Up Hardware Resources? 18 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 2.0 1.8 1.6 1.4 1.2 1.0 Norm. Time 3.2 2.4 1.6 Let's Chat Word Finder Todo Mud Etherpad Lighter

Slide 65

Slide 65 text

Scale Up Hardware Resources? 18 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 2.0 1.8 1.6 1.4 1.2 1.0 Norm. Time 3.2 2.4 1.6 Let's Chat Word Finder Todo Mud Etherpad Lighter

Slide 66

Slide 66 text

Scale Up Hardware Resources? 18 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 2.0 1.8 1.6 1.4 1.2 1.0 Norm. Time 3.2 2.4 1.6 Let's Chat Word Finder Todo Mud Etherpad Lighter

Slide 67

Slide 67 text

Scale Up Hardware Resources? 18 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 2.0 1.8 1.6 1.4 1.2 1.0 Norm. Time 3.2 2.4 1.6 Let's Chat Word Finder Todo Mud Etherpad Lighter ~256 KB Needed!

Slide 68

Slide 68 text

Scale Up Hardware Resources? 18 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 120 90 60 30 0 I-Cache MPKI 16 64 256 1024 I-Cache size (KB) 2.0 1.8 1.6 1.4 1.2 1.0 Norm. Time 3.2 2.4 1.6 Let's Chat Word Finder Todo Mud Etherpad Lighter ~256 KB Needed!

Slide 69

Slide 69 text

Exploit Inter-Event Locality 19

Slide 70

Slide 70 text

Exploit Inter-Event Locality 19 … … Event 1 Instruction
 Stream Event 2 Event 3

Slide 71

Slide 71 text

Exploit Inter-Event Locality 19 1. Retain the reused portion of an event’s footprint in the cache … … Event 1 Instruction
 Stream Event 2 Event 3

Slide 72

Slide 72 text

Exploit Inter-Event Locality 19 1. Retain the reused portion of an event’s footprint in the cache … … Event 1 Instruction
 Stream Event 2 Event 3

Slide 73

Slide 73 text

Exploit Inter-Event Locality 19 1. Retain the reused portion of an event’s footprint in the cache 2. Prefetch the unretained part … … Event 1 Instruction
 Stream Event 2 Event 3

Slide 74

Slide 74 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache 20 PRINCIPLES Exploit Inter-Event Locality

Slide 75

Slide 75 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache 20 PRINCIPLES PRACTICES Exploit Inter-Event Locality

Slide 76

Slide 76 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache 20 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache Exploit Inter-Event Locality

Slide 77

Slide 77 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache Exploit Inter-Event Locality

Slide 78

Slide 78 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU Exploit Inter-Event Locality

Slide 79

Slide 79 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU j Exploit Inter-Event Locality

Slide 80

Slide 80 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU j Exploit Inter-Event Locality

Slide 81

Slide 81 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU j k Exploit Inter-Event Locality

Slide 82

Slide 82 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU j k Exploit Inter-Event Locality

Slide 83

Slide 83 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU j k … … … … … … … k j Exploit Inter-Event Locality

Slide 84

Slide 84 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU j k … … … … … … … k j a Exploit Inter-Event Locality

Slide 85

Slide 85 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU j k … … … … … … … k j a MISS Exploit Inter-Event Locality

Slide 86

Slide 86 text

2. Prefetch the unretained part 1. Retain the reused portion of an event’s footprint in the cache ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 20 a b c d e f g h i PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache MRU LRU j k Inter-event Locality Lost! … … … … … … … k j a MISS Exploit Inter-Event Locality

Slide 87

Slide 87 text

Exploit Inter-Event Locality 2. Prefetch the unretained part ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 21 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache a b c d e f g h i MRU LRU

Slide 88

Slide 88 text

Exploit Inter-Event Locality 2. Prefetch the unretained part ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 21 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache a b c d e f g h i MRU LRU j

Slide 89

Slide 89 text

Exploit Inter-Event Locality 2. Prefetch the unretained part ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 21 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache a b c d e f g h i MRU LRU j

Slide 90

Slide 90 text

Exploit Inter-Event Locality 2. Prefetch the unretained part ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 21 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache a b c d e f g h i MRU LRU k j

Slide 91

Slide 91 text

Exploit Inter-Event Locality 2. Prefetch the unretained part ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 21 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache a b c d e f g h i MRU LRU j k

Slide 92

Slide 92 text

Exploit Inter-Event Locality 2. Prefetch the unretained part ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 21 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache a b c d e f g h i MRU LRU j k a

Slide 93

Slide 93 text

Exploit Inter-Event Locality 2. Prefetch the unretained part ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 21 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache a b c d e f g h i MRU LRU j k a HIT

Slide 94

Slide 94 text

Exploit Inter-Event Locality 2. Prefetch the unretained part ▸ LRU Cache Insertion Policy (LIP) (Qureshi et al., [ISCA’07]) ▹ Insert incoming line into LRU position, not MRU position 21 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache a b c d e f g h i MRU LRU j k Reused Portion Retained! a HIT

Slide 95

Slide 95 text

22 I-cache MPKI 0 25 50 75 100 W ord Finder Todo M ud Etherpad Let's C hat Lighter

Slide 96

Slide 96 text

22 I-cache MPKI 0 25 50 75 100 W ord Finder Todo M ud Etherpad Let's C hat Lighter SPEC CPU 2006 Average @ 32KB

Slide 97

Slide 97 text

23 I-cache MPKI 0 25 50 75 100 W ord Finder Todo M ud Etherpad Let's C hat Lighter Baseline

Slide 98

Slide 98 text

24 I-cache MPKI 0 25 50 75 100 W ord Finder Todo M ud Etherpad Let's C hat Lighter Baseline LIP

Slide 99

Slide 99 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache

Slide 100

Slide 100 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences

Slide 101

Slide 101 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … …

Slide 102

Slide 102 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … … x y z

Slide 103

Slide 103 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … … x y z

Slide 104

Slide 104 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … … x y z x

Slide 105

Slide 105 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … … x y z x

Slide 106

Slide 106 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … … x y z x y z

Slide 107

Slide 107 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … … x y z x y z y

Slide 108

Slide 108 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … … x y z x y z y

Slide 109

Slide 109 text

Exploit Inter-Event Locality 2. Prefetch the unretained part 25 PRINCIPLES PRACTICES 1. Retain the reused portion of an event’s footprint in the cache ▸ Temporal Instruction Fetch Streaming (TIFS) (Ferdman et al., [MICRO’08]) ▹ Find patterns in miss sequences … … x y z x y z y z …

Slide 110

Slide 110 text

26 I-cache MPKI 0 25 50 75 100 W ord Finder Todo M ud Etherpad Let's C hat Lighter Baseline LIP

Slide 111

Slide 111 text

27 I-cache MPKI 0 25 50 75 100 W ord Finder Todo M ud Etherpad Let's C hat Lighter Baseline LIP LIP+TIFS

Slide 112

Slide 112 text

27 I-cache MPKI 0 25 50 75 100 W ord Finder Todo M ud Etherpad Let's C hat Lighter Baseline LIP LIP+TIFS 88% Average MPKI Reduction

Slide 113

Slide 113 text

Exploit Instruction Locality a.k.a., Common Case Design 28 SPEC CPU (mostly) Instruction Supply Cache Branch Predictor TLB Event-driven Applications Hot instructions Hot branch history patterns Hot pages Cache

Slide 114

Slide 114 text

Exploit Instruction Locality a.k.a., Common Case Design 28 SPEC CPU (mostly) Instruction Supply Cache Branch Predictor TLB Event-driven Applications Hot instructions Hot branch history patterns Hot pages Cache Branch Predictor TLB

Slide 115

Slide 115 text

Beyond Instruction Cache — Branch Predictor 29 milc GemsFDTD lbm libquantum calculix zeusmp wrf perlbench leslie3d cactusADM hmmer xalancbmk tonto gamess dealII sphinx3 h264ref omnetpp soplex bwaves namd povray mcf gromacs gcc bzip2 sjeng astar gobmk Misprediction (%) 0 5 10 15 20 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS Tournament Predictor 12-bit history register 256 local branch histories

Slide 116

Slide 116 text

Beyond Instruction Cache — Branch Predictor 29 milc GemsFDTD lbm libquantum calculix zeusmp wrf perlbench leslie3d cactusADM hmmer xalancbmk tonto gamess dealII sphinx3 h264ref omnetpp soplex bwaves namd povray mcf gromacs gcc bzip2 sjeng astar gobmk Misprediction (%) 0 5 10 15 20 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS Tournament Predictor 12-bit history register 256 local branch histories 2.4 X Higher!

Slide 117

Slide 117 text

Beyond Instruction Cache — TLB 30 libquantum lbm hmmer astar milc bzip2 mcf namd sjeng bwaves zeusmp cactusADM leslie3d GemsFDTD wrf gromacs sphinx3 gamess calculix h264ref gobmk soplex tonto perlbench dealII omnetpp povray gcc xalancbmk L1 I-TLB MPKI 0 1 2 3 4 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS I-TLB Parameters 64 KB, 4-way 4 KB page size

Slide 118

Slide 118 text

Beyond Instruction Cache — TLB 30 libquantum lbm hmmer astar milc bzip2 mcf namd sjeng bwaves zeusmp cactusADM leslie3d GemsFDTD wrf gromacs sphinx3 gamess calculix h264ref gobmk soplex tonto perlbench dealII omnetpp povray gcc xalancbmk L1 I-TLB MPKI 0 1 2 3 4 Word Finder Todo Mud Etherpad Let's Chat Lighter SPEC CPU 2006 NodeJS 72 X Higher! I-TLB Parameters 64 KB, 4-way 4 KB page size

Slide 119

Slide 119 text

31

Slide 120

Slide 120 text

31

Slide 121

Slide 121 text

31

Slide 122

Slide 122 text

31 Event-based processing is a fundamental computation pattern.

Slide 123

Slide 123 text

31 Event-based processing is a fundamental computation pattern. Web Mobile Internet-of-Things Sensor networks Cloud

Slide 124

Slide 124 text

32 MICRO 2015 Microarchitectural Implications of Event-driven Server-side Web Applications Yuhao Zhu UT Austin with Daniel Richins, Matthew Halpern, Vijay Janapa Reddi