Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Understanding Energy Behaviors of Thread Manage...
Search
Gustavo Pinto
January 14, 2018
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Understanding Energy Behaviors of Thread Management Constructs
Gustavo Pinto
January 14, 2018
More Decks by Gustavo Pinto
See All by Gustavo Pinto
Developer Experiences with a Contextualized AI Coding Assistant: Usability Expectations, and Outcomes
gustavopinto
0
63
Apoiando pessoas programadoras com deficiência: Lições aprendidas na Zup Innovation
gustavopinto
0
110
5 coisas que todo dev deveria saber Para criar aplicações com GenAI
gustavopinto
0
140
Large Language Models for Education: Grading Open-Ended Questions Using ChatGPT
gustavopinto
0
150
Cognitive Driven Development: A Research Agenda
gustavopinto
0
170
The Infinite Academic Game
gustavopinto
0
94
[ESEM 2022] To What Extent Cognitive Driven Development Improves Code Readability
gustavopinto
0
130
Caminhos e desafios para a pesquisa em Computação (ou como se manter produtivo) na Região Norte
gustavopinto
2
360
How Open is the SBES PC Community
gustavopinto
0
160
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
My Coaching Mixtape
mlcsv
0
180
Music & Morning Musume
bryan
47
7.3k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
380
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
230
Into the Great Unknown - MozCon
thekraken
41
2.6k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
340
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
220
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
Transcript
Understanding Energy Behaviors of Thread Management Constructs Gustavo Pinto1 Fernando
Castor1 David Liu2 {ghlp, castor}@cin.ufpe.br1
[email protected]
2 • First, the proliferation of multicore CPUs • Second,
the prevalence of multi-threaded programs Motivation
3 • First, more cores more power consumed • Second,
little is known about energy behaviors of multi-threaded program on the application and programming language level The Problem
4 1. programming abstractions of thread management on energy efficiency
2. programmer choices of thread management on energy efficiency This Talk for Java multi-threaded programs
5 • Explicit threading (the Thread-style): Using the java.lang.Thread class
• Thread pooling (the Executor-style): Using the java.util.concurrent.Executor framework • Working Stealing (the ForkJoin-style): Using the java.util.concurrent.ForkJoin framework Thread management constructs
6 • Embarrassingly parallel: spectralnorm, sunflow, n-queens • Leaning parallel:
xalan, knucleotide, tomcat • Leaning serial: mandelbrot, largestImage • Embarrassingly serial: h2 Benchmarks
7 • Embarrassingly parallel: spectralnorm, sunflow, n-queens • Leaning parallel:
xalan, knucleotide, tomcat • Leaning serial: mandelbrot, largestImage • Embarrassingly serial: h2 Benchmarks Micro-benchmarks DaCapo benchmarks
8 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,
64GB of memory, JDK version 1.7.0 11, build 21, “ondemand” governor
9 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,
64GB of memory, JDK version 1.7.0 11, build 21, “ondemand” governor
10 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,
64GB of memory, JDK version 1.7.0 11, build 21.
11 Experimental Environment A 2×16-core AMD CPUs, running Debian Linux,
64GB of DDR3 1600 memory, and JDK version 1.7.0 11, build 21.
Energy Consumption When Varying the Number of Threads 12
13 The Λ Curve
14 The Λ Curve
15 The Λ Curve
16 More cores idle CPU frequency at a lower level
The Λ Curve
17 More cores idle CPU frequency at a lower level
More threads used, program completes sooner The greater the ratio between speedup and power, the steeper the \ The Λ Curve
Which programming style should I use? 18 ? ?
Overpopulating Cores with Threads 19
Overpopulating Cores with Threads 20
Faster ≠ Greener 21
Copying vs Sharing 22
Copying vs Sharing 23 Copying
Copying vs Sharing 24 Copying Sharing
Copying vs Sharing 25 Copying Sharing ±15% of energy savings!
26 Copy-Fork
27 After Before Copy-Fork
28 After Before Copy-Fork Copy/Fork/Copy/Fork/…
29 After Before Copy-Fork Copy/Fork/Copy/Fork/…
30 After Before Copy-Fork Copy/Fork/Copy/Fork/… Copy/../Copy/Fork/…/Fork
31 After Before Copy-Fork ±10% of energy savings! Copy/Fork/Copy/Fork/… Copy/../Copy/Fork/…/Fork
Data Size 32
Data Size 33 For most of the cases, energy consumption
is linear to data size!
34
35
36
37
Understanding Energy Behaviors of Thread Management Constructs Gustavo Pinto1 Fernando
Castor1 David Liu2 {ghlp, castor}@cin.ufpe.br1
[email protected]