X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/ThesisAhmed.git/blobdiff_plain/157e6b15b1550a7c982f80d31c4bd17f5b8eab04..08fd1453cc5e5821d785ef1e3ff67047421e4f1b:/CHAPITRE_02.tex

diff --git a/CHAPITRE_02.tex b/CHAPITRE_02.tex
index 5e48cd3..48ea63c 100644
--- a/CHAPITRE_02.tex
+++ b/CHAPITRE_02.tex
@@ -34,18 +34,18 @@ trade-off between energy reduction and performance. This chapter presents an alg
 that predicts the energy consumed with each frequency gear and selects the one that gives 
 the best ratio between energy consumption reduction and performance. Furthermore, the main
 objective of HPC systems is to execute as fast as possible the application. Therefore, our 
-algorithm selects the scaling factor online with very small overhead.  The proposed algorithm 
-takes into account both the computation and communication times of the Message passing 
-programs (MPI) to choose the frequency scaling factor. 
+algorithm selects the scaling factor online with a very small overhead.  The proposed algorithm 
+takes into account both the computation and communication times of the Message Passing 
+Interface  (MPI) programs to choose the frequency scaling factor. 
 This algorithm has the ability to predict both energy consumption and execution time over 
 all available scaling factors.  The prediction achieved depends on some computing time information,
 gathered at the beginning of the runtime.  We have applied this algorithm to the NAS parallel 
-benchmarks (NPB v3.3) developed by NASA~\cite{ref65}.  Our experiments are executed using the simulator
+benchmarks (NPB v3.3) developed by the  NASA~\cite{ref65}.  Our experiments are executed using the simulator
 SimGrid/SMPI v3.10~\cite{ref66} over an homogeneous
 distributed memory architecture. 
 
-This chapter is composed of two parts. The first part, the proposed frequency scaling selection algorithm  uses the energy model of the Rauber and RÃ¼nger \cite{ref47}. and  is compared to Rauber and RÃ¼nger's method.  The comparison results show that our algorithm gives better energy-time trade-off. In the second part,  a new energy model  that takes into account both the communication and computation times of the MPI programs running over a homogeneous cluster is developed.
-It  also shows the new results obtained using the new energy model. The results are compared to the  ones given by Rauber and RÃ¼nger energy model.  
+This chapter is composed of two parts. The first part, the proposed frequency scaling selection algorithm  uses the energy model of the Rauber and RÃ¼nger \cite{ref47} and  is compared to Rauber and RÃ¼nger's method.  The comparison results show that our algorithm gives better energy-time trade-off. In the second part,  a new energy model  that takes into account both the communication and computation times of the MPI programs running over a homogeneous cluster is developed.
+It  also shows the new results obtained using the new energy model. The results are compared to the  ones given by Rauber and RÃ¼nger's energy model.  
 
 
 This chapter is organized as follows:  Section~\ref{ch2:2} explains the execution
@@ -58,7 +58,7 @@ Section~\ref{ch2:5} details the algorithm that returns the scaling factor that g
 trade-off for a parallel iterative application.
 Section~\ref{ch2:6} verifies the accuracy of the performance prediction model
 and presents the results of the proposed algorithm.  It also shows the
-comparison results between our method and other existing method.  
+comparison results between our method and other existing methods.  
 Section~\ref{ch2:7} describes the new proposed energy consumption model for 
 homogeneous platforms. Section~\ref{ch2:8} presents the experimental results 
 of using the new energy model. Finally,  section~\ref{ch2:9} summarizes this chapter.
@@ -190,7 +190,7 @@ concurrently on different processors.
 \subsection{Energy consumption model for a homogeneous platform}
 \label{ch2:2:2}
 
-The total energy consumption model for a parallel homogeneous
+The total energy  for a parallel homogeneous
 platform, as presented by Rauber and RÃ¼nger~\cite{ref47}, can be written as a
 function of the scaling factor $S$, as in EQ~\ref{eq:energy}.
 Moreover, the scaling factor $S_1$ is the scaling factor which should be the
@@ -200,7 +200,7 @@ factors of the others tasks $S_i$ are computed as in EQ~\ref{eq:si}.
 \begin{equation}
   \label{eq:si}
   S_i = S \cdot \frac{T_1}{T_i}
-      = \frac{F_{max}}{F_{new}} \cdot \frac{T_1}{T_i}
+      = \frac{F_{max}}{F_{new}} \cdot \frac{T_1}{T_i},~{i=1,2,\dots,N}
 \end{equation}
 
 Rauber and RÃ¼nger's scaling factor selection
@@ -443,12 +443,29 @@ maximum frequency by the new one see EQ~(\ref{eq:s}).
 %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.  Seven MPI programs of the NAS
-parallel benchmarks were used: CG, MG, EP, FT, BT, LU and SP.~Figure~(\ref{fig:pred})
-presents plots of the real execution times compared to the simulated ones.  The maximum
+parallel benchmarks were used: CG, MG, EP, FT, BT, LU and SP. Table \ref{table:NAS-dec} shows 
+the description of these seven benchmarks. 
+Figure~(\ref{fig:pred}) presents plots of the real execution times compared to the simulated ones.  The maximum
 normalized error between these two execution times varies between 0.0073 to
 0.031 depending on the executed benchmark.  The smallest prediction error
 was for CG and the worst one was for LU.
 
+\begin{table}[!t]
+\centering
+\caption{NAS Benchmarks description}
+\label{table:NAS-dec}
+\begin{tabular}{|l|l|l|}
+\hline
+Benchmark & Full Name                                                                     & Description                                                                                                                                                                                                                                                                     \\ \hline
+CG        & Conjugate Gradiant                                                            & \begin{tabular}[c]{@{}l@{}}Estimate the smallest eigenvalue of a large \\ sparse  symmetric positive-definite matrix \\ using the  inverse iteration with the conjugate \\ gradient method as a subroutine for solving \\ systems of linear equations\end{tabular}              \\ \hline
+MG        & MultiGrid                                                                     & \begin{tabular}[c]{@{}l@{}}Approximate the solution to a three-dimensional \\ discrete Poisson equation using the V-cycle \\ multigrid method\end{tabular}                                                                                                                      \\ \hline
+EP        & Embarrassingly Parallel                                                       & \begin{tabular}[c]{@{}l@{}}Generate independent Gaussian random \\ variates using the Marsaglia polar method\end{tabular}                                                                                                                                                       \\ \hline
+FT        & Fast Fourier Transform                                                        & \begin{tabular}[c]{@{}l@{}}Solve a three-dimensional partial differential\\ equation (PDE) using the fast Fourier transform \\ (FFT)\end{tabular}                                                                                                                               \\ \hline
+BT        & Block Tridiagonal                                                             & \multirow{3}{*}{\begin{tabular}[c]{@{}l@{}}Solve a synthetic system of nonlinear PDEs \\ using three different algorithms involving \\ block tridiagonal, scalar pentadiagonal and \\ symmetric successive over-relaxation \\ (SSOR) solver kernels, respectively\end{tabular}} \\ \cline{1-2}
+LU        & \begin{tabular}[c]{@{}l@{}}Lower-Upper symmetric \\ Gauss-Seidel\end{tabular} &                                                                                                                                                                                                                                                                                 \\ \cline{1-2}
+SP        & \begin{tabular}[c]{@{}l@{}}Scalar \\ Pentadiagonal\end{tabular}               &                                                                                                                                                                                                                                                                                 \\ \hline
+\end{tabular}
+\end{table}
 
 \subsection{The experimental results for the scaling algorithm }
 \label{ch2:6:2}
@@ -522,8 +539,8 @@ communication and  other slacks times are big.  In EP there are no communication
 
 \subsection{Results comparison}
 \label{ch2:6:3}
-In this section, we compare our scaling factor selection method with Rauber and
-RÃ¼nger's methods~\cite{ref47}.  They had two scenarios, the first is to reduce energy
+In this section, we compare our scaling factor selection method with the Rauber and
+RÃ¼nger's method~\cite{ref47}.  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
 is similar to the first except setting the slower task to the maximum frequency
@@ -531,7 +548,7 @@ is similar to the first except setting the slower task to the maximum frequency
 possible.  We refer to this scenario as $R_{E-P}$ and 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
-Rauber and RÃ¼nger scenarios for all the NAS benchmarks programs for class C.
+the Rauber and RÃ¼nger's scenarios for all the NAS benchmarks programs for class C.
 
 \begin{table}[h!]
   \caption{Comparing results for the NAS class C}
@@ -594,11 +611,11 @@ factor is not optimal for energy reduction, the results in these tables prove
 that our algorithm returns the best scaling factor that satisfy our objective
 method: the largest distance between energy reduction and performance
 degradation. Figure~\ref{fig:compare}  illustrates even better the distance between the energy reduction and performance degradation. The negative values mean that one of
-the two objectives (energy or performance) have been degraded more than the 
+the two objectives (energy or performance) has been degraded more than the 
 other.  The positive trade-offs with the highest values lead to maximum energy
 savings while keeping the performance degradation as low as possible.  Our
 algorithm always gives the highest positive energy to performance trade-offs
-while Rauber and RÃ¼nger's method, ($R_{E-P}$), gives sometimes negative
+while the Rauber and RÃ¼nger's method, ($R_{E-P}$), gives sometimes negative
 trade-offs such as for BT and EP.
 
 
@@ -619,7 +636,7 @@ 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
 communication, no slack time and no synchronization.
 
-Applying a DVFS operation leads to a new frequency state which is represented by the frequency scaling factor $S$, computed as in the equation \ref{eq:s}. According to  Rauber and RÃ¼nger's energy model \ref{eq:energy}, the dynamic energy is consumed during the overall program's execution time. This assumption is not precise because the CPU  only consumes the dynamic power during computation time. Moreover, the CPU involved remains idle during the communication times and only consumes the static power, see \cite{ref53}. We have also conducted some experiments over a real homogeneous cluster where some MPI programs of the NAS  benchmarks were executed while varying the CPUs frequencies at each execution. The results prove that  changing the frequency do not effect on the communication times of these programs.  Therefore, the frequency scaling factor $S$ can increase the computation times  proportionally to its value,  and do not  effect the communication times. This assumption consort with the used performance prediction model \ref{eq:tnew}. This model is evaluated and its prediction accuracy is showed in section \ref{ch2:6:1}. Therefore, the new dynamic energy is the dynamic power multiplied by the new time of computation and is given by the following equation:
+Applying a DVFS operation leads to a new frequency state which is represented by the frequency scaling factor $S$, computed as in the equation \ref{eq:s}. According to  Rauber and RÃ¼nger's energy model \ref{eq:energy}, the dynamic energy is consumed during the overall program's execution time. This assumption is not precise because the CPU  only consumes the dynamic power during computation time. Moreover, the CPU involved remains idle during the communication times and only consumes the static power, see \cite{ref53}. We have also conducted some experiments over a real homogeneous cluster where some MPI programs of the NAS  benchmarks were executed while varying the CPUs frequencies at each execution. The results prove that  changing the frequency does not effect on the communication times of these programs.  Therefore, the frequency scaling factor $S$ can increase the computation times  proportionally to its value,  and does not  effect the communication times. This assumption consort with the used performance prediction model \ref{eq:tnew}. This model is evaluated and its prediction accuracy is showed in section \ref{ch2:6:1}. Therefore, the new dynamic energy is the dynamic power multiplied by the new time of computation and is given by the following equation:
 
 \begin{equation}
   \label{eq:Edyn_new}
@@ -662,11 +679,11 @@ In the next section,  algorithm \ref{EPSA} is re-evaluated while using this new
 \label{ch2:8}
 
 This section presents the results of applying the frequency selection algorithm \ref{EPSA} using the new proposed energy model \ref{eq:e-new} to NAS parallel benchmarks.
-The class C of the benchmarks was executed on a homogeneous architecture composed of 16 nodes and simulated by SimGrid. The same  static and dynamic power values were used as in section \ref{ch2:6:2}. Figure \ref{fig:energy_con} presents the energy consumption of the NAS benchmarks class C using the new energy model and Rauber and RÃ¼nger's model. The energy consumptions of both models are computed using similar parameters:  frequency scaling factors, dynamic and static powers values. As shown in this figure,  the majority  of the benchmarks  consumes less energy using the new model than when using   Rauber and RÃ¼nger's model.
+The class C of the benchmarks was executed on a homogeneous architecture composed of 16 nodes and simulated by SimGrid. The same  static and dynamic power values were used as in section \ref{ch2:6:2}. Figure \ref{fig:energy_con} presents the energy consumption of the NAS benchmarks class C using the new energy model and the Rauber and RÃ¼nger's model. The energy consumptions of both models are computed using similar parameters:  frequency scaling factors, dynamic and static powers values. As shown in this figure,  the majority  of the benchmarks  consumes less energy using the new model than when using the Rauber and RÃ¼nger's model.
 Two reasons explain these differences in the energy consumptions: the first one is related to the dynamic power consumption, where the new energy model ensures that this power metric is only consumed  during the computation time, while  the other model assumes that the dynamic power is consumed during both computation and communication times and thus increasing the dynamic energy consumption.
 The second reason is related to the execution time. In the new model only the computation times are increased when the frequency of a processor is scaled down, while
 Rauber and RÃ¼nger's model indicates that both the computation and communication times 
-are  increased according to the scaling factor and hence more static energy  is consumed.  Therefore, the MPI programs that have big communication times,  have bigger  energy consumption values using  Rauber and RÃ¼nger's model  when compared to the new model as for the CG, SP, LU and FT benchmarks. Whereas, if the MPI programs have very small communication times, their computed energy values have very small differences  using both models such as in  MG and BT benchmarks, or they are identical such as for the  EP benchmark where there is no communication and no idle times. 
+are  increased according to the scaling factor and hence more static energy  is consumed.  Therefore, the MPI programs that have big communication times,  have bigger  energy consumption values using  Rauber and RÃ¼nger's model  when compared to the new model as for the CG, SP, LU and FT benchmarks. Whereas, if the MPI programs have very small communication times, their computed energy values have very small differences  using both models such as for the MG and BT benchmarks, or they are identical such as for the  EP benchmark where there is no communication and no idle times. 
 
 
 \begin{figure*}[h!]
@@ -694,7 +711,7 @@ FT      & 1.47      & 34.72       & 19.00       & 1.38       & 29.94       & 17.
 \label{table:new-res}
 \end{table}
 
-Table \ref{table:new-res} shows  the energy saving and performance degradation percentages when applying the frequency selecting algorithm  using the new proposed  energy model. It also presents the new selected frequency scaling factors and compares them to the ones used by Rauber and RÃ¼nger's model. It shows  that the new selected frequency scaling factors are smaller than  those selected using the other model because the predicted energies by the new energy model are smaller.
+Table \ref{table:new-res} shows  the energy saving and performance degradation percentages when applying the frequency selecting algorithm  using the new proposed  energy model. It also presents the new selected frequency scaling factors and compares them to the ones used by the Rauber and RÃ¼nger's model. It shows  that the new selected frequency scaling factors are smaller than  those selected using the other model because the predicted energies by the new energy model are smaller.
 Consequently, less energy savings and performance degradation percentages are produced according to 
 these smaller frequency scaling factors such as for the  CG, MG, LU, SP and FT benchmarks. While in the BT and EP benchmarks where there are very small or no communication times, similar scaling factors are selected because the predicted energies by the two models are approximately equivalent. 
 
@@ -713,9 +730,9 @@ consumption and the performance of the parallel application at every available
 frequency.  Then, it selects the scaling factor that gives the best trade-off
 between energy reduction and performance which is the maximum distance between
 the energy and the performance curves.  To evaluate this method, we
-have applied it to the NAS benchmarks and it was compared to Rauber and RÃ¼nger's 
+have applied it to the NAS benchmarks and it was compared to the Rauber and RÃ¼nger's 
 method while being executed on the SimGrid simulator.  The results showed that
-our method, outperforms Rauber and RÃ¼nger's method in terms of energy-performance
+our method, outperforms the Rauber and RÃ¼nger's method in terms of energy-performance
 ratio. Finally, this chapter presents a new energy consumption model for  parallel
 synchronous iterative methods running on homogeneous clusters. This model takes into consideration 
 both  the computation and communication times and their relation with the frequency scaling 
