High Performance Computing Laboratory: Research Roadmap

Post on 04-Dec-2021

2 views 0 download

Transcript of High Performance Computing Laboratory: Research Roadmap

The HotspotThe Hotspot

Peng-Sheng Chen

2

The Hotspot (1)The Hotspot (1)

Define: an area of intense heat or activity

Knowing which portions of an application to

optimize can be the single most important

step in the software optimization process

Hotspots in the Pacific OceanHotspots in the Pacific Ocean

3

4

The Hotspot (2)The Hotspot (2)

What causes hotspots and cold spots? (software

doesn’t execute uniformly)

Infrequent execution

Slow execution

Frequent execution

5

The Hotspot (3)The Hotspot (3)

Infrequent execution

Ex: initialization code, error handling

If these areas tend to take very little time relative

to the rest of the application => cold spots

6

The Hotspot (4)The Hotspot (4)

Slow execution

Ex: simulation

These areas are hotspots only when they

consume a significant portion of time compared

to the rest of the application

7

The Hotspot (5)The Hotspot (5)

Frequent execution

Ex: redrawing the screen in a game, processing

key-strokes

These areas are hotspots only when they

consume a significant portion of time compared

to the rest of the application

8

More Than Just TimeMore Than Just Time

Hotspots are areas of any intense activity

Hotspots can be found from

Time

Cache misses

Page misses

Mispredicted branches

Cache Misses, Mis-predicted Branches, Time-based HotsoptsCache Misses, Mis-predicted Branches, Time-based Hotsopts

9

Uniform Execution (1)Uniform Execution (1)

10

11

Uniform Execution (2)Uniform Execution (2)

Uniform execution does not mean that the

application is completely optimized

Detecting hotspots using time-based sampling

didn’t meet the goal of finding the place to start

optimizing

A program has

A lot of code that is written similarly

A lot of code that uses macros

Compiler optimization can help the most

Finding Hotspots Using Call GraphFinding Hotspots Using Call Graph

Sometimes hotspots only appear at the function or

application level, which could indicate algorithm or

data structure issues are to blame

12

13

Key PointsKey Points

Hotspots are the areas of the application that have

intense activity

Intense activity usually refers to time, but the

definition can include anything, mis-predicted

branches or cache misses, for example

Hotspots indicate the areas to start optimizing

Hotspots can be detected using sampling,

instrumentation, or both