1 \documentclass[12pt]{article}
2 %\documentclass[12pt,twocolumn]{article}
4 \usepackage[T1]{fontenc}
5 \usepackage[utf8]{inputenc}
6 \usepackage[english]{babel}
7 \usepackage{algorithm,algorithmicx,algpseudocode}
8 \usepackage{graphicx,graphics}
12 % \usepackage{sectsty}
13 % \usepackage{titlesec}
15 %\usepackage[font={footnotesize,bt}]{caption}
16 %\usepackage[font=scriptsize,labelfont=bf]{caption}
21 \title{Optimal Dynamic Frequency Scaling for Energy-Performance of Parallel MPI Programs}
22 \author{A. Badri \and J.-C. Charr \and R. Couturier \and A. Giersch}
25 \section{Introduction}
27 The need for computing power is still increasing and it is not expected to slow
28 down in the coming years. To satisfy this demand, researchers and supercomputers
29 constructors have been regularly increasing the number of computing cores in
30 supercomputers (for example in November 2013, according to the top 500
31 list~\cite{43}, the Tianhe-2 was the fastest supercomputer. It has more than 3
32 millions of cores and delivers more than 33 Tflop/s while consuming 17808
33 kW). This large increase in number of computing cores has led to large energy
34 consumption by these architectures. Moreover, the price of energy is expected to
35 continue its ascent according to the demand. For all these reasons energy
36 reduction became an important topic in the high performance computing field. To
37 tackle this problem, many researchers used DVFS (Dynamic Voltage Frequency
38 Scaling) operations which reduce dynamically the frequency and voltage of cores
39 and thus their energy consumption. However, this operation also degrades the
40 performance of computation. Therefore researchers try to reduce the frequency to
41 minimum when processors are idle (waiting for data from other processors or
42 communicating with other processors). Moreover, depending on their objectives
43 they use heuristics to find the best scaling factor during the computation. If
44 they aim for performance they choose the best scaling factor that reduces the
45 consumed energy while affecting as little as possible the performance. On the
46 other hand, if they aim for energy reduction, the chosen scaling factor must
47 produce the most energy efficient execution without considering the degradation
48 of the performance. It is important to notice that lowering the frequency to
49 minimum value does not always give the most efficient execution due to energy
50 leakage. The best scaling factor might be chosen during execution (online) or
51 during a pre-execution phase. In this paper we emphasize to develop an
52 algorithm that selects the optimal frequency scaling factor that takes into
53 consideration simultaneously the energy consumption and the performance. The
54 main objective of HPC systems is to run the application with less execution
55 time. Therefore, our algorithm selects the optimal scaling factor online with
56 very small footprint. The proposed algorithm takes into account the
57 communication times of the MPI programs to choose the scaling factor. This
58 algorithm has ability to predict both energy consumption and execution time over
59 all available scaling factors. The prediction achieved depends on some
60 computing time information, gathered at the beginning of the runtime. We apply
61 this algorithm to seven MPI benchmarks. These MPI programs are the NAS parallel
62 penchmarks (NPB v3.3) developed by NASA~\cite{44}. Our experiments are executed
63 using the simulator Simgrid/SMPI v3.10~\cite{45} over an homogeneous distributed
64 memory architecture. Furthermore, we compare the proposed algorithm with
65 Rauber's methods. The comparison's results show that our algorithm gives better
66 energy-time trade off.
68 \section{Related Works}
70 In the this section some heuristics, to compute the scaling factor, are
71 presented and classified in two parts : offline and online methods.
73 \subsection{The offline DVFS orientations}
75 The DVFS offline methods are static and are not executed during the runtime of
76 the program. Some approaches used heuristics to select the best DVFS state
77 during the compilation phases as an example in Azevedo et al.~\cite{40}. He used
78 intra-task algorithm to choose the DVFS setting when there are dependency points
79 between tasks. While in~\cite{29}, Xie et al. used breadth-first search
80 algorithm to do that. Their goal is saving energy with time limits. Another
81 approaches gathers and stores the runtime information for each DVFS state , then
82 used their methods offline to select the suitable DVFS that optimize energy-time
83 trade offs. As an example~\cite{8}, Rountree et al. used liner programming
84 algorithm, while in~\cite{38,34}, Cochran et al. used multi logistic regression
85 algorithm for the same goal. The offline study that shown the DVFS impact on the
86 communication time of the MPI program is~\cite{17}, Freeh et al. show that these
87 times not changed when the frequency is scaled down.
89 \subsection{The online DVFS orientations}
91 The objective of these works is to dynamically compute and set the frequency of
92 the CPU during the runtime of the program for saving energy. Estimating and
93 predicting approaches for the energy-time trade offs developed by
94 ~\cite{11,2,31}. These works select the best DVFS setting depending on the slack
95 times. These times happen when the processors have to wait for data from other
96 processors to compute their task. For example, during the synchronous
97 communication time that take place in the MPI programs, the processors are
98 idle. The optimal DVFS can be selected using the learning methods. Therefore, in
99 ~\cite{39,19} used machine learning to converge to the suitable DVFS
100 configuration. Their learning algorithms have big time to converge when the
101 number of available frequencies is high. Also, the communication time of the MPI
102 program used online for saving energy as in~\cite{1}, Lim et al. developed an
103 algorithm that detects the communication sections and changes the frequency
104 during these sections only. This approach changes the frequency many times
105 because an iteration may contain more than one communication section. The domain
106 of analytical modeling used for choosing the optimal frequency as in ~\cite{3},
107 Rauber et al. developed an analytical mathematical model for determining the
108 optimal frequency scaling factor for any number of concurrent tasks, without
109 considering communication times. They set the slowest task to maximum frequency
110 for maintaining performance. In this paper we compare our algorithm with
111 Rauber's model~\cite{3}, because his model can be used for any number of
112 concurrent tasks for homogeneous platform and this is the same direction of this
113 paper. However, the primary contributions of this paper are:
115 \item Selecting the optimal frequency scaling factor for energy and performance
116 simultaneously. While taking into account the communication time.
117 \item Adapting our scale factor to taking into account the imbalanced tasks.
118 \item The execution time of our algorithm is very small when compared to other
119 methods (e.g.,~\cite{19}).
120 \item The proposed algorithm works online without profiling or training as
124 \section{Parallel Tasks Execution on Homogeneous Platform}
126 A homogeneous cluster consists of identical nodes in terms of the hardware and
127 the software. Each node has its own memory and at least one processor which can
128 be a multi-core. The nodes are connected via a high bandwidth network. Tasks
129 executed on this model can be either synchronous or asynchronous. In this paper
130 we consider execution of the synchronous tasks on distributed homogeneous
131 platform. These tasks can exchange the data via synchronous memory passing.
134 \subfloat[Synch. Imbalanced Communications]{\includegraphics[scale=0.67]{synch_tasks}\label{fig:h1}}
135 \subfloat[Synch. Imbalanced Computations]{\includegraphics[scale=0.67]{compt}\label{fig:h2}}
136 \caption{Parallel Tasks on Homogeneous Platform}
139 Therefore, the execution time of a task consists of the computation time and the
140 communication time. Moreover, the synchronous communications between tasks can
141 lead to idle time while tasks wait at the synchronous point for others tasks to
142 finish their communications see figure~(\ref{fig:h1}). Another source for idle
143 times is the imbalanced computations. This happen when processing different
144 amounts of data on each processor as an example see figure~(\ref{fig:h2}). In
145 this case the fastest tasks have to wait at the synchronous barrier for the
146 slowest tasks to finish their job. In both two cases the overall execution time
147 of the program is the execution time of the slowest task as :
148 \begin{equation} \label{eq:T1}
149 Program Time=MAX_{i=1,2,..,N} (T_i) \hfill
151 where $T_i$ is the execution time of process $i$.
153 \section{Energy Model for Homogeneous Platform}
155 The energy consumption by the processor consists of two powers metric: the
156 dynamic and the static power. This general power formulation is used by many
157 researchers see ~\cite{9,3,15,26}. The dynamic power of the CMOS processors
158 $P_{dyn}$ is related to the switching activity $\alpha$, load capacitance $C_L$,
159 the supply voltage $V$ and operational frequency $f$ respectively as follow :
160 \begin{equation} \label{eq:pd}
161 \displaystyle P_{dyn} = \alpha . C_L . V^2 . f
163 The static power $P_{static}$ captures the leakage power consumption as well as
164 the power consumption of peripheral devices like the I/O subsystem.
165 \begin{equation} \label{eq:ps}
166 \displaystyle P_{static} = V . N . K_{design} . I_{leak}
168 where V is the supply voltage, N is the number of transistors, $K_{design}$ is a
169 design dependent parameter and $I_{leak}$ is a technology-dependent
170 parameter. Energy consumed by an individual processor $E_{ind}$ is the summation
171 of the dynamic and the static power multiply by the execution time for example
173 \begin{equation} \label{eq:eind}
174 \displaystyle E_{ind} = (P_{dyn} + P_{static} ) . T
176 The dynamic voltage and frequency scaling (DVFS) is a process that allowed in
177 modern processors to reduce the dynamic power by scaling down the voltage and
178 frequency. Its main objective is to reduce the overall energy
179 consumption~\cite{37}. The operational frequency \emph f depends linearly on the
180 supply voltage $V$, i.e., $V = \beta . f$ with some constant $\beta$. This
181 equation is used to study the change of the dynamic voltage with respect to
182 various frequency values in~\cite{3}. The reduction process of the frequency are
183 expressed by scaling factor \emph S. The scale \emph S is the ratio between the
184 maximum and the new frequency as in EQ~(\ref{eq:s}).
185 \begin{equation} \label{eq:s}
186 S=\:\frac{F_{max}}{F_{new}} \hfill \newline
188 The value of the scale \emph S is grater than 1 when changing the frequency to
189 any new frequency value(\emph {P-state}) in governor. It is equal to 1 when the
190 frequency are set to the maximum frequency. The energy consumption model for
191 parallel homogeneous platform is depending on the scaling factor \emph S. This
192 factor reduces quadratically the dynamic power. Also, this factor increases the
193 static energy linearly because the execution time is increased~\cite{36}. The
194 energy model, depending on the frequency scaling factor, of homogeneous platform
195 for any number of concurrent tasks develops by Rauber~\cite{3}. This model
196 consider the two powers metric for measuring the energy of the parallel tasks as
197 in EQ~(\ref{eq:energy}).
199 \begin{equation} \label{eq:energy}
200 E= \displaystyle \;P_{dyn}\,.\,S_1^{-2}\;.\,(T_1+\sum\limits_{i=2}^{N}\frac{T_i^3}{T_1^2})+\;P_{static}\,.\,T_1\,.\,S_1\;\,.\,N
203 Where \emph N is the number of parallel nodes, $T_1 $ is the time of the slower
204 task, $T_i$ is the time of the task $i$ and $S_1$ is the maximum scaling factor
205 for the slower task. The scaling factor $S_1$, as in EQ~(\ref{eq:s1}), selects
206 from the set of scales values $S_i$. Each of these scales are proportional to
207 the time value $T_i$ depends on the new frequency value as in EQ~(\ref{eq:si}).
208 \begin{equation} \label{eq:s1}
209 S_1=MAX_{i=1,2,..,F} (S_i) \hfill
211 \begin{equation} \label{eq:si}
212 S_i=\:S\: .\:(\frac{T_1}{T_i})=\: (\frac{F_{max}}{F_{new}}).(\frac{T_1}{T_i}) \hfill
214 Where $F$ is the number of available frequencies. In this paper we depend on
215 Rauber's energy model EQ~(\ref{eq:energy}) for two reasons : 1-this model used
216 for homogeneous platform that we work on in this paper. 2-we are compare our
217 algorithm with Rauber's scaling model. Rauber's optimal scaling factor for
218 optimal energy reduction derived from the EQ~(\ref{eq:energy}). He takes the
219 derivation for this equation (to be minimized) and set it to zero to produce the
220 scaling factor as in EQ~(\ref{eq:sopt}).
221 \begin{equation} \label{eq:sopt}
222 S_{opt}= {\sqrt [3~]{\frac{2}{n} \frac{P_{dyn}}{P_{static}} \Big(1+\sum\limits_{i=2}^{N}\frac{T_i^3}{T_1^3}\Big) }} \hfill
226 \section{Performance Evaluation of MPI Programs}
228 The performance (execution time) of the parallel MPI applications are depends on
229 the time of the slowest task as in figure~(\ref{fig:homo}). Normally the
230 execution time of the parallel programs are proportional to the operational
231 frequency. Therefore, any DVFS operation for the energy reduction increase the
232 execution time of the parallel program. As shown in EQ~(\ref{eq:energy}) the
233 energy affected by the scaling factor $S$. This factor also has a great impact
234 on the performance. When scaling down the frequency to the new value according
235 to EQ(~\ref{eq:s}) lead to the value of the scale $S$ has inverse relation with
236 new frequency value ($S \propto \frac{1}{F_{new}}$). Also when decrease the
237 frequency value, the execution time increase. Then the new frequency value has
238 inverse relation with time ($F_{new} \propto \frac{1}{T}$). This lead to the
239 frequency scaling factor $S$ proportional linearly with execution time ($S
240 \propto T$). Large scale MPI applications such as NAS benchmarks have
241 considerable amount of communications embedded in these programs. During the
242 communication process the processor remain idle until the communication has
243 finished. For that reason any change in the frequency has no impact on the time
244 of communication but it has obvious impact on the time of
245 computation~\cite{17}. We are made many tests on real cluster to prove that the
246 frequency scaling factor \emph S has a linear relation with computation time
247 only also see~\cite{41}. To predict the execution time of MPI program, firstly
248 must be precisely specifying communication time and the computation time for the
249 slower task. Secondly, we use these times for predicting the execution time for
250 any MPI program as a function of the new scaling factor as in the
252 \begin{equation} \label{eq:tnew}
253 \displaystyle T_{new}= T_{Max \:Comp \:Old} \; . \:S \;+ \;T_{Max\: Comm\: Old}
256 The above equation shows that the scaling factor \emph S has linear relation
257 with the computation time without affecting the communication time. The
258 communication time consists of the beginning times which an MPI calls for
259 sending or receiving till the message is synchronously sent or received. In this
260 paper we predict the execution time of the program for any new scaling factor
261 value. Depending on this prediction we can produce our energy-performace scaling
262 method as we will show in the coming sections. In the next section we make an
263 investigation study for the EQ~(\ref{eq:tnew}).
265 \section{Performance Prediction Verification}
267 In this section we evaluate the precision of our performance prediction methods
268 on the NAS benchmark. We use the EQ~(\ref{eq:tnew}) that predicts the execution
269 time for any scale value. The NAS programs run the class B for comparing the
270 real execution time with the predicted execution time. Each program runs offline
271 with all available scaling factors on 8 or 9 nodes to produce real execution
272 time values. These scaling factors are computed by dividing the maximum
273 frequency by the new one see EQ~(\ref{eq:s}). In all tests, we use the simulator
274 Simgrid/SMPI v3.10 to run the NAS programs.
275 \begin{figure}[width=\textwidth,height=\textheight,keepaspectratio]
277 \includegraphics[scale=0.60]{cg_per.eps}
278 \includegraphics[scale=0.60]{mg_pre.eps}
279 \includegraphics[scale=0.60]{bt_pre.eps}
280 \includegraphics[scale=0.60]{lu_pre.eps}
281 \caption{Fitting Predicted to Real Execution Time}
284 %see Figure~\ref{fig:pred}
285 In our cluster there are 18 available frequency states for each processor from
286 2.5 GHz to 800 MHz, there is 100 MHz difference between two successive
287 frequencies. For more details on the characteristics of the platform refer to
288 table~(\ref{table:platform}). This lead to 18 run states for each program. We
289 use seven MPI programs of the NAS parallel benchmarks : CG, MG, EP, FT, BT, LU
290 and SP. The average normalized errors between the predicted execution time and
291 the real time (Simgrid time) for all programs is between 0.0032 to 0.0133. AS an
292 example, we are present the execution times of the NAS benchmarks as in the
293 figure~(\ref{fig:pred}).
295 \section{Performance to Energy Competition}
296 This section demonstrates our approach for choosing the optimal scaling
297 factor. This factor gives maximum energy reduction taking into account the
298 execution time for both computation and communication times . The relation
299 between the energy and the performance are nonlinear and complex, because the
300 relation of the energy with scaling factor is nonlinear and with the performance
301 it is linear see~\cite{17}. The relation between the energy and the performance
302 is not straightforward. Moreover, they are not measured using the same metric.
303 For solving this problem, we normalize the energy by calculating the ratio
304 between the consumed energy with scaled frequency and the consumed energy
305 without scaled frequency :
306 \begin{equation} \label{eq:enorm}
307 E_{Norm}=\displaystyle\frac{E_{Reduced}}{E_{Orginal}}= \frac{\displaystyle \;P_{dyn}\,.\,S_i^{-2}\,.\,(T_1+\sum\limits_{i=2}^{N}\frac{T_i^3}{T_1^2})+\;P_{static}\,.\,T_1\,.\,S_i\;\,.\,N }{\displaystyle \;P_{dyn}\,.\,(T_1+\sum\limits_{i=2}^{N}\frac{T_i^3}{T_1^2})+\;P_{static}\,.\,T_1\,\,.\,N }
309 By the same way we can normalize the performance as follows :
310 \begin{equation} \label{eq:pnorm}
311 P_{Norm}=\displaystyle \frac{T_{New}}{T_{Old}}=\frac{T_{Max \:Comp \:Old} \;. \:S \;+ \;T_{Max\: Comm\: Old}}{T_{Old}} \;\;
313 The second problem is the optimization operation for both energy and performance
314 is not in the same direction. In other words, the normalized energy and the
315 performance curves are not in the same direction see figure~(\ref{fig:r2}).
316 While the main goal is to optimize the energy and performance in the same
317 time. According to the equations~(\ref{eq:enorm}) and~(\ref{eq:pnorm}) the
318 scaling factor \emph S reduce both the energy and the performance
319 simultaneously. But the main objective is to produce maximum energy reduction
320 with minimum performance reduction. Many researchers used different strategies
321 to solve this nonlinear problem for example see~\cite{19,42}, their methods add
322 big overhead to the algorithm for selecting the suitable frequency. In this
323 paper we are present a method to find the optimal scaling factor \emph S for
324 optimize both energy and performance simultaneously without adding big
325 overheads. Our solution for this problem is to make the optimization process
326 have the same direction. Therefore, we inverse the equation of normalize
327 performance as follows :
328 \begin{equation} \label{eq:pnorm_en}
329 \displaystyle P^{-1}_{Norm}= \frac{T_{Old}}{T_{New}}=\frac{T_{Old}}{T_{Max \:Comp \:Old} \;. \:S \;+ \;T_{Max\: Comm\: Old}}
333 \subfloat[Converted Relation.]{\includegraphics[scale=0.70]{file.eps}\label{fig:r1}}
334 \subfloat[Real Relation.]{\includegraphics[scale=0.70]{file3.eps}\label{fig:r2}}
336 \caption{The Energy and Performance Relation}
338 Then, we can modelize our objective function as finding the maximum distance
339 between the energy curve EQ~(\ref{eq:enorm}) and the inverse of performance
340 curve EQ~(\ref{eq:pnorm_en}) over all available scaling factors. This represent
341 the minimum energy consumption with minimum execution time (better performance)
342 in the same time, see figure~(\ref{fig:r1}). Then our objective function has the
344 \begin{equation} \label{eq:max}
345 \displaystyle MaxDist = Max \;(\;\overbrace{P^{-1}_{Norm}}^{Maximize}\; -\; \overbrace{E_{Norm}}^{Minimize} \;)
347 Then we can select the optimal scaling factor that satisfy the
348 EQ~(\ref{eq:max}). Our objective function can works with any energy model or
349 static power values stored in a data file. Moreover, this function works in
350 optimal way when the energy function has a convex form with frequency scaling
351 factor as shown in ~\cite{15,3,19}. Energy measurement model is not the
352 objective of this paper and we choose Rauber's model as an example with two
353 reasons that mentioned before.
355 \section{Optimal Scaling Factor for Performance and Energy}
357 In the previous section we described the objective function that satisfy our
358 goal in discovering optimal scaling factor for both performance and energy at
359 the same time. Therefore, we develop an energy to performance scaling algorithm
360 (EPSA). This algorithm is simple and has a direct way to calculate the optimal
361 scaling factor for both energy and performance at the same time.
365 \begin{algorithmic}[1]
366 \State Initialize the variable $Dist=0$
367 \State Set dynamic and static power values.
368 \State Set $P_{states}$ to the number of available frequencies.
369 \State Set the variable $F_{new}$ to max. frequency, $F_{new} = F_{max} $
370 \State Set the variable $F_{diff}$ to the scale value between each two frequencies.
371 \For {$i=1$ to $P_{states} $}
372 \State - Calculate the new frequency as $F_{new}=F_{new} - F_{diff} $
373 \State - Calculate the scale factor $S$ as in EQ~(\ref{eq:s}).
374 \State - Calculate all available scales $S_i$ depend on $S$ as in EQ~(\ref{eq:si}).
375 \State - Select the maximum scale factor $S_1$ from the set of scales $S_i$.
376 \State - Calculate the normalize energy $E_{Norm}=E_{R}/E_{O}$ as in EQ~(\ref{eq:enorm}).
377 \State - Calculate the normalize inverse of performance $P_{NormInv}=T_{old}/T_{new}$
379 as in EQ~(\ref{eq:pnorm_en}).
380 \If{ $(P_{NormInv}-E_{Norm}$ $>$ $Dist$) }
381 \State $S_{optimal}=S$
382 \State $Dist = P_{NormInv} - E_{Norm}$
385 \State $ Return \; \; (S_{optimal})$
388 The proposed EPSA algorithm works online during the execution time of the MPI
389 program. It selects the optimal scaling factor by gathering some information
390 from the program after one iteration. This algorithm has small execution time
391 (between 0.00152 $ms$ for 4 nodes to 0.00665 $ms$ for 32 nodes). The data
392 required by this algorithm is the computation time and the communication time
393 for each task from the first iteration only. When these times are measured, the
394 MPI program calls the EPSA algorithm to choose the new frequency using the
395 optimal scaling factor. Then the program set the new frequency to the
396 system. The algorithm is called just one time during the execution of the
397 program. The following example shows where and when the EPSA algorithm is called
399 \begin{minipage}{\textwidth}
400 \begin{lstlisting}[frame=tb]
401 FOR J:=1 to Some_iterations Do
402 -Computations Section.
403 -Communications Section.
405 -Gather all times of computation and communication
407 -Call EPSA with these times.
408 -Calculate the new frequency from optimal scale.
409 -Set the new frequency to the system.
414 After obtaining the optimal scale factor from the EPSA algorithm. The program
415 calculates the new frequency $F_i$ for each task proportionally to its time
416 value $T_i$. By substitution of the EQ~(\ref{eq:s}) in the EQ~(\ref{eq:si}), we
417 can calculate the new frequency $F_i$ as follows :
418 \begin{equation} \label{eq:fi}
419 F_i=\frac{F_{max} \; . \;T_i}{S_{optimal} \; . \;T_{max}} \hfill
421 According to this equation all the nodes may have the same frequency value if
422 they have balanced workloads. Otherwise, they take different frequencies when
423 have imbalanced workloads. Then EQ~(\ref{eq:fi}) works in adaptive way to change
424 the freguency according to the nodes workloads.
426 \section{Experimental Results}
428 The proposed ESPA algorithm was applied to seven MPI programs of the NAS
429 benchmarks (EP ,CG , MG ,FT , BT, LU and SP). We work on three classes (A, B and
430 C) for each program. Each program runs on specific number of processors
431 proportional to the size of the class. Each class represents the problem size
432 ascending from the class A to C. Additionally, depending on some speed up points
433 for each class we run the classes A, B and C on 4, 8 or 9 and 16 nodes
434 respectively. Our experiments are executed on the simulator Simgrid/SMPI
435 v3.10. We design a platform file that simulates a cluster with one core per
436 node. This cluster is a homogeneous architecture with distributed memory. The
437 detailed characteristics of our platform file are shown in
438 thetable~(\ref{table:platform}). Each node in the cluster has 18 frequency
439 values from 2.5 GHz to 800 MHz with 100 MHz difference between each two
440 successive frequencies.
442 \caption{Platform File Parameters}
445 \begin{tabular}{ | l | l | l |l | l |l |l | p{2cm} |}
447 Max & Min & Backbone & Backbone&Link &Link& Sharing \\
448 Freq. & Freq. & Bandwidth & Latency & Bandwidth& Latency&Policy \\ \hline
449 2.5 &800 & 2.25 GBps &5E-7 s & 1 GBps & 5E-5 s&Full \\
450 GHz& MHz& & & & &Duplex \\\hline
452 \label{table:platform}
454 Depending on the EQ~(\ref{eq:energy}), we measure the energy consumption for all
455 the NAS MPI programs while assuming the power dynamic is equal to 20W and the
456 power static is equal to 4W for all experiments. We run the proposed ESPA
457 algorithm for all these programs. The results showed that the algorithm selected
458 different scaling factors for each program depending on the communication
459 features of the program as in the figure~(\ref{fig:nas}). This figure shows that
460 there are different distances between the normalized energy and the normalized
461 inversed performance curves, because there are different communication features
462 for each MPI program. When there are little or not communications, the inversed
463 performance curve is very close to the energy curve. Then the distance between
464 the two curves is very small. This lead to small energy savings. The opposite
465 happens when there are a lot of communication, the distance between the two
466 curves is big. This lead to more energy savings (e.g. CG and FT), see
467 table~(\ref{table:factors results}). All discovered frequency scaling factors
468 optimize both the energy and the performance simultaneously for all the NAS
469 programs. In table~(\ref{table:factors results}), we record all optimal scaling
470 factors results for each program on class C. These factors give the maximum
471 energy saving percent and the minimum performance degradation percent in the
472 same time over all available scales.
473 \begin{figure}[width=\textwidth,height=\textheight,keepaspectratio]
475 \includegraphics[scale=0.47]{ep.eps}
476 \includegraphics[scale=0.47]{cg.eps}
477 \includegraphics[scale=0.47]{sp.eps}
478 \includegraphics[scale=0.47]{lu.eps}
479 \includegraphics[scale=0.47]{bt.eps}
480 \includegraphics[scale=0.47]{ft.eps}
481 \caption{Optimal scaling factors for The NAS MPI Programs}
484 \begin{table}[width=\textwidth,height=\textheight,keepaspectratio]
485 \caption{Optimal Scaling Factors Results}
488 \begin{tabular}{ | l | l | l |l | l | p{2cm} |}
490 Program & Optimal & Energy & Performance&Energy-Perf.\\
491 Name & Scaling Factor& Saving \%&Degradation \% &Distance \\ \hline
492 CG & 1.56 &39.23 & 14.88 & 24.35\\ \hline
493 MG & 1.47 &34.97&21.7& 13.27 \\ \hline
494 EP & 1.04 &22.14&20.73 &1.41\\ \hline
495 LU & 1.388 &35.83&22.49 &13.34\\ \hline
496 BT & 1.315 &29.6&21.28 &8.32\\ \hline
497 SP & 1.388 &33.48 &21.36&12.12\\ \hline
498 FT & 1.47 &34.72 &19&15.72\\ \hline
500 \label{table:factors results}
501 % is used to refer this table in the text
504 As shown in the table~(\ref{table:factors results}), when the optimal scaling
505 factor has big value we can gain more energy savings for example as in CG and
506 FT. The opposite happens when the optimal scaling factor is small value as
507 example BT and EP. Our algorithm selects big scaling factor value when the
508 communication and the other slacks times are big and smaller ones in opposite
509 cases. In EP there are no communications inside the iterations. This make our
510 EPSA to selects smaller scaling factor values (inducing smaller energy savings).
512 \section{Comparing Results}
514 In this section, we compare our EPSA algorithm results with Rauber's
515 methods~\cite{3}. He had two scenarios, the first is to reduce energy to optimal
516 level without considering the performance as in EQ~(\ref{eq:sopt}). We refer to
517 this scenario as $Rauber_{E}$. The second scenario is similar to the first
518 except setting the slower task to the maximum frequency (when the scale $S=1$)
519 to keep the performance from degradation as mush as possible. We refer to this
520 scenario as $Rauber_{E-P}$. The comparison is made in tables~(\ref{table:compare
521 Class A},\ref{table:compare Class B},\ref{table:compare Class C}). These
522 tables show the results of our EPSA and Rauber's two scenarios for all the NAS
523 benchmarks programs for classes A,B and C.
525 \caption{Comparing Results for The NAS Class A}
528 \begin{tabular}{ | l | l | l |l | l |l| }
530 Method&Program&Factor& Energy& Performance &Energy-Perf.\\
531 name &name&value& Saving \%&Degradation \% &Distance
533 % \rowcolor[gray]{0.85}
534 EPSA&CG & 1.56 &37.02 & 13.88 & 23.14\\ \hline
535 $Rauber_{E-P}$&CG &2.14 &42.77 & 25.27 & 17.5\\ \hline
536 $Rauber_{E}$&CG &2.14 &42.77&26.46&16.31\\ \hline
538 EPSA&MG & 1.47 &27.66&16.82&10.84\\ \hline
539 $Rauber_{E-P}$&MG &2.14&34.45&31.84&2.61\\ \hline
540 $Rauber_{E}$&MG &2.14&34.48&33.65&0.8 \\ \hline
542 EPSA&EP &1.19 &25.32&20.79&4.53\\ \hline
543 $Rauber_{E-P}$&EP&2.05&41.45&55.67&-14.22\\ \hline
544 $Rauber_{E}$&EP&2.05&42.09&57.59&-15.5\\ \hline
546 EPSA&LU&1.56& 39.55 &19.38& 20.17\\ \hline
547 $Rauber_{E-P}$&LU&2.14&45.62&27&18.62 \\ \hline
548 $Rauber_{E}$&LU&2.14&45.66&33.01&12.65\\ \hline
550 EPSA&BT&1.315& 29.6&20.53&9.07 \\ \hline
551 $Rauber_{E-P}$&BT&2.1&45.53&49.63&-4.1\\ \hline
552 $Rauber_{E}$&BT&2.1&43.93&52.86&-8.93\\ \hline
554 EPSA&SP&1.388& 33.51&15.65&17.86 \\ \hline
555 $Rauber_{E-P}$&SP&2.11&45.62&42.52&3.1\\ \hline
556 $Rauber_{E}$&SP&2.11&45.78&43.09&2.69\\ \hline
558 EPSA&FT&1.25& 25&10.8&14.2 \\ \hline
559 $Rauber_{E-P}$&FT&2.1&39.29&34.3&4.99 \\ \hline
560 $Rauber_{E}$&FT&2.1&37.56&38.21&-0.65\\ \hline
562 \label{table:compare Class A}
563 % is used to refer this table in the text
566 \caption{Comparing Results for The NAS Class B}
569 \begin{tabular}{ | l | l | l |l | l |l| }
571 Method&Program&Factor& Energy& Performance &Energy-Perf.\\
572 name &name&value& Saving \%&Degradation \% &Distance
574 % \rowcolor[gray]{0.85}
575 EPSA&CG & 1.66 &39.23&16.63&22.6 \\ \hline
576 $Rauber_{E-P}$&CG &2.15 &45.34&27.6&17.74\\ \hline
577 $Rauber_{E}$&CG &2.15 &45.34&28.88&16.46\\ \hline
579 EPSA&MG & 1.47 &34.98&18.35&16.63\\ \hline
580 $Rauber_{E-P}$&MG &2.14&43.55&36.42&7.13 \\ \hline
581 $Rauber_{E}$&MG &2.14&43.56&37.07&6.49 \\ \hline
583 EPSA&EP &1.08 &20.29&17.15&3.14 \\ \hline
584 $Rauber_{E-P}$&EP&2&42.38&56.88&-14.5\\ \hline
585 $Rauber_{E}$&EP&2&39.73&59.94&-20.21\\ \hline
587 EPSA&LU&1.47&38.57&21.34&17.23 \\ \hline
588 $Rauber_{E-P}$&LU&2.1&43.62&36.51&7.11 \\ \hline
589 $Rauber_{E}$&LU&2.1&43.61&38.54&5.07 \\ \hline
591 EPSA&BT&1.315& 29.59&20.88&8.71\\ \hline
592 $Rauber_{E-P}$&BT&2.1&44.53&53.05&-8.52\\ \hline
593 $Rauber_{E}$&BT&2.1&42.93&52.806&-9.876\\ \hline
595 EPSA&SP&1.388&33.44&19.24&14.2 \\ \hline
596 $Rauber_{E-P}$&SP&2.15&45.69&43.2&2.49\\ \hline
597 $Rauber_{E}$&SP&2.15&45.41&44.47&0.94\\ \hline
599 EPSA&FT&1.388&34.4&14.57&19.83 \\ \hline
600 $Rauber_{E-P}$&FT&2.13&42.98&37.35&5.63 \\ \hline
601 $Rauber_{E}$&FT&2.13&43.04&37.9&5.14\\ \hline
603 \label{table:compare Class B}
604 % is used to refer this table in the text
608 \caption{Comparing Results for The NAS Class C}
611 \begin{tabular}{ | l | l | l |l | l |l| }
613 Method&Program&Factor& Energy& Performance &Energy-Perf.\\
614 name &name&value& Saving \%&Degradation \% &Distance
616 % \rowcolor[gray]{0.85}
617 EPSA&CG & 1.56 &39.23&14.88&24.35 \\ \hline
618 $Rauber_{E-P}$&CG &2.15 &45.36&25.89&19.47\\ \hline
619 $Rauber_{E}$&CG &2.15 &45.36&26.7&18.66\\ \hline
621 EPSA&MG & 1.47 &34.97&21.697&13.273\\ \hline
622 $Rauber_{E-P}$&MG &2.15&43.65&40.45&3.2 \\ \hline
623 $Rauber_{E}$&MG &2.15&43.64&41.38&2.26 \\ \hline
625 EPSA&EP &1.04 &22.14&20.73&1.41 \\ \hline
626 $Rauber_{E-P}$&EP&1.92&39.4&56.33&-16.93\\ \hline
627 $Rauber_{E}$&EP&1.92&38.1&56.35&-18.25\\ \hline
629 EPSA&LU&1.388&35.83&22.49&13.34 \\ \hline
630 $Rauber_{E-P}$&LU&2.15&44.97&41&3.97 \\ \hline
631 $Rauber_{E}$&LU&2.15&44.97&41.8&3.17 \\ \hline
633 EPSA&BT&1.315& 29.6&21.28&8.32\\ \hline
634 $Rauber_{E-P}$&BT&2.13&45.6&49.84&-4.24\\ \hline
635 $Rauber_{E}$&BT&2.13&44.9&55.16&-10.26\\ \hline
637 EPSA&SP&1.388&33.48&21.35&12.12\\ \hline
638 $Rauber_{E-P}$&SP&2.1&45.69&43.6&2.09\\ \hline
639 $Rauber_{E}$&SP&2.1&45.75&44.1&1.65\\ \hline
641 EPSA&FT&1.47&34.72&19&15.72 \\ \hline
642 $Rauber_{E-P}$&FT&2.04&39.4&37.1&2.3\\ \hline
643 $Rauber_{E}$&FT&2.04&39.35&37.7&1.65\\ \hline
645 \label{table:compare Class C}
646 % is used to refer this table in the text
648 As shown in these tables our scaling factor is not optimal for energy saving
649 such as Rauber's scaling factor EQ~(\ref{eq:sopt}), but it is optimal for both
650 the energy and the performance simultaneously. Our EPSA optimal scaling factors
651 has better simultaneous optimization for both the energy and the performance
652 compared to Rauber's energy-performance method ($Rauber_{E-P}$). Also, in
653 ($Rauber_{E-P}$) method when setting the frequency to maximum value for the
654 slower task lead to a small improvement of the performance. Also the results
655 show that this method keep or improve energy saving. Because of the energy
656 consumption decrease when the execution time decreased while the frequency value
659 Figure~(\ref{fig:compare}) shows the maximum distance between the energy saving
660 percent and the performance degradation percent. Therefore, this means it is the
661 same resultant of our objective function EQ~(\ref{eq:max}). Our algorithm always
662 gives positive energy to performance trade offs while Rauber's method
663 ($Rauber_{E-P}$) gives in some time negative trade offs such as in BT and
664 EP. The positive trade offs with highest values lead to maximum energy savings
665 concatenating with less performance degradation and this the objective of this
666 paper. While the negative trade offs refers to improving energy saving (or may
667 be the performance) while degrading the performance (or may be the energy) more
669 \begin{figure}[width=\textwidth,height=\textheight,keepaspectratio]
671 \includegraphics[scale=0.60]{compare_class_A.pdf}
672 \includegraphics[scale=0.60]{compare_class_B.pdf}
673 \includegraphics[scale=0.60]{compare_class_c.pdf}
674 % use scale 35 for all to be in the same line
675 \caption{Comparing Our EPSA with Rauber's Methods}
679 \bibliographystyle{plain}
680 \bibliography{my_reference}
687 %%% ispell-local-dictionary: "american"