X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/mpi-energy.git/blobdiff_plain/f52703a2c13a4e69525be6ce9883eead2f96eb6f..43905e2e8c50ec820f6060f3d119c1cb8461c596:/paper.tex?ds=sidebyside diff --git a/paper.tex b/paper.tex index 2838f2d..832d62f 100644 --- a/paper.tex +++ b/paper.tex @@ -3,11 +3,9 @@ \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} -\usepackage{algorithm,algorithmicx,algpseudocode} +\usepackage{algpseudocode} \usepackage{graphicx,graphics} \usepackage{subfig} -\usepackage{listings} -\usepackage{colortbl} \usepackage{amsmath} \usepackage{url} @@ -25,6 +23,33 @@ \newcommand{\JC}[2][inline]{% \todo[color=red!10,#1]{\sffamily\textbf{JC:} #2}\xspace} +\newcommand{\Xsub}[2]{\ensuremath{#1_\textit{#2}}} + +\newcommand{\Dist}{\textit{Dist}} +\newcommand{\Eind}{\Xsub{E}{ind}} +\newcommand{\Enorm}{\Xsub{E}{Norm}} +\newcommand{\Eoriginal}{\Xsub{E}{Original}} +\newcommand{\Ereduced}{\Xsub{E}{Reduced}} +\newcommand{\Fdiff}{\Xsub{F}{diff}} +\newcommand{\Fmax}{\Xsub{F}{max}} +\newcommand{\Fnew}{\Xsub{F}{new}} +\newcommand{\Ileak}{\Xsub{I}{leak}} +\newcommand{\Kdesign}{\Xsub{K}{design}} +\newcommand{\MaxDist}{\textit{Max Dist}} +\newcommand{\Ntrans}{\Xsub{N}{trans}} +\newcommand{\Pdyn}{\Xsub{P}{dyn}} +\newcommand{\PnormInv}{\Xsub{P}{NormInv}} +\newcommand{\Pnorm}{\Xsub{P}{Norm}} +\newcommand{\Pstates}{\Xsub{P}{states}} +\newcommand{\Pstatic}{\Xsub{P}{static}} +\newcommand{\Sopt}{\Xsub{S}{opt}} +\newcommand{\Tcomp}{\Xsub{T}{comp}} +\newcommand{\TmaxCommOld}{\Xsub{T}{Max Comm Old}} +\newcommand{\TmaxCompOld}{\Xsub{T}{Max Comp Old}} +\newcommand{\Tmax}{\Xsub{T}{max}} +\newcommand{\Tnew}{\Xsub{T}{New}} +\newcommand{\Told}{\Xsub{T}{Old}} + \begin{document} \title{Dynamic Frequency Scaling for Energy Consumption @@ -208,28 +233,28 @@ our paper is to present a new online scaling factor selection method which has t Many researchers~\cite{9,3,15,26} divide the power consumed by a processor into two power metrics: the static and the dynamic power. While the first one is consumed as long as the computing unit is on, the latter is only consumed during -computation times. The dynamic power $P_{dyn}$ is related to the switching +computation times. The dynamic power $\Pdyn$ is related to the switching activity $\alpha$, load capacitance $C_L$, the supply voltage $V$ and -operational frequency $f$, as shown in EQ~(\ref{eq:pd}). +operational frequency $f$, as shown in EQ~\eqref{eq:pd}. \begin{equation} \label{eq:pd} - P_\textit{dyn} = \alpha \cdot C_L \cdot V^2 \cdot f + \Pdyn = \alpha \cdot C_L \cdot V^2 \cdot f \end{equation} -The static power $P_{static}$ captures the leakage power as follows: +The static power $\Pstatic$ captures the leakage power as follows: \begin{equation} \label{eq:ps} - P_\textit{static} = V \cdot N_{trans} \cdot K_{design} \cdot I_{leak} + \Pstatic = V \cdot \Ntrans \cdot \Kdesign \cdot \Ileak \end{equation} -where V is the supply voltage, $N_{trans}$ is the number of transistors, -$K_{design}$ is a design dependent parameter and $I_{leak}$ is a +where V is the supply voltage, $\Ntrans$ is the number of transistors, +$\Kdesign$ is a design dependent parameter and $\Ileak$ is a technology-dependent parameter. The energy consumed by an individual processor to execute a given program can be computed as: \begin{equation} \label{eq:eind} - E_\textit{ind} = P_\textit{dyn} \cdot T_{Comp} + P_\textit{static} \cdot T + \Eind = \Pdyn \cdot \Tcomp + \Pstatic \cdot T \end{equation} -where $T$ is the execution time of the program, $T_{Comp}$ is the computation -time and $T_{Comp} \leq T$. $T_{Comp}$ may be equal to $T$ if there is no +where $T$ is the execution time of the program, $\Tcomp$ is the computation +time and $\Tcomp \leq T$. $\Tcomp$ may be equal to $T$ if there is no communication, no slack time and no synchronization. DVFS is a process that is allowed in modern processors to reduce the dynamic @@ -239,10 +264,10 @@ depends linearly on the supply voltage $V$, i.e., $V = \beta \cdot f$ with some constant $\beta$. This equation is used to study the change of the dynamic voltage with respect to various frequency values in~\cite{3}. The reduction process of the frequency can be expressed by the scaling factor $S$ which is the -ratio between the maximum and the new frequency as in EQ~(\ref{eq:s}). +ratio between the maximum and the new frequency as in EQ~\eqref{eq:s}. \begin{equation} \label{eq:s} - S = \frac{F_\textit{max}}{F_\textit{new}} + S = \frac{\Fmax}{\Fnew} \end{equation} The value of the scaling factor $S$ is greater than 1 when changing the frequency of the CPU to any new frequency value~(\emph{P-state}) in the @@ -252,33 +277,32 @@ increase of the static energy because the execution time is increased~\cite{36}. If the tasks are sorted according to their execution times before scaling in a descending order, the total energy consumption model for a parallel homogeneous platform, as presented by Rauber and Rünger~\cite{3}, can be written as a -function of the scaling factor $S$, as in EQ~(\ref{eq:energy}). +function of the scaling factor $S$, as in EQ~\eqref{eq:energy}. \begin{equation} \label{eq:energy} - E = P_\textit{dyn} \cdot S_1^{-2} \cdot + E = \Pdyn \cdot S_1^{-2} \cdot \left( T_1 + \sum_{i=2}^{N} \frac{T_i^3}{T_1^2} \right) + - P_\textit{static} \cdot T_1 \cdot S_1 \cdot N - \hfill + \Pstatic \cdot T_1 \cdot S_1 \cdot N \end{equation} where $N$ is the number of parallel nodes, $T_i$ for $i=1,\dots,N$ are -the execution times and scaling factors of the sorted tasks. Therefore, $T1$ is +the execution times and scaling factors of the sorted tasks. Therefore, $T_1$ is the time of the slowest task, and $S_1$ its scaling factor which should be the highest because they are proportional to the time values $T_i$. The scaling -factors are computed as in EQ~(\ref{eq:si}). +factors are computed as in EQ~\eqref{eq:si}. \begin{equation} \label{eq:si} S_i = S \cdot \frac{T_1}{T_i} - = \frac{F_\textit{max}}{F_\textit{new}} \cdot \frac{T_1}{T_i} + = \frac{\Fmax}{\Fnew} \cdot \frac{T_1}{T_i} \end{equation} -In this paper we use Rauber and Rünger's energy model, EQ~(\ref{eq:energy}), because it can be applied to homogeneous clusters if the communication time is taken in consideration. Moreover, we compare our algorithm with Rauber and Rünger's scaling factor selection +In this paper we use Rauber and Rünger's energy model, EQ~\eqref{eq:energy}, because it can be applied to homogeneous clusters if the communication time is taken in consideration. Moreover, we compare our algorithm with Rauber and Rünger's scaling factor selection method which uses the same energy model. In their method, the optimal scaling factor is -computed by minimizing the derivation of EQ~(\ref{eq:energy}) which produces -EQ~(\ref{eq:sopt}). +computed by minimizing the derivation of EQ~\eqref{eq:energy} which produces +EQ~\eqref{eq:sopt}. \begin{equation} \label{eq:sopt} - S_\textit{opt} = \sqrt[3]{\frac{2}{N} \cdot \frac{P_\textit{dyn}}{P_\textit{static}} \cdot + \Sopt = \sqrt[3]{\frac{2}{N} \cdot \frac{\Pdyn}{\Pstatic} \cdot \left( 1 + \sum_{i=2}^{N} \frac{T_i^3}{T_1^3} \right) } \end{equation} @@ -301,10 +325,10 @@ or receiving a message till the message is synchronously sent or received. To be able to predict the execution time of MPI program, the communication time and the computation time for the slowest task must be measured before scaling. These times are used to predict the execution time for any MPI program as a function -of the new scaling factor as in EQ~(\ref{eq:tnew}). +of the new scaling factor as in EQ~\eqref{eq:tnew}. \begin{equation} \label{eq:tnew} - \textit T_\textit{new} = T_\textit{Max Comp Old} \cdot S + T_{\textit{Max Comm Old}} + \Tnew = \TmaxCompOld \cdot S + \TmaxCommOld \end{equation} In this paper, this prediction method is used to select the best scaling factor for each processor as presented in the next section. @@ -321,66 +345,66 @@ the consumed energy with scaled frequency and the consumed energy without scaled frequency: \begin{multline} \label{eq:enorm} - E_\textit{Norm} = \frac{ E_\textit{Reduced}}{E_\textit{Original}} \\ - {} = \frac{P_\textit{dyn} \cdot S_1^{-2} \cdot - \left( T_1 + \sum_{i=2}^{N}\frac{T_i^3}{T_1^2}\right) + - P_\textit{static} \cdot T_1 \cdot S_1 \cdot N }{ - P_\textit{dyn} \cdot \left(T_1+\sum_{i=2}^{N}\frac{T_i^3}{T_1^2}\right) + - P_\textit{static} \cdot T_1 \cdot N } + \Enorm = \frac{ \Ereduced}{\Eoriginal} \\ + {} = \frac{\Pdyn \cdot S_1^{-2} \cdot + \left( T_1 + \sum_{i=2}^{N}\frac{T_i^3}{T_1^2}\right) + + \Pstatic \cdot T_1 \cdot S_1 \cdot N}{ + \Pdyn \cdot \left(T_1+\sum_{i=2}^{N}\frac{T_i^3}{T_1^2}\right) + + \Pstatic \cdot T_1 \cdot N } \end{multline} In the same way we can normalize the performance as follows: \begin{equation} \label{eq:pnorm} - P_\textit{Norm} = \frac{T_\textit{New}}{T_\textit{Old}} - = \frac{T_\textit{Max Comp Old} \cdot S + - T_\textit{Max Comm Old}}{T_\textit{Max Comp Old} + - T_\textit{Max Comm Old}} + \Pnorm = \frac{\Tnew}{\Told} + = \frac{\TmaxCompOld \cdot S + \TmaxCommOld}{ + \TmaxCompOld + \TmaxCommOld} \end{equation} The second problem is that the optimization operation for both energy and performance is not in the same direction. In other words, the normalized energy and the performance curves are not at the same direction see -Figure~(\ref{fig:r2}). While the main goal is to optimize the energy and -performance in the same time. According to the equations~(\ref{eq:enorm}) -and~(\ref{eq:pnorm}), the scaling factor $S$ reduce both the energy and the -performance simultaneously. But the main objective is to produce maximum energy -reduction with minimum performance reduction. Many researchers used different -strategies to solve this nonlinear problem for example see~\cite{19,42}, their -methods add big overheads to the algorithm to select the suitable frequency. -In this paper we present a method to find the optimal scaling factor $S$ to optimize both energy and performance simultaneously without adding a big -overhead. Our solution for this problem is to make the optimization process -for energy and performance follow the same direction. Therefore, we inverse the equation of the normalized -performance as follows: +Figure~\ref{fig:rel}\subref{fig:r2}. While the main goal is to optimize the +energy and performance in the same time. According to the +equations~\eqref{eq:enorm} and~\eqref{eq:pnorm}, the scaling factor $S$ reduce +both the energy and the performance simultaneously. But the main objective is +to produce maximum energy reduction with minimum performance reduction. Many +researchers used different strategies to solve this nonlinear problem for +example see~\cite{19,42}, their methods add big overheads to the algorithm to +select the suitable frequency. In this paper we present a method to find the +optimal scaling factor $S$ to optimize both energy and performance +simultaneously without adding a big overhead. Our solution for this problem is +to make the optimization process for energy and performance follow the same +direction. Therefore, we inverse the equation of the normalized performance as +follows: \begin{equation} \label{eq:pnorm_en} - P^{-1}_\textit{Norm} = \frac{ T_\textit{Old}}{ T_\textit{New}} - = \frac{T_\textit{Max Comp Old} + - T_\textit{Max Comm Old}}{T_\textit{Max Comp Old} \cdot S + - T_\textit{Max Comm Old}} + \Pnorm^{-1} = \frac{ \Told}{ \Tnew} + = \frac{\TmaxCompOld + + \TmaxCommOld}{\TmaxCompOld \cdot S + + \TmaxCommOld} \end{equation} \begin{figure} \centering - \subfloat[Converted relation.]{% - \includegraphics[width=.24\textwidth]{fig/file}\label{fig:r1}}% -% \quad% \subfloat[Real relation.]{% - \includegraphics[width=.24\textwidth]{fig/file3}\label{fig:r2}} - \label{fig:rel} + \includegraphics[width=.5\linewidth]{fig/file3}\label{fig:r2}}% + \subfloat[Converted relation.]{% + \includegraphics[width=.5\linewidth]{fig/file}\label{fig:r1}} \caption{The energy and performance relation} + \label{fig:rel} \end{figure} Then, we can model our objective function as finding the maximum distance -between the energy curve EQ~(\ref{eq:enorm}) and the inverse of performance -curve EQ~(\ref{eq:pnorm_en}) over all available scaling factors. This +between the energy curve EQ~\eqref{eq:enorm} and the inverse of performance +curve EQ~\eqref{eq:pnorm_en} over all available scaling factors. This represents the minimum energy consumption with minimum execution time (better -performance) at the same time, see Figure~(\ref{fig:r1}). Then our objective -function has the following form: +performance) at the same time, see Figure~\ref{fig:rel}\subref{fig:r1}. Then +our objective function has the following form: \begin{equation} \label{eq:max} - Max Dist = \max_{j=1,2,\dots,F} - (\overbrace{P^{-1}_\textit{Norm}(S_j)}^{\text{Maximize}} - - \overbrace{E_\textit{Norm}(S_j)}^{\text{Minimize}} ) + \MaxDist = \max_{j=1,2,\dots,F} + (\overbrace{\Pnorm^{-1}(S_j)}^{\text{Maximize}} - + \overbrace{\Enorm(S_j)}^{\text{Minimize}} ) \end{equation} where $F$ is the number of available frequencies. Then we can select the optimal -scaling factor that satisfies EQ~(\ref{eq:max}). Our objective function can +scaling factor that satisfies EQ~\eqref{eq:max}. Our objective function can work with any energy model or static power values stored in a data file. Moreover, this function works in optimal way when the energy curve has a convex form over the available frequency scaling factors as shown in~\cite{15,3,19}. @@ -388,52 +412,54 @@ form over the available frequency scaling factors as shown in~\cite{15,3,19}. \section{Optimal scaling factor for performance and energy} \label{sec.optim} -Algorithm~\ref{EPSA} computes the optimal scaling factor according to the -objective function described above. -\begin{algorithm}[tp] - \caption{Scaling factor selection algorithm} - \label{EPSA} +Algorithm on Figure~\ref{EPSA} computes the optimal scaling factor according to +the objective function described above. +\begin{figure}[tp] \begin{algorithmic}[1] - \State Initialize the variable $Dist=0$ + % \footnotesize + \State Initialize the variable $\Dist=0$ \State Set dynamic and static power values. - \State Set $P_{states}$ to the number of available frequencies. - \State Set the variable $F_{new}$ to max. frequency, $F_{new} = F_{max} $ - \State Set the variable $F_{diff}$ to the difference between two successive + \State Set $\Pstates$ to the number of available frequencies. + \State Set the variable $\Fnew$ to max. frequency, $\Fnew = \Fmax $ + \State Set the variable $\Fdiff$ to the difference between two successive frequencies. - \For {$j:=1$ to $P_{states} $} - \State $F_{new}=F_{new} - F_{diff} $ - \State $S = \frac{F_\textit{max}}{F_\textit{new}}$ + \For {$j := 1$ to $\Pstates $} + \State $\Fnew = \Fnew - \Fdiff $ + \State $S = \frac{\Fmax}{\Fnew}$ \State $S_i = S \cdot \frac{T_1}{T_i} - = \frac{F_\textit{max}}{F_\textit{new}} \cdot \frac{T_1}{T_i}$ + = \frac{\Fmax}{\Fnew} \cdot \frac{T_1}{T_i}$ for $i=1,\dots,N$ - \State $E_\textit{Norm} = - \frac{P_\textit{dyn} \cdot S_1^{-2} \cdot + \State $\Enorm = + \frac{\Pdyn \cdot S_1^{-2} \cdot \left( T_1 + \sum_{i=2}^{N}\frac{T_i^3}{T_1^2}\right) + - P_\textit{static} \cdot T_1 \cdot S_1 \cdot N }{ - P_\textit{dyn} \cdot + \Pstatic \cdot T_1 \cdot S_1 \cdot N }{ + \Pdyn \cdot \left(T_1+\sum_{i=2}^{N}\frac{T_i^3}{T_1^2}\right) + - P_\textit{static} \cdot T_1 \cdot N }$ - \State $P_{NormInv}=T_{old}/T_{new}$ - \If{$(P_{NormInv}-E_{Norm} > Dist)$} - \State $S_{opt} = S$ - \State $Dist = P_{NormInv} - E_{Norm}$ + \Pstatic \cdot T_1 \cdot N }$ + \State $\PnormInv = \Told / \Tnew$ + \If{$(\PnormInv - \Enorm > \Dist)$} + \State $\Sopt = S$ + \State $\Dist = \PnormInv - \Enorm$ \EndIf \EndFor - \State Return $S_{opt}$ + \State Return $\Sopt$ \end{algorithmic} -\end{algorithm} + \caption{Scaling factor selection algorithm} + \label{EPSA} +\end{figure} The proposed algorithm works online during the execution time of the MPI program. It selects the optimal scaling factor after gathering the computation and communication times from the program after one iteration. Then the program changes the new frequencies of the CPUs according to the computed scaling -factors. In our experiments over a homogeneous cluster described in section~\ref{sec.expe}, -this algorithm has a small execution time. It takes \np[$\mu$s]{1.52} on average for 4 nodes and -\np[$\mu$s]{6.65} on average for 32 nodes. The algorithm complexity is $O(F\cdot -N)$, where $F$ is the number of available frequencies and $N$ is the number of -computing nodes. The algorithm is called just once during the execution of the -program. The DVFS algorithm~(\ref{dvfs}) shows where and when the algorithm is -called in the MPI program. +factors. In our experiments over a homogeneous cluster described in +Section~\ref{sec.expe}, this algorithm has a small execution time. It takes +\np[$\mu$s]{1.52} on average for 4 nodes and \np[$\mu$s]{6.65} on average for 32 +nodes. The algorithm complexity is $O(F\cdot N)$, where $F$ is the number of +available frequencies and $N$ is the number of computing nodes. The algorithm +is called just once during the execution of the program. The DVFS algorithm on +Figure~\ref{dvfs} shows where and when the algorithm is called in the MPI +program. %\begin{table}[htb] % \caption{Platform file parameters} % % title of Table @@ -450,42 +476,43 @@ called in the MPI program. % \label{table:platform} %\end{table} -\begin{algorithm}[tp] - \caption{DVFS} - \label{dvfs} +\begin{figure}[tp] \begin{algorithmic}[1] + % \footnotesize \For {$k:=1$ to \textit{some iterations}} \State Computations section. \State Communications section. \If {$(k=1)$} \State Gather all times of computation and\newline\hspace*{3em}% communication from each node. - \State Call algorithm~\ref{EPSA} with these times. + \State Call algorithm from Figure~\ref{EPSA} with these times. \State Compute the new frequency from the\newline\hspace*{3em}% returned optimal scaling factor. \State Set the new frequency to the CPU. \EndIf \EndFor \end{algorithmic} -\end{algorithm} + \caption{DVFS algorithm} + \label{dvfs} +\end{figure} After obtaining the optimal scaling factor, the program calculates the new frequency $F_i$ for each task proportionally to its time value $T_i$. By -substitution of EQ~(\ref{eq:s}) in EQ~(\ref{eq:si}), we can calculate the new +substitution of EQ~\eqref{eq:s} in EQ~\eqref{eq:si}, we can calculate the new frequency $F_i$ as follows: \begin{equation} \label{eq:fi} - F_i = \frac{F_\textit{max} \cdot T_i}{S_\textit{optimal} \cdot T_\textit{max}} + F_i = \frac{\Fmax \cdot T_i}{\Sopt \cdot \Tmax} \end{equation} According to this equation all the nodes may have the same frequency value if they have balanced workloads, otherwise, they take different frequencies when -having imbalanced workloads. Thus, EQ~(\ref{eq:fi}) adapts the frequency of the +having imbalanced workloads. Thus, EQ~\eqref{eq:fi} adapts the frequency of the CPU to the nodes' workloads to maintain the performance of the program. \section{Experimental results} \label{sec.expe} Our experiments are executed on the simulator SimGrid/SMPI v3.10. We configure the simulator to use a homogeneous cluster with one core per node. -%The detailed characteristics of our platform file are shown in Table~(\ref{table:platform}). +%The detailed characteristics of our platform file are shown in Table~\ref{table:platform}. Each node in the cluster has 18 frequency values from \np[GHz]{2.5} to \np[MHz]{800} with \np[MHz]{100} difference between each two successive frequencies. The nodes are connected via an ethernet network with 1Gbit/s bandwidth. @@ -493,25 +520,25 @@ two successive frequencies. The nodes are connected via an ethernet network with \subsection{Performance prediction verification} In this section we evaluate the precision of our performance prediction method -based on EQ~(\ref{eq:tnew}) by applying it to the NAS benchmarks. The NAS programs +based on EQ~\eqref{eq:tnew} by applying it to the NAS benchmarks. The NAS programs are executed with the class B option to compare the real execution time with the predicted execution time. Each program runs offline with all available scaling factors on 8 or 9 nodes (depending on the benchmark) to produce real execution time values. These scaling factors are computed by dividing the -maximum frequency by the new one see EQ~(\ref{eq:s}). +maximum frequency by the new one see EQ~\eqref{eq:s}. \begin{figure} \centering - \includegraphics[width=.24\textwidth]{fig/cg_per}\hfill% - % \includegraphics[width=.328\textwidth]{fig/mg_pre}\hfill% - % \includegraphics[width=.4\textwidth]{fig/bt_pre}\qquad% - \includegraphics[width=.24\textwidth]{fig/lu_pre}\hfill% + \includegraphics[width=.5\linewidth]{fig/cg_per}\hfill% + % \includegraphics[width=.5\linewidth]{fig/mg_pre}\hfill% + % \includegraphics[width=.5\linewidth]{fig/bt_pre}\qquad% + \includegraphics[width=.5\linewidth]{fig/lu_pre}\hfill% \caption{Comparing predicted to real execution times} \label{fig:pred} \end{figure} %see Figure~\ref{fig:pred} In our cluster there are 18 available frequency states for each processor. This leads to 18 run states for each program. We use seven MPI programs of the NAS -parallel benchmarks: CG, MG, EP, FT, BT, LU and SP. Figure~(\ref{fig:pred}) +parallel benchmarks: CG, MG, EP, FT, BT, LU and SP. Figure~\ref{fig:pred} presents plots of the real execution times and the simulated ones. The maximum normalized error between these two execution times varies between \np{0.0073} to \np{0.031} dependent on the executed benchmark. The smallest prediction error @@ -522,47 +549,48 @@ The proposed algorithm was applied to seven MPI programs of the NAS benchmarks (EP, CG, MG, FT, BT, LU and SP) which were run with three classes (A, B and C). For each instance the benchmarks were executed on a number of processors proportional to the size of the class. Each class represents the problem size -ascending from class A to C. Additionally, depending on some speed up -points for each class we run the classes A, B and C on 4, 8 or 9 and 16 nodes -respectively. Depending on EQ~(\ref{eq:energy}), we measure the energy -consumption for all the NAS MPI programs while assuming that the dynamic power with -the highest frequency is equal to \np[W]{20} and the power static is equal to -\np[W]{4} for all experiments. These power values were also used by Rauber and -Rünger in~\cite{3}. The results showed that the algorithm selected different -scaling factors for each program depending on the communication features of the -program as in the plots~(\ref{fig:nas}). These plots illustrate that there are -different distances between the normalized energy and the normalized inverted -performance curves, because there are different communication features for each -benchmark. When there are little or no communications, the inverted -performance curve is very close to the energy curve. Then the distance between -the two curves is very small. This leads to small energy savings. The opposite -happens when there are a lot of communication, the distance between the two -curves is big. This leads to more energy savings (e.g. CG and FT), see -Table~(\ref{table:compareC}). All discovered frequency scaling factors -optimize both the energy and the performance simultaneously for all NAS -benchmarks. In Table~(\ref{table:compareC}), we record all optimal -scaling factors results for each benchmark running class C. These scaling -factors give the maximum energy saving percentage and the minimum performance -degradation percentage at the same time from all available scaling factors. +ascending from class A to C. Additionally, depending on some speed up points +for each class we run the classes A, B and C on 4, 8 or 9 and 16 nodes +respectively. Depending on EQ~\eqref{eq:energy}, we measure the energy +consumption for all the NAS MPI programs while assuming that the dynamic power +with the highest frequency is equal to \np[W]{20} and the power static is equal +to \np[W]{4} for all experiments. These power values were also used by Rauber +and Rünger in~\cite{3}. The results showed that the algorithm selected +different scaling factors for each program depending on the communication +features of the program as in the plots from Figure~\ref{fig:nas}. These plots +illustrate that there are different distances between the normalized energy and +the normalized inverted performance curves, because there are different +communication features for each benchmark. When there are little or no +communications, the inverted performance curve is very close to the energy +curve. Then the distance between the two curves is very small. This leads to +small energy savings. The opposite happens when there are a lot of +communication, the distance between the two curves is big. This leads to more +energy savings (e.g. CG and FT), see Table~\ref{table:compareC}. All discovered +frequency scaling factors optimize both the energy and the performance +simultaneously for all NAS benchmarks. In Table~\ref{table:compareC}, we record +all optimal scaling factors results for each benchmark running class C. These +scaling factors give the maximum energy saving percentage and the minimum +performance degradation percentage at the same time from all available scaling +factors. \begin{figure*}[t] \centering - \includegraphics[width=.33\textwidth]{fig/ep}\hfill% - \includegraphics[width=.33\textwidth]{fig/cg}\hfill% - % \includegraphics[width=.328\textwidth]{fig/sp} - % \includegraphics[width=.328\textwidth]{fig/lu}\hfill% - \includegraphics[width=.33\textwidth]{fig/bt}\hfill% - % \includegraphics[width=.328\textwidth]{fig/ft} + \includegraphics[width=.33\linewidth]{fig/ep}\hfill% + \includegraphics[width=.33\linewidth]{fig/cg}\hfill% + % \includegraphics[width=.328\linewidth]{fig/sp} + % \includegraphics[width=.328\linewidth]{fig/lu}\hfill% + \includegraphics[width=.33\linewidth]{fig/bt} + % \includegraphics[width=.328\linewidth]{fig/ft} \caption{Optimal scaling factors for the predicted energy and performance of NAS benchmarks} \label{fig:nas} \end{figure*} -As shown in Table~(\ref{table:compareC}), when the optimal scaling -factor has a big value we can gain more energy savings as in CG and -FT benchmarks. The opposite happens when the optimal scaling factor has a -small value as in BT and EP benchmarks. Our algorithm selects a big scaling -factor value when the communication and the other slacks times are big and smaller -ones in opposite cases. In EP there are no communication inside the iterations. -This leads our algorithm to select smaller scaling factor values (inducing smaller energy +As shown in Table~\ref{table:compareC}, when the optimal scaling factor has a +big value we can gain more energy savings as in CG and FT benchmarks. The +opposite happens when the optimal scaling factor has a small value as in BT and +EP benchmarks. Our algorithm selects a big scaling factor value when the +communication and the other slacks times are big and smaller ones in opposite +cases. In EP there are no communication inside the iterations. This leads our +algorithm to select smaller scaling factor values (inducing smaller energy savings). \subsection{Results comparison} @@ -570,12 +598,12 @@ savings). In this section, we compare our scaling factor selection method with Rauber and Rünger methods~\cite{3}. They had two scenarios, the first is to reduce energy to the optimal level without considering the performance as in -EQ~(\ref{eq:sopt}). We refer to this scenario as $R_{E}$. The second scenario +EQ~\eqref{eq:sopt}. We refer to this scenario as $R_{E}$. The second scenario is similar to the first except setting the slower task to the maximum frequency (when the scale $S=1$) to keep the performance from degradation as mush as possible. We refer to this scenario as $R_{E-P}$. While we refer to our algorithm as EPSA (Energy to Performance Scaling Algorithm). The comparison is -made in Table ~\ref{table:compareC}. This table shows the results of our method and +made in Table~\ref{table:compareC}. This table shows the results of our method and Rauber and Rünger scenarios for all the NAS benchmarks programs for class C. \begin{table} @@ -635,9 +663,9 @@ while Rauber and Rünger's method, ($R_{E-P}$), gives sometimes negative trade-offs such as in BT and EP. \begin{figure}[t] \centering -% \includegraphics[width=.328\textwidth]{fig/compare_class_A} -% \includegraphics[width=.328\textwidth]{fig/compare_class_B} - \includegraphics[width=.49\textwidth]{fig/compare_class_C} +% \includegraphics[width=.328\linewidth]{fig/compare_class_A} +% \includegraphics[width=.328\linewidth]{fig/compare_class_B} + \includegraphics[width=\linewidth]{fig/compare_class_C} \caption{Comparing our method to Rauber and Rünger's methods} \label{fig:compare} \end{figure}