Measuring Per-Frame Energy Consumption of Real-Time Graphics Applications Björn Johnsson & Tomas Akenine-Möller � Lund University & Intel Corporation � 1
Why care about energy? � 2
Why care about energy? Computing devices increasingly battery powered Visual & Parallel Computing Group � 3
Why care about energy? Computing devices increasingly battery powered • Mobile phones • Laptops • Tablets • Wearable technology � Visual & Parallel Computing Group � 4
Why care about energy? Computing devices increasingly battery powered • Mobile phones • Laptops • Tablets • Wearable technology Smaller form factors require graphics Visual & Parallel Computing Group � 5
Why care about energy? Computing devices increasingly battery powered • Mobile phones • Laptops • Tablets • Wearable technology Smaller form factors require graphics • Heat dissipation • Battery size and time Visual & Parallel Computing Group � 6
Why measure the energy? � 7
Why measure the energy? Why not simulate? Visual & Parallel Computing Group � 8
Why measure the energy? Why not simulate? • Simulation models need to be trained Visual & Parallel Computing Group � 9
Why measure the energy? Why not simulate? • Simulation models need to be trained • Hardware speci fl c Visual & Parallel Computing Group � 10
Why measure the energy? Why not simulate? • Simulation models need to be trained • Hardware speci fl c • Requires additional data: rendering time, primitive count… Visual & Parallel Computing Group � 11
Why measure the energy? Why not simulate? • Simulation models need to be trained • Hardware speci fl c • Requires additional data: rendering time, primitive count… • Need to validate Visual & Parallel Computing Group � 12
Why measure per-frame energy? � 13
Why measure per-frame energy? Correlation Visual & Parallel Computing Group � 14
Why measure per-frame energy? Correlation • Visually inspect energy-hungry frames Visual & Parallel Computing Group � 15
Why measure per-frame energy? Correlation • Visually inspect energy-hungry frames • Other data collected per frame – Rendering time – Primitive count Visual & Parallel Computing Group � 16
Energy � 17
Energy Voltage U (volt) Voltage Time Visual & Parallel Computing Group � 18
Energy Current I (ampere) Voltage Current Time Visual & Parallel Computing Group � 19
Energy Power P (watt) � P = U*I Power Voltage Current Time Visual & Parallel Computing Group � 20
Energy Energy E (joules) � ∫ E = P(t) dt Power Energy Time Visual & Parallel Computing Group � 21
Our method � 22
Our method Goal: Per-frame energy Visual & Parallel Computing Group � 23
Our method Goal: Per-frame energy Method overview Three main steps Visual & Parallel Computing Group � 24
Our method Goal: Per-frame energy Method overview Three main steps Voltage & current • Record current and voltage Time Visual & Parallel Computing Group � 25
Our method Goal: Per-frame energy Method overview Three main steps P = U*I • Record current and voltage – To get power Time Visual & Parallel Computing Group � 26
Our method Goal: Per-frame energy Method overview Three main steps • Record current and voltage Power – To get power • Acquire timestamps Time Visual & Parallel Computing Group � 27
Our method Goal: Per-frame energy Method overview Three main steps • Record current and voltage Power – To get power • Acquire timestamps • Integrate power to energy Time Visual & Parallel Computing Group � 28
Our method Goal: Per-frame energy Method overview Three main steps • Record current and voltage Power – To get power Frame 1 Frame 2 • Acquire timestamps • Integrate power to energy Time – For each frame Visual & Parallel Computing Group � 29
Our method Step 1: Record current and voltage Recording • High frequency Data Acquisition Device (DAQ) Visual & Parallel Computing Group � 30
Our method iPhone 4S Step 1: Record current and voltage Recording Battery • High frequency DAQ DAQ • Point of connection - + – What is measured? – What is not measured? Visual & Parallel Computing Group � 31
Our method Step 1: Record current and voltage Recording • High frequency DAQ PSU • Point of connection CPU+ – What is measured? GPU – What is not measured? Motherboard DAQ iPhone 4S Battery DAQ - + Visual & Parallel Computing Group � 32
Our method Step 1: Record current and voltage Recording DAQ • High frequency DAQ • Point of connection – What is measured? ATX +12V PSU – What is not measured? CPU+ GPU iPhone 4S PSU Motherboard CPU+ GPU Battery DAQ Motherboard - DAQ + Visual & Parallel Computing Group � 33
Our method Step 1: Record current and voltage Recording • High frequency DAQ • Point of connection – What is measured? – What is not measured? DAQ iPhone 4S PSU CPU+ ATX +12V GPU PSU Battery CPU+ DAQ Motherboard GPU - DAQ + Motherboard Visual & Parallel Computing Group � 34
Our method Step 2: Acquire timestamps � Intel Iris Pro Visual & Parallel Computing Group � 35
Our method Step 2: Acquire timestamps Method 1: Recording • Altering measured workload – Requires source code • Synchronization required Intel Iris Pro Visual & Parallel Computing Group � 36
Our method Step 2: Acquire timestamps Method 1: Recording • Altering measured workload – Requires source code • Synchronization required Method 2: Detect frame starts • Detect in curve – Semi-automatic – Works without source code Intel Iris Pro Visual & Parallel Computing Group � 37
Our method Detecting frame starts � Intel Iris Pro Intel Iris Pro Intel Iris Pro Visual & Parallel Computing Group � 38
Our method Detecting frame starts • Visually detect and mark � Mark Intel Iris Pro Intel Iris Pro Intel Iris Pro Visual & Parallel Computing Group � 39
Our method Detecting frame starts • Visually detect and mark • Record surrounding � Record Intel Iris Pro Intel Iris Pro Intel Iris Pro Visual & Parallel Computing Group � 40
Our method Detecting frame starts • Visually detect and mark • Record surrounding • Search for similar areas using LSE � Found Intel Iris Pro Intel Iris Pro Intel Iris Pro Visual & Parallel Computing Group � 41
Our method Detecting frame starts • Where does the frame start? � � � Intel Iris Pro Intel Iris Pro Intel Iris Pro Visual & Parallel Computing Group � 42
Our method Detecting frame starts • Where does the frame start? � � � Intel Iris Pro Intel Iris Pro Intel Iris Pro Visual & Parallel Computing Group � 43
Our method Step 3: Integrate energy Integrate between timestamps end � ∑ P t t=start E = f Intel Iris Pro Visual & Parallel Computing Group � 44
Our method Step 3: Integrate energy Integrate between timestamps end � ∑ P t ∫ t=start E = ≈ P(t) dt f Intel Iris Pro Visual & Parallel Computing Group � 45
Observations � 46
Observations Application launch • First few seconds of rendering iPhone 4S Visual & Parallel Computing Group � 47
Observations Application launch • First few seconds of rendering • Signi fl cantly higher power iPhone 4S Visual & Parallel Computing Group � 48
Observations Application launch • First few seconds of rendering • Signi fl cantly higher power – 5-10% higher – Both load and idle iPhone 4S Visual & Parallel Computing Group � 49
Observations glFinish() GPU CPU Time Visual & Parallel Computing Group � 50
Observations glFinish() • Blocks the application until commands are fl nished GPU CPU Time glFinish() Visual & Parallel Computing Group � 51
Observations glFinish() • Blocks the application until commands are fl nished • Raises the power iPhone 4S iPhone 4S With glFinish() Without glFinish() Visual & Parallel Computing Group � 52
Observations Disturbance by Operating System iPhone 4S Visual & Parallel Computing Group � 53
Observations Disturbance by Operating System • Few frames with higher power iPhone 4S Visual & Parallel Computing Group � 54
Observations Disturbance by Operating System • Few frames with higher power • 90ms every 5s iPhone 4S Visual & Parallel Computing Group � 55
Observations Disturbance by Operating System • Few frames with higher power • 90ms every 5s – Same pattern without app running iPhone 4S Visual & Parallel Computing Group � 56
Observations Disturbance by Operating System • Few frames with higher power • 90ms every 5s – Same pattern without app running Similar disturbances on most platforms iPhone 4S Visual & Parallel Computing Group � 57
Recommend
More recommend