performance, energy, and event characterization on …milenka/docs/cpe531_guestlecture... ·...

45
PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON MODERN INTEL PROCESSORS Aleksandar Milenkovic (based on Ranjan Hebbar’s work) November 21, 2019 The Department of Electrical & Computer Engineering

Upload: others

Post on 22-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON

MODERN INTEL PROCESSORS

Aleksandar Milenkovic

(based on Ranjan Hebbar’s work)

November 21, 2019

The Department of Electrical & Computer Engineering

Page 2: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Outline

• Introduction

• SPEC CPU2017

• Test Environment & Profiling Tools

• Test Machine Setup

• SPEC CPU2017 Benchmarks Scalability Analysis and Characterization

• Architectural Comparison

• Conclusion

2

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 3: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Introduction

• Background & Motivation

• Technology: Moore’s Law and Dennard’s Law do not hold anymore

• Applications: Increasing sophistication and complexity

• Markets: Shortening time-to-market

• Performance evaluation

• Which machine is faster? How to optimize my application?What are application bottlenecks? How to build a faster machine?

• Metrics: speed, throughput, performance, power, performance/power

• Stakeholders: consumers, system performance engineers, application developers, CSE/CS researchers

• Need for standardized workloads: SPEC, EEMBC, Parsec, …

3

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 4: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

What Is This Research About?

• Know your machine! What configuration would yield the best performance and save energy?

• Explore impact of Compilers, Hardware Prefetching, Hyperthreading, Frequency Scaling on Performance and Energy Efficiency

• Know your application! What resources does your workload need to perform better? How do you make it faster?

• Explores SPEC CPU2017 benchmark suites and its scope of application

• Characterizes individual SPEC CPU2017 benchmarks

• Analyzes performance bottlenecks of each benchmark using the Intel VTune Amplifier’s Top-down Microarchitectural Analysis Method

• Tests scalability of each benchmark

• Machine Comparison. How do different classes of machines handle similar workloads?

• Evaluates performance of a set of desktop and server computers using SPEC CPU2017 metrics

4

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 5: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

SPEC CPU

• Benchmarking is critical for evaluating current systems for bottlenecks and exploring architectural enhancements in future systems

• Standard Performance Evaluation Corporation (SPEC), was founded in 1988

• It is a non-profit organization that aims to “establish, maintain and endorse standardized benchmarks and tools to evaluate performance and energy efficiency” for computing systems

• There have been six iterations of the SPEC CPU benchmarks

• Each generation revises the suites to represent current and future workloads

• Though SPEC CPU is perceived as a CPU intensive benchmark suit it does emphasize memory and compiler efficiency as well

5

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 6: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

SPEC CPU2017

• What is SPEC CPU2017?

• The SPEC CPU2017 benchmark suites contains SPEC's latest, industry-standardized, CPU intensive suites for measuring and comparing compute intensive performance, stressing a system's processor, memory subsystem, and compiler

• Why would I want to use it?

• To evaluate performance of modern computers using “speed” (defined as how fast the processor can execute a certain task) and “throughput” (defined as the amount of work that is completed in a given amount of time) metrics for compute-intensive workloads

• What will I learn from the results?

• How the system under test compares with the reference machine

• Possible bottlenecks affecting performance

6

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 7: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

SPEC CPU2017 Benchmarks

SPECrate 2017Floating Point

SPECspeed 2017Floating Point

Language Application Area

503.bwaves_r 603.bwaves_s Fortran Explosion modeling

507.cactuBSSN_r 607.cactuBSSN_sC++, C, Fortran

Physics: relativity

508.namd_r C++ Molecular dynamics

510.parest_r C++Biomedical imaging: optical tomography

511.povray_r C++, C Ray tracing

519.lbm_r 619.lbm_s C Fluid dynamics

521.wrf_r 621.wrf_s Fortran, C Weather forecasting

526.blender_r C++, C3D rendering and animation

527.cam4_r 627.cam4_s Fortran, CAtmosphere modeling

628.pop2_s Fortran, CWide-scale ocean modeling (climate level)

538.imagick_r 638.imagick_s C Image manipulation

544.nab_r 644.nab_s C Molecular dynamics

549.fotonik3d_r 649.fotonik3d_s FortranComputational Electromagnetics

554.roms_r 654.roms_s FortranRegional ocean modeling

7

SPECrate 2017Integer

SPECspeed 2017Integer

Language Application Area

500.perlbench_r 600.perlbench_s C Perl interpreter

502.gcc_r 602.gcc_s C GNU C compiler

505.mcf_r 605.mcf_s C Route planning

520.omnetpp_r 620.omnetpp_s C++Discrete Event simulation - computer network

523.xalancbmk_r 623.xalancbmk_s C++XML to HTML conversion via XSLT

525.x264_r 625.x264_s C Video compression

531.deepsjeng_r 631.deepsjeng_s C++Artificial Intelligence: alpha-beta tree search (Chess)

541.leela_r 641.leela_s C++Artificial Intelligence: Monte Carlo tree search (Go)

548.exchange2_r 648.exchange2_s FortranArtificial Intelligence: recursive solution generator (Sudoku)

557.xz_r 657.xz_s CGeneral data compression

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 8: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

SPEC Metrics: What is in a Number?

• Reference machine (RM): Sun Microsystems server, the Sun Fire V490 with 2100 MHz UltraSPARC-IV+ chips

• Speed ratio (1 copy of benchmark is run, tester chooses the number of OpenMP threads)

• 𝑆𝑅 𝑆𝐵𝑖 =𝐸𝑇(𝑆𝐵𝑖,𝑅𝑀)

𝐸𝑇(𝑆𝐵𝑖,𝑆𝑈𝑇)

• SPECspeed2017_fp_base, SPECspeed2017_int_base: Geometric mean of individual speed ratios

• Throughput ratio (tester chooses NC copies to run; OpenMP is disabled)

• 𝑇𝑅 𝑅𝐵𝑖 =𝑁𝐶∙𝐸𝑇(𝑅𝐵𝑖,𝑅𝑀)

𝐸𝑇(𝑆𝐵𝑖,𝑆𝑈𝑇)

• SPECrate2017_fp_base, SPECrate2017_int_base: Geometric mean of individual speed ratios

8

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 9: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

More on SPEC CPU2017

• Landing page: https://www.spec.org/cpu2017/

• Overview: https://www.spec.org/cpu2017/Docs/overview.html

• Submitted results: https://www.spec.org/cpu2017/results/

9

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 10: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Test Environment & Profiling Tools

• The organization of this subsection is as follows

• Microarchitectural overview

• Intel turbo-boost technology

• Systems under test

• Compilers used for the study

• Tools and application used in this study

• Top-down Microarchitectural Analysis Method

10

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 11: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Intel Processors: Tick-Tock

Intel Microarchitecture Codename Nehelam

Intel Microarchitecture Codename Sandy Bridge

Nehalem45nm

Westmere32 nm

Sandy Bridge32 nm

Ivy Bridge22 nm

Tock Tick Tock Tick

Intel Microarchitecture Codename Skylake

Skylake14 nm

Kaby Lake

14+ nm

Coffee Lake

14++ nm

2009 2010 2011 2012

Intel Microarchitecture Codename Haswell

Haswell22 nm

Broadwell14 nm

Tock Tick

2013 2014

Tock - -

2015 2016 2017

New Microarchitecture New Process Technology

11

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 12: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Intel Microarchitecture: Sandy Bridge

32 K L1 Instruction Cache Pre-decode Instr Queue

Decoders

1.5K uOP Cache

Branch Predictor

Load Buffer

Store Buffer

Reorder Buffers

Scheduler

Port 0 Port 1 Port 5 Port 2 Port 3 Port 4

ALU

V-Mul

V-Shuffle

Fdiv

256-FP MUL

256-FP Blend

ALU

V-Add

V-Shuffle

256-FP Add

ALU

JMP

256-FP Shuf

256-FP Bool

256-FP Blend

Load

StAddr

Load

StAddr

STD

Memory Control

256K L2 Cache (Unified)Line Fill Buffer 32K L1 Data Cache

Allocate / Rename / Retire

48 bytes/cycle

In-order

Out-of-order

Front-End

Back-End

12

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 13: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Intel Microarchitecture: Skylake

MSROM

BPU32 K L1 instriuction

Cache

Decode Icache (DSB)Legacy Decode

Pipeline

Instruction Decode Queue(IDQ, or micro-op queus)

Allocate/Rename/Retire/MoveElimination/ZeroIdion

Scheduler

Int ALU,Int Shft,Branch 1

Int ALU,Vec FMA,Vec MUL,Vec Add,Vec Shft,Divide,

Branch2

Int ALU,Fast LEA,Vec FMA,Vec MUL,Ved Add,Vec ALU,Vec Shft,Int MUL,Slow LEA

Int ALU,Fast LEA,

Vec SHUF,Vec ALU,

CVT

Port 2 LD/STA

Port 3 LD/STA

Port 4 STD

Port 7 STA

32 K L1 Data Cache

256K L2 Cache (Unified)

4 uops/cyle 6 uops/cycle 5 uops/cycle

Port 0 Port 1 Port 5 Port 6

13

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 14: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Coffee Lake (Front-End)

14

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 15: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Coffee Lake (Back-End)

15

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 16: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Annotated Die Map of Core i7-8700K

Processor Graphics

Core Core

Core

Core

Shared L3 Cache & Ring Interconnect

Memory Controller I/O

System agent and Memory

Controller

Including DMI, Display & Misc.

I/O

Core Core

16

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 17: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Intel Turbo-Boost Technology 2.0

Dynamic Range Turbo Frequency Limits

Turbo Bins

Base Frequencies

Idle mode

17

• Turbo mode accelerates processor and onboard graphics performance for peak loads

• With lower leakage current the core frequency could be increased resulting in a larger frequency allocation for turbo mode

• A high frequency operation is costly in terms of power and increases thermal dissipation. Hence turbo mode is used only when required

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 18: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Systems Under Test

Sys. Code name mtsano clingmansdome vidrak mtleconteProcessor Core i7-4770 Core i7-8700K Xeon E3-1240 v2 Xeon E5-2643 v3Lithography 22nm 14nm 22nm 22nmGeneration 4th Generation 8th Generation 3th Generation 4th GenerationIntel Codename Haswell Coffee-Lake Ivy-Bridge HaswellYear of release Q2-2013 Q4-2017 Q2-2012 Q3-2014Physical Cores 4 6 4 6*2Threads / Core 2 2 2 2Logical Cores 8 12 8 12*2CPU Max Freq. 3.9 GHz 4.70 GHz 3.8 GHz 3.7 GHzCPU Avg. Freq. 3.4 GHz 3.7 GHz 3.4 GHz 3.4 GHzCPU Min Freq. 0.8 GHz 0.8 GHz 1.6 GHz 1.2 GHzL1d cache 32K*4 32K*6 32K*4 32K*6*2L1i cache 32K*4 32K*6 32K*4 32K*6*2L2 Cache 256K*4 256K*6 256K*4 256K*6*2L3 Cache (LLC) 8192K 12288K 8192K 20480KRAM 16 GB 32 GB 16GB 64 GBRAM Freq. 1600 MHz 2400 MHz 1600 MHz 2400 MHzTDP (watts) 84 W 95 W 69 W 135 W

Operating System Ubuntu 16.04.4 LTS Ubuntu 16.04.4 LTS Ubuntu 16.04.4 LTS Ubuntu 16.04.4 LTS

OS Codename Xenial Xenial Xenial XenialKernel 4.13.0-37-generic 4.4.0-116-generic 4.4.0-116-generic 4.4.0-116-genericicc version 18.0.1 18.0.1 18.0.1 18.0.1Perf version 4.13.13 4.4.98 4.4.98 4.4.98

18

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 19: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Compilers Used

• Intel Parallel Studio XE-18 (IPS)

• Developed by the Intel Corporation to facilitate code development in C, C++, and Fortran for parallel computing

• IPS is a hardware aware compiler and it is optimized for x86 instruction set architecture (ISA)

• –O3 optimization level, IPS enables auto-parallelization and vectorization

• GNU Compiler Collection

• The GNU compiler collection is an open source compiler from the Free Software Foundation Inc. which was originally written to be a compiler for the GNU operating system

• It is widely used across various target architectures and is distributed along with the Linux operating systems

• GNU compiler collection includes front ends for many programming languages and libraries from these languages

19

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 20: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Tools and Applications: runcpu

• SPEC utility that runs all the input sets for all the benchmarks three times and compiles a single SPEC number for analysis

20

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 21: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Tools and Applications: perf

• Simple command line interface built into the OS allowing access to the Performance Monitoring Unit (PMU)

• Provides a list of measurable micro-architectural events

• Supports inheritance by default and has per thread/per process mode as well as system wide event collection

21

Use PMU registers

Use evet names

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 22: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Tools and Applications: likwid

• Has a set of tools with specific purposes to measure performance/energy groups

• Has added functionality over perf such as binding and measuring events on a per core basis

22

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 23: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Tools and Applications: VTune Amplifier

• Performance analysis tool that relies on the underlying hardware counters to get run-time parameters of the application under test

• Advanced Hotspot Analysis: Identify performance-critical code sections in the given application

• HPC Performance Characterization: Identify how effectively a compute-intensive application uses CPU, memory, and floating-point operation hardware resources

• Memory Access Analysis: Identify memory-related issues, like NUMA problems and bandwidth-limited accesses

• General Exploration Analysis: Understand how efficiently the code passes through the core pipeline

23

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 24: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Top-down Microarchitectural Analysis Method

• Top-down Microarchitectural Analysis by Ahmad Yasin from Intel

• Gives a pipeline view of the application flow

• Consider 5-wide pipeline for 10 cycles

• 50% of the slots are eventually retired

• The pipeline efficiency is 50%

• Each stalled pipeline slot can be attributed to one of three causes

• Front-end Bound

• Back-end Bound

• Bad Speculation

• Ideally high retiring is preferred

24

Uop Allocate?

Uop EverRetires?

Back EndStalls?

RetiringBad

SpeculationBack End

BoundFront End

Bound

Yes No

Yes No Yes No

Clockticks: 1 2 3 4 5 6 7 8 9 10

Alloc Slot 0:

Alloc Slot 1:

Alloc Slot 2:

Alloc Slot 3:

Alloc Slot 4:

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 25: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Top-down Microarchitectural Analysis Method

Pipeline Slots

Retiring Bad Speculation Front End Bound Back End Bound

Not Stalled Stalled

BaseMS-ROM

Branch Mispredict

Machine Clears

Fetch LatencyFetch

BandwidthCore Bound Memory Bound

FP-A

rith

Oth

er

Scal

ar

Vec

tor

ITLB

Mis

s

Icac

he

Mis

s

Bra

nch

Re

stee

rs

Fetc

h s

rc 1

Fetc

h s

rc 2

Div

ide

r

Exe

cuti

on

Po

rts

Uti

liza

tio

n3

+ P

ort

s

1 o

r 2

Po

rts

0 P

ort

s

Sto

re B

ou

nd

DR

AM

Bo

un

d

L3 B

ou

nd

L2 B

ou

nd

L1 B

ou

nd

Me

mo

ry L

ate

ncy

Me

mo

ry B

and

wid

th

25

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 26: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Scalability Study Metrics

26

𝑆𝑝𝑒𝑒𝑑𝑢𝑝(𝑆𝐵𝑖, 𝑁𝑇) =𝑇𝑖𝑚𝑒(𝑆𝐵𝑖, 1)

𝑇𝑖𝑚𝑒(𝑆𝐵𝑖, 𝑁𝑇)S

𝑆𝑝𝑒𝑒𝑑𝑢𝑝(𝑅𝐵𝑖, 𝑁𝐶) =𝑁𝐶 ∗ 𝑇𝑖𝑚𝑒(𝑅𝐵𝑖, 1)

𝑇𝑖𝑚𝑒(𝑅𝐵𝑖, 𝑁𝐶)S

𝑃𝑒𝑟𝑓𝑜𝑟𝑚𝑎𝑛𝑐𝑒 ∗ 𝐸𝑛𝑒𝑟𝑔𝑦 𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 𝑆𝐵𝑖, 𝑁𝑇 =1

𝑇𝑖𝑚𝑒 𝑆𝐵𝑖, 𝑁𝑇 × 𝐸𝑛𝑒𝑟𝑔𝑦 𝑆𝐵𝑖, 𝑁𝑇PE

𝑃𝑒𝑟𝑓𝑜𝑟𝑚𝑎𝑛𝑐𝑒 ∗ 𝐸𝑛𝑒𝑟𝑔𝑦 𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 𝑅𝐵𝑖, 𝑁𝐶 =1

𝑇𝑖𝑚𝑒 𝑅𝐵𝑖, 𝑁𝐶 × 𝐸𝑛𝑒𝑟𝑔𝑦 𝑅𝐵𝑖, 𝑁𝐶PE

𝑃𝑒𝑟𝑓𝑜𝑟𝑚𝑎𝑐𝑒 ∗ 𝐸𝑛𝑒𝑟𝑔𝑦. 𝐼𝑚𝑝𝑟𝑜𝑣𝑒𝑚𝑒𝑛𝑡 𝑆𝐵𝑖, 𝑁𝑇 =𝑃𝐸(𝑆𝐵𝑖, 𝑁𝑇)

𝑃𝐸(𝑆𝐵𝑖, 1)PE.I

𝑃𝑒𝑟𝑓𝑜𝑟𝑚𝑎𝑐𝑒 ∗ 𝐸𝑛𝑒𝑟𝑔𝑦. 𝐼𝑚𝑝𝑟𝑜𝑣𝑒𝑚𝑒𝑛𝑡 𝑅𝐵𝑖, 𝑁𝐶 =𝑁𝐶

2 ∗ 𝑃𝐸(𝑅𝐵𝑖, 𝑁𝐶)

𝑃𝐸(𝑅𝐵𝑖, 1)PE.I

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 27: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Compiler Comparison For Speed Benchmarks

27

-

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

60

3.b

wa

ves_

s

60

7.c

act

uB

SSN

_s

61

9.lb

m_

s

62

1.w

rf_

s

62

7.c

am

4_s

62

8.p

op

2_s

63

8.im

ag

ick_

s

64

4.n

ab

_s

64

9.f

oto

nik

3d

_s

65

4.r

om

s_s

SP

ECsp

eed

_fp

60

0.p

erlb

ench

_s

60

2.g

cc_s

60

5.m

cf_

s

62

0.o

mn

etp

p_s

62

3.x

ala

ncb

mk_

s

62

5.x

26

4_s

63

1.d

eep

sjen

g_s

64

1.le

ela

_s

64

8.e

xch

an

ge2

_s

65

7.x

z_s

SP

ECsp

eed

_in

t

fp_speed int_speed

Speedup of IPS Executables over GNU Executables for Speed Benchmarks

1T (ips/gnu) 6T (ips/gnu)1-77%6-33%

28%

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 28: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Compiler Comparison For Rate Benchmarks

28

-

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

50

3.b

wa

ves_

r

50

7.c

act

uB

SSN

_r

50

8.n

am

d_r

51

0.p

are

st_r

51

1.p

ovr

ay_

r

51

9.lb

m_r

52

1.w

rf_r

52

6.b

len

der

_r

52

7.c

am

4_r

53

8.im

ag

ick_

r

54

4.n

ab

_r

54

9.f

oto

nik

3d

_r

55

4.r

om

s_r

SP

ECra

te_f

p

50

0.p

erlb

ench

_r

50

2.g

cc_r

50

5.m

cf_r

52

0.o

mn

etp

p_r

52

3.x

ala

ncb

mk_

r

52

5.x

26

4_r

53

1.d

eep

sjen

g_r

54

1.le

ela

_r

54

8.e

xch

an

ge2

_r

55

7.x

z_r

SP

ECra

te_i

nt

fp_rate int_rate

Speedup of IPS Executables over GNU Executables for Rate Benchmarks

1C (ips/gnu) 6C (ips/gnu)1-27%6-29%

1-62%2-29%

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 29: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Test Setup: Why to turn off Hyperthreading

29

-

0.2

0.4

0.6

0.8

1.0

1.2

fp_speed int_speed fp_rate int_rate

S &

EE.

I

Impact of Hyperthreading on Performace and Energy Efficiency

1 T/C Performace 1 T/C Energy 6 T/C Performance 6 T/C Energy 12 T/C Performace 12 T/C Energy

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 30: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Test Setup: Why to turn on Prefetching

30

-

0.2

0.4

0.6

0.8

1.0

1.2

1.4

fp_speed int_speed fp_rate int_rate

Spee

du

p

Impact of Prefetching on Performace and Energy Efficiency

1 T/C Performace 1 T/C Energy 6 T/C Performance

6 T/C Energy 12 T/C Performace 12 T/C Energy

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 31: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Normalized Performance as a Function of Clock Frequency when {NT | NC}=1

31

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 32: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Normalized Energy Efficiency as a Function of Clock Frequency when {NT | NC}=1

32

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 33: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Normalized PE as a Function of Clock Frequency when {NT | NC}=1

33

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 34: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Optimal Configuration Selection

34

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 35: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Scalability of Speed Benchmarks

35

-

1

2

3

4

5

6

7

86

03

.bw

ave

s_s

60

7.c

act

uB

SSN

_s

61

9.lb

m_s

62

1.w

rf_s

62

7.c

am

4_s

62

8.p

op

2_s

63

8.im

ag

ick_

s

64

4.n

ab

_s

64

9.f

oto

nik

3d

_s

65

4.r

om

s_s

65

7.x

z_s

fp_speed int_speed

Speedup of {fp_speed | int_speed}

1 T 2 T 4 T 6 T 8 T 10 T 12 T

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 36: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Scalability of Floating-Point Rate Benchmarks

36

-

1

2

3

4

5

6

7

85

03

.bw

ave

s_r

50

7.c

act

uB

SSN

_r

50

8.n

am

d_r

51

0.p

are

st_

r

51

1.p

ovr

ay_

r

51

9.lb

m_r

52

1.w

rf_

r

52

6.b

len

der

_r

52

7.c

am

4_

r

53

8.im

ag

ick_

r

54

4.n

ab

_r

54

9.f

oto

nik

3d

_r

55

4.r

om

s_r

Benchmarks

Speedup of fp_rate Benchmarks

1 C 2 C 4 C 6 C 8 C 10 C 12 C

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 37: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Scalability of Integer Rate Benchmarks

37

-

1

2

3

4

5

6

7

8

95

00

.per

lben

ch_r

50

2.g

cc_r

50

5.m

cf_r

52

0.o

mn

etp

p_r

52

3.x

ala

ncb

mk_

r

52

5.x

26

4_r

53

1.d

eep

sjen

g_r

54

1.le

ela

_r

54

8.e

xch

an

ge2

_r

55

7.x

z_r

Benchmarks

Speedup of int_rate Benchmarks

1 C 2 C 4 C 6 C 8 C 10 C 12 C

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 38: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

General Parameters for int_speed Benchmarks

int_speed Time[s]

Cycles [Billion]

Instructions[Billion]

Branches [Billion]

Loads [Billion]

Stores [Billion]

IPC

600.perlbench_s_a 108.1 505.88 1,311.37 258.98 359.00 247.62 2.59

600.perlbench_s_b 66.0 308.21 716.17 153.58 232.07 123.60 2.32

600.perlbench_s_c 68.1 318.67 713.62 142.61 221.23 131.98 2.24

602.gcc_s_a 194.2 907.80 1,468.41 409.75 483.08 71.77 1.62

602.gcc_s_b 80.5 375.51 548.41 127.55 153.01 73.49 1.46

602.gcc_s_c 76.5 357.57 532.24 125.25 149.49 69.65 1.49

605.mcf_s 320.5 1,499.32 1,193.65 288.87 422.47 91.84 0.80

620.omnetpp_s 299.0 1,399.21 1,101.10 242.71 372.28 190.77 0.79

623.xalancbmk_s 211.6 989.48 964.65 230.12 273.35 57.18 0.97

625.x264_s_a 16.7 77.86 181.92 13.31 38.06 16.81 2.34

625.x264_s_b 49.6 231.76 570.47 45.59 113.93 44.20 2.46

625.x264_s_c 53.2 247.95 604.38 48.19 124.94 48.73 2.44

631.deepsjeng_s 218.5 1,022.12 1,777.00 230.38 428.05 186.21 1.74

641.leela_s 332.8 1,557.87 1,927.53 298.07 510.41 181.13 1.24

648.exchange2_s 195.3 913.54 2,062.57 233.34 750.13 462.04 2.26

657.xz_s_a 721.4 3,377.22 4,720.70 732.82 1,147.87 351.72 1.40

657.xz_s_b 953.8 4,464.23 3,002.84 445.58 723.61 260.95 0.6738

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 39: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Intel Top-down Characterization for Single-Threaded Speed Benchmarks

3939

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

60

3.b

wa

ves_

s

60

7.c

act

uB

SSN

_s

61

9.lb

m_s

62

1.w

rf_

s

62

7.c

am

4_

s

62

8.p

op

2_s

63

8.im

ag

ick_

s

64

4.n

ab

_s

64

9.f

oto

nik

3d

_s

65

4.r

om

s_s

60

0.p

erlb

ench

_s

60

2.g

cc_s

60

5.m

cf_s

62

0.o

mn

etp

p_s

62

3.x

ala

ncb

mk_

s

62

5.x

26

4_s

63

1.d

eep

sjen

g_s

64

1.le

ela

_s

64

8.e

xch

an

ge2

_s

65

7.x

z_s

fp_speed int_speed

IPC

Top Level View of Single-Threaded Speed Benchmarks

Retiring Bad Speculation Front-End Bound Memory Bound Core Bound IPC

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 40: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Intel Top-down Characterization for Six-Threaded Speed Benchmarks

4040

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%5

03

.bw

ave

s_r

50

7.c

act

uB

SSN

_r

50

8.n

am

d_r

51

0.p

are

st_

r

51

1.p

ovr

ay_

r

51

9.lb

m_r

52

1.w

rf_

r

52

6.b

len

der

_r

52

7.c

am

4_

r

53

8.im

ag

ick_

r

54

4.n

ab

_r

54

9.f

oto

nik

3d

_r

55

4.r

om

s_r

50

0.p

erlb

ench

_r

50

2.g

cc_r

50

5.m

cf_r

52

0.o

mn

etp

p_

r

52

3.x

ala

ncb

mk_

r

52

5.x

26

4_r

53

1.d

eep

sjen

g_r

54

1.le

ela

_r

54

8.e

xch

an

ge2

_r

55

7.x

z_r

fp_rate int_rate

IPC

Top Level View of Single-Copy Rate Benchmarks

Retiring Bad Speculation Front-End Bound Memory Bound Core Bound IPC

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 41: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

SPEC Numbers Across all Test Systems

-

5

10

15

20

25

30

1 4 6 8 12 16 24

Spee

du

p

Thread Count

SPEC CPU2017 Results for fp_speed

Core i7-4770 Core i7-8700K Xeon E3-1240 V2 Xeon E5-2643 V3

-

1

2

3

4

5

6

7

8

9

10

1 4 6 8 12 16 24

Spee

du

p

Thread Count

SPEC CPU2017 Results for int_speed

Core i7-4770 Core i7-8700K Xeon E3-1240 V2 Xeon E5-2643 V3

-

5

10

15

20

25

30

35

40

45

50

1 4 6 8 12 16 24

Spee

du

p

Thread Count

SPEC CPU2017 Results for fp_rate

Core i7-4770 Core i7-8700K Xeon E3-1240 V2 Xeon E5-2643 V3

-

10

20

30

40

50

60

1 4 6 8 12 16 24

Spee

du

p

Thread Count

SPEC CPU2017 Results for int_rate

Core i7-4770 Core i7-8700K Xeon E3-1240 V2 Xeon E5-2643 V3

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 42: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Conclusions

• The latest incarnation of SPEC benchmarks, SPEC CPU2017 is a diverse, real-life applications based benchmark suite that can qualitatively and quantitively evaluate a systems speed and throughput

• IPS executables run faster than GNU executables

• Hardware-supported prefetching is very effective in the single-threaded benchmarks. Disabling hardware prefetching significantly reduces the overall performance. Its impact on performance decreases as the number of threads/copies increase.

• For a single-threaded/copy runs, the best performance is achieved when the clock frequency is at its maximum with turbo mode enabled. The best energy efficiency is achieved for an intermediate processor clock. The best PE is achieved for the nominal frequency.

• For multithreaded/multicopy runs, the best performance is achieved when the clock frequency is at its maximum with turbo mode enabled. However, the best energy efficiency is achieved when the clock frequency is at an intermediate. Finally, the best PE is also obtained when the clock frequency is set to intermediate values.

42

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 43: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Conclusion

• Benchmark Characterization Findings

• The findings from the Top-down Microarchitectural Analysis Method are as follows. In general, fp_speed benchmarks are mainly bound by stalls in the back-end. int_speed benchmarks are mainly bound by stalls in the front-end and bad speculation.

• A combined metric called PE.I is introduced to evaluate the scalability of benchmarks when both performance and energy efficiency are considered together

• Scalability Findings

• Increasing the number of threads/copies to match the number of cores generally improves performance of SPEC CPU2017 benchmarks

• The fp_speed benchmarks scale well, as long as the number of threads does not exceed the number of physical cores.

• The rate benchmarks scale well as the number of copies increase up to the number of physical cores. The results indicate that the fp_rate benchmarks do not benefit from hyper-threading, whereas int_rate benchmarks see steady performance improvements.

• Analyzing performance across different machines, the following observations can be made. (a) Clock frequency is the biggest driving force in performance improvements. (b) The performance of the rate benchmarks is heavily affected by the size of last level cache.

43

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 44: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

To Learn More

• Ranjan’s thesis: http://www.ece.uah.edu/~milenka/docs/ranjan.hebbar.thesis.pdf

• Ranjan’s ICPE paper: Ranjan Hebbar Seethur Raviraj and Aleksandar Milenkovic, "SPEC CPU2017: Performance, Event, and Energy Characterization on the Core i7-8700K," in the Proceedings of the 10-the ACM/SPEC International Conference on Performance Engineering (ICPE2019), Mumbai, India, April 7-11, 2019, 8 pages. doi: 10.1145/3297663.3310314.

• Ranjan Hebbar Seethur Raviraj and Aleksandar Milenkovic, "Impact of Thread and Frequency Scaling on Performance and Energy Efficiency: An Evaluation of Core i7-8700K Using SPEC CPU2017," in the Proceedings of the IEEE Southeast Con, Huntsville, AL, April 11-14, 2019, 7 pages.

• Ranjan Hebbar Seethur Raviraj, Mounika Ponugoti, and Aleksandar Milenkovic, "Battle of Compilers: An Experimental Evaluation Using SPEC CPU2017," in the Proceedings of the IEEE Southeast Con, Huntsville, AL, April 11-14, 2019, 8 pages.

44

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion

Page 45: PERFORMANCE, ENERGY, AND EVENT CHARACTERIZATION ON …milenka/docs/CPE531_GuestLecture... · 2019-11-21 · Metrics: speed, throughput, performance, ... Tock Tick 2013 2014 Tock -

Thank You!

Questions?

45

Introduction SPEC CPU2017 Machines and Tools Prelims Results Evals Conclusion