Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
The Energy/Frequency Convexity Ruleof Energy Consumption for Programs:
Modeling, Thermosensitivity, and Applications
Karel De Vogeleer
Ph.D. defense
September 4th, 2015
Special thanks to Fondation TELECOM for funding this research
Introduction Motivation
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 1 / 27
Introduction Motivation
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 2 / 27
Introduction Overview
A Green IT Thinking
Off-line, includingI transistor design,I circuit design,I architecture,I software design,I software coding,I compiler optimization;
on-line, includingI system reconfiguration,I compiler optimization,I context placement.
Image source jiji.ng and wisegeek.com
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 3 / 27
Introduction Thesis’ Contributions
Contributions
Energy consumption analysis for computer systems:I analytical model,I Energy/Frequency Convexity Rule,I supportive measurement data;
temperature/power relationship demystified:I supportive measurement data,I guidelines for power measurement;
transient thermal model for microprocessors:I analytical model including radiation,I approximations,I applicability analysis.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 4 / 27
Introduction Thesis’ Contributions
Contributions
Energy consumption analysis for computer systems:I analytical model,I Energy/Frequency Convexity Rule,I supportive measurement data;
temperature/power relationship demystified:I supportive measurement data,I guidelines for power measurement;
transient thermal model for microprocessors:I analytical model including radiation,I approximations,I applicability analysis.
dat
a.2[
ind
ex,
”PA
15”]
time (s)2075 2175 2275 2375 2475 2575 2675
pow
er(W
)1.
252
1.25
61.
261.
264
1.26
81.
272
1.27
6
datalinear transformquadratic transform
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 4 / 27
Introduction Thesis’ Contributions
Contributions
Energy consumption analysis for computer systems:I analytical model,I Energy/Frequency Convexity Rule,I supportive measurement data;
temperature/power relationship demystified:I supportive measurement data,I guidelines for power measurement;
transient thermal model for microprocessors:I analytical model including radiation,I approximations,I applicability analysis.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 4 / 27
Introduction Thesis’ Contributions
Contributions
Energy consumption analysis for computer systems:I analytical model,I Energy/Frequency Convexity Rule,I supportive measurement data;
temperature/power relationship demystified:I supportive measurement data,I guidelines for power measurement;
transient thermal model for microprocessors:I analytical model including radiation,I approximations,I applicability analysis.
0
222630
36
45
60
83
surface (m2)0 0.01 0.02 0.03 0.04 0.05
r cr
-0.4
-0.2
00.
20.
40.
60.
81
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 4 / 27
Introduction Thesis’ Contributions
Contributions
energy consumption analysis for computer systems:I analytical model,I Energy/Frequency Convexity Rule,I supportive measurement data;
temperature/power relationship demystified:I supportive measurement data,I guidelines for power measurement;
transient thermal model for microprocessors:I analytical model,I approximations,I applicability analysis.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 4 / 27
Introduction Outline
Presentation’s Outline
1 Introduction
2 Energy Model
3 Practical Example
4 Parameter Sensitivity
5 Case Studies
6 Conclusion
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 5 / 27
Energy Model
1 Introduction
2 Energy Model
3 Practical Example
4 Parameter Sensitivity
5 Case Studies
6 Conclusion
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 5 / 27
Energy Model
Preliminary Evidence of Energy/Frequency Curves
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
0 200 400 600 800 1000
Nor
mal
ized
Tot
al E
nerg
y
CPU Frequency (MHz)
2% Miss Ratio9% Miss Ratio
16% Miss Ratio
(a) Fan et al. [1] (b) Le Sueur and Heiser [3]
1.5 2 2.5Frequency [GHz]
0
400
800
1200
1600
2000
2400
Ener
gy to
solu
tion
[J]
DGEMM 8CDGEMM 4CRAY 8CRAY SMT 8C
(a)
(c) Hager et al. [2]
0.8
0.9
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
50 100 150 200 250 300 350 400 450
CPU Energy
CPU Frequency (MHz)
Model predicted energybasicmath
bitcntscelpgzipmpg
qsortsusan.corners
susan.edgessusan.smoothing
visionworstfft
inv_fftpatriciatypeset
(d) Snowdon et al. [4]
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 6 / 27
Energy Model General Framework
System Energy Consumption Model (Esys)
System’s energy consumption Esys definition
Esys =
∫ ∆t
0Psys dt
=
∫ ∆t
0( Pcpu + Pback ) dt;
Examples of Pback include:I LCD screen,I radio interface,I sensors (e.g. GPS);
If Pcpu and Pback are constant over ∆t:
Esys = (Pcpu + Pback) ·∆t.
everythingelse
CPU
syst
emKarel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 7 / 27
Energy Model Power and Time Model
Microprocessor Power Model Execution Time Model
CPU power Pcpu consists of:
dynamic power Pdyn,
leakage current Pleak,
short-circuit current Psc,
Pcpu = Pdyn + Pleak + Psc
= ( 1 + γV ) · η αCV 2f
= (1 + γV ) · ξV 2f .
Execution time ∆t depends on:
ccb code size in clock cycles,
f CPU clock frequency,
fk frequency thieves,
β slack time per clock cycle,
∆t = ccb
(1
f − fk+ β
).
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 8 / 27
Energy Model Optimal Clock Frequency
Optimal Clock Frequency (fopt)
System’s energy consumption model
Esys(f ) = (Pcpu + Pback) ·∆t
= ([1 + γV ]ξV 2f + Pback) · ccb
(1
f − fk+ β
),
where {γ, ξ,Pback, ccb, fk, β} ∈ R+;
a single minimum for Esys(f ) exists at fopt when(∂Esys
∂f
)f =fopt
= 0, and∂2Esys
∂f 2> 0 holds;
V is approximately an affine map of f : V → m2f + m1.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 9 / 27
Energy Model Optimal Clock Frequency
Supply Voltage/Frequency Relationship
A linear trend between V and f is observed: V = m2f + m1.
0
Exynos 4210Exynos 4x12Exynos 5250Intel MS3C6410PXA320
linear approximations
m1 = 13 , m2 = 4
5m1 = 1
3 , m2 = 45
frequency (GHz)0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7
sup
ply
volt
age
(V)
0.85
0.95
11.
051.
151.
251.
351.
45
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 10 / 27
Practical Example
1 Introduction
2 Energy Model
3 Practical Example
4 Parameter Sensitivity
5 Case Studies
6 Conclusion
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 10 / 27
Practical Example Energy Measurement
Benchmark and Testbed
Benchmark: bit-reverse algorithm,part of the DFT algorithm:
void bitreverse_gold_rader
(int N, complex *data) {
int n = N, nm1 = n-1;
int i = 0, j = 0;
for (; i < nm1; i++) {
int k = n >> 1;
if (i < j) {
complex temp = data[i];
data[i] = data[j];
data[j] = temp;}
while (k <= j) {
j -= k; k >>= 1;}
j += k ;
}
}
testbed: Samsung Galaxy SII;
power Measurement: Monsoon.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 11 / 27
Practical Example Energy Measurement
Benchmark and Testbed
Benchmark: bit-reverse algorithm,part of the DFT algorithm:
void bitreverse_gold_rader
(int N, complex *data) {
int n = N, nm1 = n-1;
int i = 0, j = 0;
for (; i < nm1; i++) {
int k = n >> 1;
if (i < j) {
complex temp = data[i];
data[i] = data[j];
data[j] = temp;}
while (k <= j) {
j -= k; k >>= 1;}
j += k ;
}
}
testbed: Samsung Galaxy SII;
power Measurement: Monsoon.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 11 / 27
Practical Example Energy Measurement
Benchmark and Testbed
Benchmark: bit-reverse algorithm,part of the DFT algorithm:
void bitreverse_gold_rader
(int N, complex *data) {
int n = N, nm1 = n-1;
int i = 0, j = 0;
for (; i < nm1; i++) {
int k = n >> 1;
if (i < j) {
complex temp = data[i];
data[i] = data[j];
data[j] = temp;}
while (k <= j) {
j -= k; k >>= 1;}
j += k ;
}
}
testbed: Samsung Galaxy SII;
power Measurement: Monsoon.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 11 / 27
Practical Example Energy Measurement
The Energy/Frequency Convexity Rule
Energy consumption versus CPU clock frequency shows convex properties.
1
frequency (GHz)
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6
ener
gyp
erar
ray
elem
ent
(nJ)
3040
5060
70
Input size (2N)
N= 6N= 8N= 10
N= 12N= 14N= 16
measuredmodel
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 12 / 27
Parameter Sensitivity
1 Introduction
2 Energy Model
3 Practical Example
4 Parameter Sensitivity
5 Case Studies
6 Conclusion
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 12 / 27
Parameter Sensitivity
Energy Model’s Parameter Sensitivity Analysis
Energy consumption model under analysis:
Esys = ([1 + γV ] · ξV 2f + Pback) · ccb
(1
f − fk+ β
),
(∂Esys
∂f
)f =fopt
= 0;
The aim is to find the conditions under which fopt is exploitable;
The following parameters will be looked at in more detail:I frequency thieves (overhead) fk,I background power Pback,I power gain ξ,I temperature γ(T );
Analysis based on energy profile of the Exynos 4210.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 13 / 27
Parameter Sensitivity Frequency Thieves
Influence of frequency thieves fk on fopt
Esys = ([1 + γV ] · ξV 2f + Pback) · ccb
(1
f−fk+ β
)1
ξ (V−1)
0.1550.1620.1680.1740.181
Pback=0.5 (W)
fk (GHz)0 0.2 0.5 0.8 1 1.2 1.5 1.8 2
f opt
(GH
z)0.
20.
61
1.4
1.8
2.2
2.6
33.
4
≈ 30 MHz
≈ 50 MHz
(e) fopt(fk,ξ)
1Pback (W)
00.511.52
2.533.544.5
ξ=0.168 (V−1)
fk (GHz)0 0.2 0.5 0.8 1 1.2 1.5 1.8 2
f opt
(GH
z)0.
20.
61
1.4
1.8
2.2
2.6
33.
4
(f) fopt(fk,Pback)
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 14 / 27
Parameter Sensitivity Background Power Demands
Influence of Background Power Pback on fopt
Esys = ([1 + γV ] · ξV 2f + Pback) · ccb
(1
f−fk+ β
)1
ξ (V−1)
0.1550.1620.1680.1740.181
Pback (W)0 1 2 3 4 5 6
f opt
(GH
z)0
0.2
0.5
0.8
11.
21.
51.
82
2.2
≈ 100 MHz
≈ 0.5 W
(g) fopt(Pback, ξ)
1ξ (V−1)
0.1550.1620.1680.1740.181
Pback (W)0 1 2 3 4 5 6
Pback/P
cpu
00.
20.
40.
60.
81
1.2
1.4
≈ 0.05
(h) Pback/Pcpu ratio at fopt
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 15 / 27
Parameter Sensitivity Power Gain
Influence of Power Gain ξ(s) on fopt
Esys = ([1 + γV ] · ξV 2f + Pback) · ccb
(1
f−fk+ β
)
Cooperative microprocessorson the same die:
1 power-efficient: Cortex A7,2 high-performance: Cortex A15;
ξ is scaled by s between its lowerand upper bound: s ∈ {1, 2};Exynos 5410 power model.
1
0
0.25
0.5
0.75
1
1.5
2
2.5
0
0.0750.15
0.3
A15A7
power scaling (s)1 1.2 1.4 1.6 1.8 2
f opt
(GH
z)0.
20.
40.
60.
81
1.2
1.4
1.6
Numbers on the lines represent the background power for that line.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 16 / 27
Parameter Sensitivity Temperature
Influence of Temperature γ(T ) on fopt
Esys = ([1 + γV ] · ξV 2f + Pback) · ccb
(1
f−fk+ β
)
γ is a function of temperature;
temperature/power model ofExynos 5410 is used;
temperature/power showsexponential behavior;
0
temperature (◦C)30 40 50 60 70 80
pow
er(W
)2.
42.
52.
62.
72.
8
dataexponential fitquadratic fitlinear fit
∆fopt ≈ 200 MHz when 25◦C < T < 85◦C.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 17 / 27
Case Studies
1 Introduction
2 Energy Model
3 Practical Example
4 Parameter Sensitivity
5 Case Studies
6 Conclusion
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 17 / 27
Case Studies Optimization Techniques Classification
Case Study 1: fopt Classification
fopt•
max(fmin, fk)•
frequency
ener
gy
fopt•
max(fmin, fk)•
fmax•
frequency
ener
gy
fopt•
fmax•
frequency
ener
gy
1 fopt < max(fmin, fk) the slower, the better2 max(fmin, fk) ≤ fopt ≤ fmax chase fopt3 fmax < fopt race-to-halt
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 18 / 27
Case Studies Multi-core Code Execution
Case Study 2: fopt and Multi-core Code Execution
Clock frequency scheduling schemes:
1 on-demand: binary (high/low) as work arrives;
2 selfish: each core is individually energy optimized;
3 thread-cooperation: all cores are collectively energy optimized.
t
thread
0 ta tb tc
A
B
C
(a) default clock scaling
t
thread
0 tatbtc
A
B
C
(b) cooperative clock scaling
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 19 / 27
Case Studies Multi-core Code Execution
Case Study 2: fopt and Multi-core Code Execution contd.
Problem statement:
n threads executed in parallel with common deadline tmax;
threads individually clock frequency fi scalable;
Etot(fi ) : Rm → R to be minimized over fi :
Etot(fi ) = Pbacktmax +n∑
i=0
[ccb,i
fiP+ +
(tmax −
ccb,ifi
)P◦],
subject to ∀i ,ccb,i
fi≤ tmax and fmin ≤ fi ≤ fmax;
{ccb, fi , tmax,Pback,P◦,P+} ∈ R+;
active power (P+) and idle power (P◦) are generated by the Exynos5410 power model.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 20 / 27
Case Studies Performance Evaluations
Case Study 2: fopt and Multi-core Code Execution contd.
Performance evaluation of 4 clock frequency scalable parallel threads.
1
thread cooperationselfishon-demand
background power (W)0 1 2 3 4 5 6 7 8 9 10
ener
gyra
tio
(%)
0.6
0.65
0.7
0.75
0.8
0.85
0.9
0.95
1
(a) energy
1
thread cooperationselfishon-demand
background power (W)0 1 2 3
tim
era
tio
(%)
11.
11.
31.
51.
71.
92
(b) time
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 21 / 27
Case Studies Performance Evaluations
Case Study 3: big-LITTLE Heterogeneous Computing
Optimal clock frequency forcooperative microprocessors:
1 power-efficient: Cortex A7,2 high-performance: Cortex A15;
fopt is chosen on the core yieldingbest efficiency;
Exynos 5410 power model used.
1
0.5
0.75
1
1.5
2
2.5
0
0.0750.15
0.30
0.25
power scaling (s)1 1.2 1.4 1.6 1.8 2
f opt
(GH
z)0.
20.
40.
60.
81
1.2
1.4
1.6
Numbers on the lines represent the
background power for that line.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 22 / 27
Conclusion Summary
1 Introduction
2 Energy Model
3 Practical Example
4 Parameter Sensitivity
5 Case Studies
6 Conclusion
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 22 / 27
Conclusion Summary
Conclusion
System’s energy consumption shows convex properties over f ;
rules of thumb for an exploitable fopt:I Pback should be smaller than Pcpu,I overhead (fk) should be limited,I slack time β should be limited,I power profile (ξ) has minimal effect,I code size (ccb) has no effect;
energy gains could be from 10% up to 50% at fixed temperature;
temperature/Power relationship shows exponential behavior;
radiation can be omitted for small devices.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 23 / 27
Conclusion What’s Next
Future Work
Including:
apply results to other domains:I multi-core,I HPC,I clock modulation,I interactive/performance;
exploit the thermal behavior;
better understanding of how muchenergy can practically be gained.
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 24 / 27
The Energy/Frequency Convexity Ruleof Energy Consumption for Programs:
Modeling, Thermosensitivity, and Applications
Karel De Vogeleer
Ph.D. defense
September 4th, 2015
Conclusion What’s Next
Publications
K. DeVogeleer, G. Memmi, P. Jouvelot, and F. Coelho, “The Energy/FrequencyConvexity Rule: modeling and experimental validation on mobile devices,” inProceedings of the 10th Conference on Parallel Processing and AppliedMathematics. Springer Verlag, Sep. 2013.
K. DeVogeleer, G. Memmi, P. Jouvelot, and F. Coelho, “Modeling thetemperature bias of power consumption for nanometer-scale cpus in applicationprocessors,” in 14th International Conference on Embedded Computer Systems:Architectures, Modeling, and Simulation, Jul. 2014, pp. 172-180.
K. DeVogeleer, P. Jouvelot, and G. Memmi, “The impact of surface size on theradiative thermal behavior of embedded systems,” CoRR, vol. abs/1410.0628,2014, (submitted to IEEE TMC in 2014).
K. DeVogeleer, G. Memmi, and P. Jouvelot, “Parameter Sensitivity Analysis of theEnergy/Frequency Convexity Rule for Nanometer-scale Application Processors,”CoRR, vol. abs/1508.07740, 2015, (in submission to The Elsevier Journal ofParallel and Distributed Computing, 2015).
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 26 / 27
Conclusion What’s Next
References I
Fan, X., Ellis, C. S., and Lebeck, A. R. The synergy between power-aware memory systems and processor voltage
scaling. In Proceedings of the Third international conference on Power - Aware Computer Systems (Berlin, Heidelberg,2004), Springer-Verlag, pp. 164–179.
Hager, G., Treibig, J., Habich, J., and Wellein, G. Exploring performance and power properties of modern
multi-core chips via simple machine models. Concurrency and Computation: Practice and Experience (2013), n/a–n/a.
Le Sueur, E., and Heiser, G. Dynamic voltage and frequency scaling: the laws of diminishing returns. In Proceedings
of the 2010 international conference on Power aware computing and systems (Berkeley, CA, USA, 2010), HotPower’10,pp. 1–8.
Snowdon, D. C., Ruocco, S., and Heiser, G. Power management and dynamic voltage scaling: Myths and facts. In
2005 WS Power Aware Real-time Comput. (New Jersey, USA, Sept. 2005).
Karel De Vogeleer (ParisTech) The Energy/Frequency Convexity Rule September 4th, 2015 27 / 27