X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/ThesisAhmed.git/blobdiff_plain/90c5d630943ca27e6ed19e347121d03ecaad5913..6cf036289534723c4e0d498aca01e42d3da71e1e:/CHAPITRE_03.tex?ds=sidebyside diff --git a/CHAPITRE_03.tex b/CHAPITRE_03.tex index 39eb9a8..953bcfc 100644 --- a/CHAPITRE_03.tex +++ b/CHAPITRE_03.tex @@ -51,12 +51,12 @@ Computing platforms are consuming more and more energy due to the increasing - number of nodes composing them. In the heterogeneous computing platform composed - of multiple computing nodes, each node is different in the computing power from - the others. Accordingly, the fast nodes have to waits to the slow ones to finish - their works. The resulting waiting times is called the idle times that are increased + number of nodes composing them. In a heterogeneous computing platform composed + of multiple computing nodes, nodes may differ in the computing power from + each others. Accordingly, the fast nodes have to wait for the slow ones to finish + their works. The resulting waiting times are called idle times which are increased proportionally to the increase in the heterogeneity between the computing nodes. - This leads to a big waste in the computing power and thus the energy consumed by the fast nodes. + This leads to a big waste in the computing power and thus the energy consumed by fast nodes. To minimize the operating costs of these platforms many techniques have been used. Dynamic voltage and frequency scaling (DVFS) is one of them. It reduces the frequency of a CPU to lower its energy consumption. However, lowering the frequency of a CPU may @@ -65,29 +65,29 @@ the performance of an application must be selected. In this chapter, two new online frequency selecting algorithms for heterogeneous local - cluster (heterogeneous CPUs) and grid platform are presented. - They select the frequencies that tray to give the best + clusters (heterogeneous CPUs) and grid platforms are presented. + They select the frequencies that try to give the best trade-off between energy saving and performance degradation, for each node - computing the synchronous message passing iterative application. These algorithms have a small + computing the synchronous message passing application with iterations. These algorithms have a small overhead and work without training or profiling. They use new energy models - for message passing iterative synchronous applications running on both the heterogeneous - local cluster and grid platform. The first proposed algorithm for a heterogeneous local - cluster is evaluated on the SimGrid simulator while running the NAS parallel - benchmarks class C. The experiments conducted over 8 heterogeneous nodes show that it reduces on - average the energy consumption by 29.8\% while limiting the performance degradation by 3.8\%. - The second proposed algorithm for a grid platform is evaluated on the Grid5000 testbed - platform while running the NAS parallel benchmarks class D. - Its experiments on 16 nodes, distributed on three clusters, show that it reduces on average the - energy consumption by 30\% while the performance is on average only degraded + for message passing synchronous applications with iterations running on both the heterogeneous + local cluster and the grid platform. The first proposed algorithm for a heterogeneous local + cluster was evaluated on the SimGrid simulator while running the class C of the NAS parallel + benchmarks. The experiments conducted over 8 heterogeneous nodes show that it reduces on + average the energy consumption by 29.8\% while limiting the performance degradation to 3.8\%. + The second proposed algorithm for a grid platform was evaluated on the Grid5000 testbed + platform while running the class D of the NAS parallel benchmarks. + The experiments were run on 16 nodes, distributed on three clusters, and show that the algorithm reduces + on average the energy consumption by 30\% while the performance is on average only degraded by 3.2\%. - Finally, both the two algorithms are compared to an existing methods, the comparison - results show that they outperform the latter in term of energy and performance trade-off. + Finally, both algorithms were compared to the EDP method. The comparison + results show that they outperform the latter in the energy reduction and performance trade-off. This chapter is organized as follows: Section~\ref{ch3:relwork} presents some related works from other authors. Section~\ref{ch3:1} presents the performance and energy models of synchronous message passing programs running over a heterogeneous local cluster. -It also describes the proposed frequencies selecting algorithm then the precision of the proposed algorithm is verified. +It also describes the proposed frequency selecting algorithm then the precision of the proposed algorithm is verified. Section~\ref{ch3:2} presents the simulation results of applying the algorithm on the NAS parallel benchmarks class C and executing them on a heterogeneous local cluster. It shows the results of running three different power scenarios and comparing them. Moreover, it also shows the @@ -95,19 +95,14 @@ comparison results between the proposed method and an existing method. Section~\ref{ch3:3} shows the energy and performance models in addition to the frequencies selecting algorithm of synchronous message passing programs running over a grid platform. Section~\ref{ch3:4} presents the results of applying the algorithm on the -NAS parallel benchmarks class D and executing them on the Grid'5000 testbed. -It also evaluates the algorithm over multi-cores per node architectures and over three different power scenarios. Moreover, it shows the comparison results between the proposed method and an existing method. +NAS parallel benchmarks (class D) and executing them on the Grid'5000 testbed. +The algorithm is also evaluated over multi-core architectures and over three different power scenarios. Moreover, Section~\ref{ch3:4}, shows the comparison results between the proposed method and the EDP method. Finally, in Section~\ref{ch3:concl} the chapter ends with a summary. \section{Related works} \label{ch3:relwork} -DVFS is a technique used in modern processors to scale down both the voltage and -the frequency of the CPU while computing, in order to reduce the energy -consumption of the processor. DVFS is also allowed in GPUs to achieve the same -goal. Reducing the frequency of a processor lowers its number of FLOPS and may -degrade the performance of the application running on that processor, especially -if it is compute bound. Therefore selecting the appropriate frequency for a +The process of selecting the appropriate frequency for a processor to satisfy some objectives, while taking into account all the constraints, is not a trivial operation. Many researchers used different strategies to tackle this problem. Some of them developed online methods that @@ -122,9 +117,9 @@ adapted to the execution's environment and the type of the application such as sequential, parallel or distributed architecture, homogeneous or heterogeneous platform, synchronous or asynchronous application, \dots{} -In this chapter, we are interested in reducing energy for message passing -iterative synchronous applications running over heterogeneous platforms. Some -works have already been done for such platforms and they can be classified into +In this chapter, we are interested in reducing the energy consumption when running a message passing +synchronous applications with iterations over a heterogeneous platform. Some +works have already been done for such platforms which can be classified into two types of heterogeneous platforms: \begin{itemize} \item the platform is composed of homogeneous GPUs and homogeneous CPUs. @@ -142,7 +137,7 @@ workloads proportional to the computing power of the nodes which could be a GPU or a CPU. All the tasks must be completed at the same time. In~\cite{ref70}, Rong et al. showed that a heterogeneous (GPUs and CPUs) cluster that enables -DVFS gave better energy and performance efficiency than other clusters only +DVFS operations gave better energy and performance efficiency than other clusters only composed of CPUs. The work presented in this chapter concerns the second type of platform, with @@ -163,37 +158,37 @@ use a gradient method to predict the impact of DVFS operations on performance. In~\cite{ref74} and \cite{ref75}, the best frequencies for a specified heterogeneous cluster are selected offline using -some heuristic. Chen et +on heuristic. Chen et al.~\cite{ref76} used a greedy dynamic programming approach to minimize the power consumption of heterogeneous servers -while respecting given time constraints. This approach had considerable +while respecting the given time constraint. This approach had considerable overhead. In contrast to the above described works, the work of this chapter presents the following contributions: \begin{enumerate} -\item two new energy and two performance models for message passing iterative - synchronous applications running over a heterogeneous local cluster and grid platform. - All the models take into account communication and slack times. The models can predict the - required energy and the execution time of the application. +\item two new energy and two performance models for message passing + synchronous applications with iterations running over a heterogeneous local cluster and a grid platform. + All the models take into account the communications and the slack times. The models can predict the + energy consumption and the execution time of the application. -\item two new online frequencies selecting algorithms for heterogeneous - local cluster and grid platform. The algorithms have a very small overhead and do not need any +\item two new online frequencies selecting algorithms for a heterogeneous + local cluster and a grid platform. The algorithms have a very small overhead and do not need any training or profiling. They use a new optimization function which simultaneously maximizes the performance and minimizes the energy consumption - of a message passing iterative synchronous application. + of a message passing synchronous application with iterations. \end{enumerate} -\section[The energy optimization of heterogeneous cluster]{The energy optimization of parallel iterative applications running over local heterogeneous -cluster} +\section[The energy optimization of a heterogeneous cluster]{The energy optimization of parallel applications with iterations running over local heterogeneous +clusters} \label{ch3:1} -\subsection{The execution time of message passing distributed iterative - applications on a heterogeneous local cluster} +\subsection{The execution time of message passing distributed + applications with iterations on a heterogeneous local cluster} \label{ch3:1:1} In this section, we are interested in reducing the energy consumption of message -passing distributed iterative synchronous applications running over -heterogeneous local cluster. A heterogeneous local cluster is defined as a collection of +passing distributed synchronous applications with iterations running over heterogeneous local clusters. +In this work, a heterogeneous local cluster is defined as a collection of heterogeneous computing nodes interconnected via a high speed homogeneous -network. Therefore, each node has different characteristics such as computing +network. Therefore, the nodes may have different characteristics such as computing power (FLOPS), energy consumption, CPU's frequency range, \dots{} but they all have the same network bandwidth and latency. @@ -204,7 +199,7 @@ have the same network bandwidth and latency. \label{fig:task-heter} \end{figure} -The overall execution time of a distributed iterative synchronous application +The overall execution time of a distributed synchronous application with iterations over a heterogeneous local cluster consists of the sum of the computation time and the communication time for every iteration on a node. However, due to the heterogeneous computation power of the computing nodes, slack times may occur @@ -213,8 +208,8 @@ nodes to finish their computations (see Figure~\ref{fig:task-heter}). Therefore overall execution time of the program is the execution time of the slowest task which has the highest computation time and no slack time. -The frequency reduction process by applying DVFS operation can be expressed by the scaling -factor S which is the ratio between the maximum and the new frequency of a CPU +Reducing the frequency of a processor by applying DVFS operation can be expressed by the scaling +factor S which is the ratio between the maximum frequency and the new frequency of a CPU as in (\ref{eq:s}). The execution time of a compute bound sequential program is linearly proportional to the frequency scaling factor $S$. On the other hand, message @@ -227,12 +222,12 @@ communication time for a task is the summation of periods of time that begin with an MPI call for sending or receiving a message until the message is synchronously sent or received. -Since in a heterogeneous cluster each node has different characteristics, +Since in a heterogeneous cluster the nodes may have different characteristics, especially different frequency gears, when applying DVFS operations on these nodes, they may get different scaling factors represented by a scaling vector: $(S_1, S_2,\dots, S_N)$ where $S_i$ is the scaling factor of processor $i$. To -be able to predict the execution time of message passing synchronous iterative -applications running over a heterogeneous local cluster, for different vectors of +be able to predict the execution time of message passing synchronous +applications with iterations running over a heterogeneous local cluster, for different vectors of scaling factors, the communication time and the computation time for all the tasks must be measured during the first iteration before applying any DVFS operation. Then the execution time for one iteration of the application with any @@ -246,40 +241,39 @@ where $\TcpOld[i]$ is the computation time of processor $i$ during the first iteration. The model computes the maximum computation time with scaling factor from each node added to the communication time of the slowest node. It means only the communication time without any slack time is taken into -account. Therefore, the execution time of the iterative application is equal to +account. Therefore, the execution time of the application with iterations is equal to the execution time of one iteration as in (\ref{eq:perf_heter}) multiplied by the number of iterations of that application. -This prediction model is developed from the model to predict the execution time +This prediction model is improved from the model that predicts the execution time of message passing distributed applications for homogeneous -architectures presented in chapter \ref{ch2} section \ref{ch2:3}. The execution time prediction model is -used in the method to optimize both the energy consumption and the performance -of iterative methods, which is presented in the following sections. +architectures presented in Chapter \ref{ch2} Section \ref{ch2:3}. The execution time prediction model is +used in the method that optimizes both the energy consumption and the performance +of parallel application with iterations, which is presented in the following sections. \subsection{Energy model for heterogeneous local cluster} \label{ch3:1:2} -In the chapter \ref{ch2}, the dynamic and the static energy consumption of the individual -processor is computed in \ref{eq:Edyn_new} and \ref{eq:Estatic_new} respectively. Then, -the total energy consumption of the individual processor is the sum of these two metrics. -Therefore, the overall energy consumption for the parallel tasks over parallel cluster -is the summation of the individual energies consumed for all processors. +In Chapter \ref{ch2}, the dynamic and the static energy consumption of a +processor is computed according to Equations \ref{eq:Edyn_new} and \ref{eq:Estatic_new} respectively. Then, the total energy consumption of a processor is the sum of these two metrics. +Therefore, the overall energy consumption for the parallel tasks over a parallel cluster +is the summation of the energies consumed by all the processors. In the considered heterogeneous platform, each processor $i$ may have different dynamic and static powers, noted as $\Pd[i]$ and $\Ps[i]$ -respectively. Therefore, even if the distributed message passing iterative -application is load balanced, the computation time of each CPU $i$ noted +respectively. Therefore, even if the distributed message passing +application with iterations is load balanced, the computation time of each CPU $i$ noted $\Tcp[i]$ may be different and different frequency scaling factors may be computed in order to decrease the overall energy consumption of the application -and reduce slack times. The communication time of a processor $i$ is noted as +and reduce the slack times. The communication time of a processor $i$ is noted as $\Tcm[i]$ and could contain slack times when communicating with slower nodes, -see Figure~\ref{fig:task-heter}. Therefore, all nodes do not have equal +see Figure~\ref{fig:task-heter}. Therefore, all the nodes do not have equal communication times. While the dynamic energy is computed according to the frequency scaling factor and the dynamic power of each node as in (\ref{eq:Edyn_new}), the static energy is computed as the sum of the execution time of one iteration as in \ref{eq:perf_heter} multiplied by the static power of each processor. The overall energy consumption of a message passing distributed application executed over a -heterogeneous cluster during one iteration is the summation of all dynamic and -static energies for each processor. It is computed as follows: +heterogeneous cluster during one iteration is the summation of the dynamic and +static energies for all the processors. It is computed as follows: \begin{equation} \label{eq:energy-heter} E = \sum_{i=1}^{N} {(S_i^{-2} \cdot \Pd[i] \cdot \Tcp[i])} + @@ -289,9 +283,9 @@ static energies for each processor. It is computed as follows: Reducing the frequencies of the processors according to the vector of scaling factors $(S_1, S_2,\dots, S_N)$ may degrade the performance of the application -and thus, increase the static energy because the execution time is +and thus, increase the consumed static energy because the execution time is increased~\cite{ref78}. The overall energy consumption -for the iterative application can be measured by measuring the energy +for an application with iterations can be measured by measuring the energy consumption for one iteration as in (\ref{eq:energy-heter}) multiplied by the number of iterations of that application. @@ -307,19 +301,15 @@ the frequency of all nodes to the minimum and the overall energy consumption of the application might not be the optimal one. It is not trivial to select the appropriate frequency scaling factor for each processor while considering the characteristics of each processor (computation power, range of frequencies, -dynamic and static powers) and the task executed (computation/communication -ratio). The aim being to reduce the overall energy consumption and to avoid -increasing significantly the execution time. In last chapter -~\ref{ch2}, we proposed a method that selects the optimal +dynamic and static powers) and the task it is executing (computation/communication +ratio). In Chapter~\ref{ch2}, we proposed a method that selects the optimal frequency scaling factor for a homogeneous cluster executing a message passing -iterative synchronous application while giving the best trade-off between the -energy consumption and the performance for such applications. In this section, we -are interested in heterogeneous clusters as described above. Due to the -heterogeneity of the processors, a vector of scaling factors should be selected -and it must give the best trade-off between energy consumption and performance. + synchronous application with iterations while giving the best trade-off between the +energy consumption and the performance for such applications. +In this section, this optimization method is improved while considering a heterogeneous clusters. As described before, the relation between the energy consumption and the execution time for an -application is complex and nonlinear. Thus, to find the trade-off relation between the energy consumption in \ref{eq:energy-heter} and the performance in \ref{eq:perf_heter} of the iterative message passing applications, first we need to normalized both of them as follows: +application is complex and nonlinear. Thus, to find the trade-off relation between the energy consumption computed in Equation \ref{eq:energy-heter} and the performance with Equation \ref{eq:perf_heter} for the message passing applications with iterations, first we need to normalize both terms as follows: \begin{equation} @@ -339,31 +329,29 @@ application is complex and nonlinear. Thus, to find the trade-off relation betwe { \max_{i=1,2,\dots,N} (\Tcp[i] \cdot S_{i}) + \min_{i=1,2,\dots,N} (\Tcm[i])} \end{equation} -Therefore, the vector of frequency scaling factors $S_1,S_2,\dots,S_N$ of the heterogeneous -cluster reduce both the energy and the execution time simultaneously. \begin{figure}[!t] \centering \includegraphics[width=.7\textwidth]{fig/ch3/heter} - \caption{The energy and performance relation in Heterogeneous cluster} + \caption{The energy and performance relation in heterogeneous cluster} \label{fig:rel-heter} \end{figure} Then, the objective function can be modeled in order to find the maximum distance between the energy curve (\ref{eq:enorm-heter}) and the performance curve -(\ref{eq:pnorm-heter}) over all available sets of scaling factors of the heterogeneous -computing cluster. This represents the minimum energy consumption with minimum execution time (maximum +(\ref{eq:pnorm-heter}) over all available sets of scaling factors for the processors of the heterogeneous +cluster. This represents the minimum energy consumption with minimum execution time (maximum performance) at the same time, see Figure~\ref{fig:rel-heter}. Then the objective function has the following form: \begin{equation} \label{eq:max-heter} - \MaxDist = - \mathop{\max_{i=1,\dots F}}_{j=1,\dots,N} + \MaxDist = + \mathop{\max_{i=1,\dots N}}_{j=1,\dots,F_i} (\overbrace{\Pnorm(S_{ij})}^{\text{Maximize}} - \overbrace{\Enorm(S_{ij})}^{\text{Minimize}} ) \end{equation} -where $N$ is the number of nodes and $F$ is the number of available frequencies -for each node. Then, the optimal set of scaling factors that satisfies -(\ref{eq:max-heter}) can be selected. +where $N$ is the number of nodes and $F_i$ is the number of available frequencies +for the node $i$. Then, the set of scaling factors that maximizes the objective function +(\ref{eq:max-heter}) should be selected. \subsection[The scaling algorithm for heterogeneous cluster]{The scaling factors selection algorithm for heterogeneous cluster } \label{ch3:1:4} @@ -442,8 +430,8 @@ for each node. Then, the optimal set of scaling factors that satisfies In this section, Algorithm~\ref{HSA} is presented. It selects the frequency scaling factors vector that gives the best trade-off between minimizing the energy consumption and maximizing the performance of a message passing -synchronous iterative application executed on a heterogeneous local cluster. It works -online during the execution time of the iterative message passing program. It +synchronous application with iterations executed on a heterogeneous local cluster. It works +online during the execution time of the message passing program with iterations. It uses information gathered during the first iteration such as the computation time and the communication time in one iteration for each node. The algorithm is executed after the first iteration and returns a vector of optimal frequency @@ -451,7 +439,7 @@ scaling factors that satisfies the objective function (\ref{eq:max-heter}). The program applies DVFS operations to change the frequencies of the CPUs according to the computed scaling factors. This algorithm is called just once during the execution of the program. Algorithm~\ref{dvfs-heter} shows where and when the proposed -scaling algorithm is called in the iterative MPI program. +scaling algorithm is called in the MPI program with iterations. \begin{figure}[!t] \centering @@ -460,15 +448,12 @@ scaling algorithm is called in the iterative MPI program. \label{fig:st_freq-cluster} \end{figure} -The nodes in a heterogeneous cluster have different computing powers, thus -while executing message passing iterative synchronous applications, fast nodes -have to wait for the slower ones to finish their computations before being able -to synchronously communicate with them as in Figure~\ref{fig:task-heter}. These -periods are called idle or slack times. The algorithm takes into account this +The nodes in a heterogeneous cluster may have different computing powers. + The algorithm takes into account this problem and tries to reduce these slack times when selecting the frequency scaling factors vector. At first, it selects initial frequency scaling factors that increase the execution times of fast nodes and minimize the differences -between the computation times of fast and slow nodes. The value of the initial +between the computation times of the fast nodes and the slow ones. The value of the initial frequency scaling factor for each node is inversely proportional to its computation time that was gathered from the first iteration. These initial frequency scaling factors are computed as a ratio between the computation time @@ -479,7 +464,7 @@ of the slowest node and the computation time of the node $i$ as follows: \end{equation} Using the initial frequency scaling factors computed in (\ref{eq:Scp}), the algorithm computes the initial frequencies for all nodes as a ratio between the -maximum frequency of node $i$ and the computation scaling factor $\Scp[i]$ as +maximum frequency of node $i$ and the computed scaling factor $\Scp[i]$ as follows: \begin{equation} \label{eq:Fint} @@ -501,13 +486,13 @@ frequencies. The algorithm iterates on all remaining frequencies, from the highe bound until all nodes reach their minimum frequencies, to compute their overall energy consumption and performance, and select the optimal frequency scaling factors vector. At each iteration the algorithm determines the slowest node -according to the equation (\ref{eq:perf_heter}) and keeps its frequency unchanged, +according to Equation (\ref{eq:perf_heter}) and keeps its frequency unchanged, while it lowers the frequency of all other nodes by one gear. The new overall energy consumption and execution time are computed according to the new scaling factors. The optimal set of frequency scaling factors is the set that gives the highest distance according to the objective function (\ref{eq:max-heter}). -Figure~\ref{fig:rel-heter} illustrate the normalized performance and +Figure~\ref{fig:rel-heter} illustrates the normalized performance and consumed energy for an application running on a heterogeneous cluster while increasing the scaling factors. It can be noticed that in a homogeneous cluster, as in the figure \ref{fig:rel} (a), @@ -519,15 +504,12 @@ plot even if the frequencies of the faster nodes decrease until the computing power of scaled down nodes are lower than the slowest node. In other words, until they reach the higher bound. It can also be noticed that the higher the difference between the faster nodes and the slower nodes is, the bigger the -maximum distance between the energy curve and the performance curve is while the -scaling factors are varying which results in bigger energy savings. -Finally, in a homogeneous platform the energy consumption is increased when the scaling factor is very high. -Indeed, the dynamic energy saved by reducing the frequency of the processor is compensated by the significant increase of the execution time and thus the increased of the static energy. On the other hand, in a heterogeneous platform this is not the case. +maximum distance between the energy curve and the performance curve is which results in bigger energy savings. \subsection{The evaluation of the proposed algorithm} \label{ch3:1:5} -The precision of the proposed algorithm mainly depends on the execution time -prediction model defined in (\ref{eq:perf_heter}) and the energy model computed by +The accuracy of the proposed algorithm mainly depends on the execution time +prediction model defined in (\ref{eq:perf_heter}) and the energy model computed by Equation (\ref{eq:energy-heter}). The energy model is also significantly dependent on the execution time model because the static energy is linearly related to the execution time and the dynamic energy is related to the computation time. So, @@ -537,7 +519,7 @@ execution time over SimGrid/SMPI simulator, v3.10~\cite{ref66}, for all the NAS parallel benchmarks NPB v3.3 \cite{ref65}, running class B on 8 or 9 nodes. The comparison showed that the proposed execution time model is -very precise, the maximum normalized difference between the predicted execution +very accurate, the maximum normalized difference between the predicted execution time and the real execution time is equal to 0.03 for all the NAS benchmarks. Since the proposed algorithm is not an exact method, it does not test all the @@ -551,8 +533,8 @@ brute force algorithm. It has a small execution time: for a heterogeneous cluster composed of four different types of nodes having the characteristics presented in Table~\ref{table:platform-cluster}, it takes on average 0.04 \textit{ms} for 4 nodes and 0.15 \textit{ms} on average for 144 nodes to compute the best scaling -factors vector. The algorithm complexity is $O(F\cdot N)$, where $F$ is the -maximum number of available frequencies, and $N$ is the number of computing +factors vector. The algorithm complexity is $O(F_i \cdot N)$, where $F_i$ is the +maximum number of available frequencies in the node $i$, and $N$ is the number of computing nodes. The algorithm needs from 12 to 20 iterations to select the best vector of frequency scaling factors that gives the results of the next sections. @@ -578,7 +560,7 @@ frequency scaling factors that gives the results of the next sections. \label{table:platform-cluster} \end{table} -\section{Experimental results over heterogeneous local cluster} +\section{Experimental results over a heterogeneous local cluster} \label{ch3:2} To evaluate the efficiency and the overall energy consumption reduction of Algorithm~\ref{HSA}, it was applied to the NAS parallel benchmarks NPB v3.3 which @@ -595,13 +577,11 @@ specifications of real Intel processors. The heterogeneous cluster had up to 144 nodes and had nodes from the four types in equal proportions, for example if a benchmark was executed on 8 nodes, 2 nodes from each type were used. Since the constructors of CPUs do not specify the dynamic and the static power of their -CPUs, for each type of node they were chosen proportionally to its computing -power (FLOPS). In the initial heterogeneous cluster, while computing with -highest frequency, each node consumed an amount of power proportional to its -computing power (which corresponds to 80\% of its dynamic power and the -remaining 20\% to the static power), the same assumption was made in chapter \ref{ch2} and -\cite{ref3}. Finally, These -nodes were connected via an Ethernet network with 1 \textit{Gbit/s} bandwidth. +CPUs, for each type of node they were chosen proportionally to their computing +powers (FLOPS). The dynamic power corresponds to 80\% of the overall power consumption while executing at +the higher frequency and the +remaining 20\% is the static power. The same assumption was made in Chapter \ref{ch2} and +\cite{ref3}. Finally, These nodes were connected via an Ethernet network with 1 \textit{Gbit/s} bandwidth. \subsection{The experimental results of the scaling algorithm } @@ -778,7 +758,7 @@ the energy saving and performance degradation percentages were computed for each instance. The results are presented in Tables \ref{table:res_8n}, \ref{table:res_16n}, \ref{table:res_32n}, \ref{table:res_64n} and \ref{table:res_128n}. All these results are the average -values from many experiments for energy savings and performance degradation. +values obtained from many experiments for energy savings and performance degradation. The tables show the experimental results for running the NAS parallel benchmarks on different numbers of nodes. The experiments show that the algorithm significantly reduces the energy consumption (up to 34\%) and tries to @@ -796,10 +776,10 @@ Algorithm~\ref{HSA} is less effective in reducing the overall energy savings. It can also be noticed that for the benchmarks EP and SP that contain little or no communications, the energy savings are not significantly affected by the high number of nodes. No experiments were conducted using bigger classes than D, -because they require a lot of memory (more than 64 \textit{CB}) when being executed +because they require a lot of memory (more than 64 \textit{GB}) when being executed by the simulator on one machine. The maximum distance between the normalized energy curve and the normalized performance for each instance is also shown in -the result tables. It decrease in the same way as the energy saving percentage. +the result tables. It decreases in the same way as the energy saving percentage. The tables also show that the performance degradation percentage is not significantly increased when the number of computing nodes is increased because the computation times are small when compared to the communication times. @@ -823,7 +803,7 @@ has less effect on the performance. The results of the previous section were obtained while using processors that consume during computation an overall power which is 80\% composed of -dynamic power and of 20\% of static power. In this section, these ratios +dynamic power and 20\% of static power. In this section, these ratios are changed and two new power scenarios are considered in order to evaluate how the proposed algorithm adapts itself according to the static and dynamic power values. The two new power scenarios are the following: @@ -843,18 +823,18 @@ more dynamic power is consumed when nodes are running on their maximum frequencies, thus, scaling down the frequency of the nodes results in higher energy savings than in the 70\%-30\% scenario. On the other hand, the performance degradation percentage is smaller in the 70\%-30\% -scenario compared to the 90\%-\%10 scenario. This is due to the +scenario compared to the 90\%-10\% scenario. This is due to the higher static power percentage in the first scenario which makes it more relevant in the overall consumed energy. Indeed, the static energy is related to the execution time and if the performance is degraded the amount of consumed static energy directly increases. Therefore, the proposed algorithm does not -really significantly scale down much the frequencies of the nodes in order to +significantly scale down the frequencies of the nodes in order to limit the increase of the execution time and thus limiting the effect of the consumed static energy. Both new power scenarios are compared to the old one in Figure~\ref{fig:powers-heter} (a). It shows the average of the performance degradation, -the energy saving and the distances for all NAS benchmarks of class C running on +the energy saving and the distances for all the NAS benchmarks running class C on 8 or 9 nodes. The comparison shows that the energy saving ratio is proportional to the dynamic power ratio: it is increased when applying the 90\%-10\% scenario because at maximum frequency the dynamic energy @@ -863,14 +843,14 @@ lowering the frequency of some processors. On the other hand, the energy saving decreases when the 70\%-30\% scenario is used because the dynamic energy is less relevant in the overall consumed energy and lowering the frequency does not return big energy savings. Moreover, the average of the -performance degradation is decreased when using a higher ratio for static power +performance degradation is decreased when using a higher ratio for the static power (e.g. 70\%-30\% scenario and 80\%-20\% scenario). Since the proposed algorithm optimizes the energy consumption when -using a higher ratio for dynamic power the algorithm selects bigger frequency -scaling factors that result in more energy saving but less performance, for +using a higher ratio for the dynamic power, the algorithm selects bigger frequency +scaling factors that results in more energy saving but degrade the performance, for example see Figure~\ref{fig:powers-heter} (b). The opposite happens when using a -higher ratio for static power, the algorithm proportionally selects smaller -scaling values which result in less energy saving but also less performance +higher ratio for the static power, the algorithm proportionally selects smaller +scaling values which results in less energy saving but also less performance degradation. \begin{table}[!t] @@ -928,7 +908,7 @@ degradation. \end{table} \begin{table}[!t] - \caption{Comparing the proposed algorithm} + \caption{Comparing the MaxDist algorithm to the EDP method} \centering \begin{tabular}{|*{7}{r|}} \hline @@ -976,138 +956,138 @@ degradation. \end{figure} -\subsection{The comparison of the proposed scaling algorithm } +\subsection{Comparison between the proposed scaling algorithm and the EDP method} \label{ch3:2:3} In this section, the scaling factors selection algorithm, called MaxDist, is -compared to Spiliopoulos et al. algorithm -\cite{ref67}, called EDP. They developed a +compared to \cite{ref67}, EDP method. They developed a green governor that regularly applies an online frequency selecting algorithm to -reduce the energy consumed by a multicore architecture without degrading much +reduce the energy consumed by a multi-core architecture without degrading much its performance. The algorithm selects the frequencies that minimize the energy -and delay products, $\mathit{EDP}=\mathit{energy}\times \mathit{delay}$ using +and delay product, $\mathit{EDP}=\mathit{energy}\times \mathit{delay}$, using the predicted overall energy consumption and execution time delay for each frequency. To fairly compare both algorithms, the same energy and execution -time models, equations (\ref{eq:energy-heter}) and (\ref{eq:perf_heter}), were used for both -algorithms to predict the energy consumption and the execution times. Also +time models, Equations (\ref{eq:energy-heter}) and (\ref{eq:perf_heter}), were used for both +algorithms to predict the energy consumption and the execution times. Spiliopoulos et al. algorithm was adapted to start the search from the initial -frequencies computed using the equation (\ref{eq:Fint}). The resulting algorithm +frequencies computed using Equation (\ref{eq:Fint}). The resulting algorithm is an exhaustive search algorithm that minimizes the EDP and has the initial frequencies values as an upper bound. Both algorithms were applied to the parallel NAS benchmarks to compare their -efficiency. Table~\ref{table:compare_EDP} presents the results of comparing the +efficiency. Table~\ref{table:compare_EDP} presents the execution times and the energy consumption for both versions of the NAS benchmarks while running the class C of each benchmark over 8 or 9 heterogeneous nodes. The results show that our algorithm provides better energy savings than Spiliopoulos et al. algorithm, on average it results in 29.76\% energy -saving while their algorithm returns just 25.75\%. The average of +saving while their algorithm saves just 25.75\%. The average of performance degradation percentage is approximately the same for both algorithms, about 4\%. For all benchmarks, our algorithm outperforms Spiliopoulos et al. algorithm in -terms of energy and performance trade-off, see Figure~\ref{fig:compare_EDP}, +the energy reduction to performance trade-off, see Figure~\ref{fig:compare_EDP}, because it maximizes the distance between the energy saving and the performance degradation values while giving the same weight for both metrics. -\section[The energy optimization of grid]{The energy optimization of parallel iterative applications running over grid} +\section[The energy optimization of grid]{The energy optimization of parallel applications with iterations running over grids} \label{ch3:3} \subsection{The energy and performance models of grid platform} \label{ch3:3:1} In this section, we are interested in reducing the energy consumption of message -passing distributed iterative synchronous applications running over +passing applications with synchronous iterations running over heterogeneous grid platforms. A heterogeneous grid platform could be defined as a collection of -heterogeneous computing clusters interconnected via a long distance network which has lower bandwidth -and higher latency than the local networks of the clusters. Each computing cluster in the grid is composed of homogeneous nodes that are connected together via a high speed network. Therefore, each cluster has different characteristics such as computing power (FLOPS), energy consumption, CPU's frequency range, network bandwidth and latency. +heterogeneous computing clusters interconnected via a long distance network which has a lower bandwidth +and a higher latency than the local networks of the clusters. Each computing cluster in the grid is composed of homogeneous nodes that are connected together via a high speed network. However, nodes from distinct clusters may have different characteristics such as computing power (FLOPS), energy consumption, CPU's frequency range, network bandwidth and latency. Since in a heterogeneous grid each cluster has different characteristics, -especially different frequency gears, when applying DVFS operations on the nodes + when applying DVFS operations on the nodes of these clusters, they may get different scaling factors represented by a scaling vector: -$(S_{11}, S_{12},\dots, S_{NM})$ where $S_{ij}$ is the scaling factor of processor $j$ in cluster $i$ . To -be able to predict the execution time of message passing synchronous iterative -applications running over a heterogeneous grid, for different vectors of +$(S_{11}, S_{12},\dots, S_{NM})$ where $S_{ij}$ is the scaling factor of processor $j$ in cluster $i$. To +be able to predict the execution time of message passing +applications with synchronous iterations running over a heterogeneous grid, for different vectors of scaling factors, the communication time and the computation time for all the tasks must be measured during the first iteration before applying any DVFS operation. Then the execution time for one iteration of the application with any -vector of scaling factors can be predicted using (\ref{eq:perf-grid}). +vector of scaling factors can be predicted using Equation (\ref{eq:perf-grid}). % \begin{equation} \label{eq:perf-grid} - \Tnew = \mathop{\max_{i=1,\dots N}}_{j=1,\dots,M}({\TcpOld[ij]} \cdot S_{ij}) - +\mathop{\min_{j=1,\dots,M}} (\Tcm[hj]) + \Tnew = \mathop{\max_{i=1,\dots N}}_{j=1,\dots,M_i}({\TcpOld[ij]} \cdot S_{ij}) + +\mathop{\min_{j=1,\dots,M_i}} (\Tcm[hj]) \end{equation} % -where $N$ is the number of clusters in the grid, $M$ is the number of nodes in -each cluster, $\TcpOld[ij]$ is the computation time of processor $j$ in the cluster $i$ +where $N$ is the number of clusters in the grid, $M_i$ is the number of nodes in + cluster $i$, $\TcpOld[ij]$ is the computation time of processor $j$ in the cluster $i$ and $\Tcm[hj]$ is the communication time of processor $j$ in the cluster $h$ during the first iteration. The execution time for one iteration is equal to the sum of the maximum computation time for all nodes with the new scaling factors and the slowest communication time without slack time during one iteration. The latter is equal to the communication time of the slowest node in the slowest cluster $h$. It means that only the communication time without any slack time is taken into account. -Therefore, the execution time of the iterative application is equal to -the execution time of one iteration as in (\ref{eq:perf-grid}) multiplied by the +Therefore, the execution time of the parallel application with iterations is equal to +the execution time of one iteration as in Equation (\ref{eq:perf-grid}) multiplied by the number of iterations of that application. In the considered heterogeneous grid platform, each node $j$ in cluster $i$ may have different dynamic and static powers from the nodes of the other clusters, noted as $\Pd[ij]$ and $\Ps[ij]$ respectively. Therefore, even if the distributed -message passing iterative application is load balanced, the computation time of each CPU $j$ +message passing application with iterations is load balanced, the computation time of each CPU $j$ in cluster $i$ noted $\Tcp[ij]$ may be different and different frequency scaling factors may be computed in order to decrease the overall energy consumption of the application and reduce slack times. The communication time of a processor $j$ in cluster $i$ is noted as $\Tcm[ij]$ and could contain slack times when communicating with slower nodes, see Figure~\ref{fig:task-heter}. Therefore, all nodes do not have equal communication times. While the dynamic energy is computed according to the -frequency scaling factor and the dynamic power of each node as in +frequency scaling factor and the dynamic power of each node as in Equation (\ref{eq:Edyn}), the static energy is computed as the sum of the execution time of one iteration multiplied by the static power of each processor. The overall energy consumption of a message passing distributed application executed over a heterogeneous grid platform during one iteration is the summation of all dynamic and -static energies for $M$ processors in $N$ clusters. It is computed as follows: +static energies for $M_i$ processors in $N$ clusters. It is computed as follows: \begin{equation} \label{eq:energy-grid} - E = \sum_{i=1}^{N} \sum_{i=1}^{M} {(S_{ij}^{-2} \cdot \Pd[ij] \cdot \Tcp[ij])} + - \sum_{i=1}^{N} \sum_{j=1}^{M} (\Ps[ij] \cdot - (\mathop{\max_{i=1,\dots N}}_{j=1,\dots,M}({\Tcp[ij]} \cdot S_{ij}) - +\mathop{\min_{j=1,\dots M}} (\Tcm[hj]) )) + E = \sum_{i=1}^{N} \sum_{i=1}^{M_i} {(S_{ij}^{-2} \cdot \Pd[ij] \cdot \Tcp[ij])} + + \sum_{i=1}^{N} \sum_{j=1}^{M_i} (\Ps[ij] \cdot + (\mathop{\max_{i=1,\dots N}}_{j=1,\dots,M_i}({\Tcp[ij]} \cdot S_{ij}) + +\mathop{\min_{j=1,\dots M_i}} (\Tcm[hj]) )) \end{equation} -To optimize both of the energy model \ref{eq:energy-grid} and the performance model\ref{eq:perf-grid}, -they must normalizes respectively as in \ref{eq:enorm-heter} and \ref{eq:pnorm-heter}. -While the original energy consumption is the consumed energy with -maximum frequency for all nodes computes as follows: +To optimize both of the energy consumption model computed by \ref{eq:energy-grid} and the performance model computed by \ref{eq:perf-grid}, +they must be normalized as in Equation \ref{eq:enorm-heter} and Equation \ref{eq:pnorm-heter} respectively. +While the original energy consumption is the consumed energy with the +maximum frequency for all the nodes computed as follows: \begin{equation} \label{eq:eorginal-grid} - \Eoriginal = \sum_{i=1}^{N} \sum_{j=1}^{M} ( \Pd[ij] \cdot \Tcp[ij]) + - \mathop{\sum_{i=1}^{N}} \sum_{j=1}^{M} (\Ps[ij] \cdot \Told) + \Eoriginal = \sum_{i=1}^{N} \sum_{j=1}^{M_i} ( \Pd[ij] \cdot \Tcp[ij]) + + \mathop{\sum_{i=1}^{N}} \sum_{j=1}^{M_i} (\Ps[ij] \cdot \Told) \end{equation} -By the same way, the old execution time with maximum frequency for all nodes computes as follows: +By the same way, the old execution time with the maximum frequency for all the nodes is computed as follows: \begin{equation} \label{eq:told-grid} - \Told = \mathop{\max_{i=1,2,\dots,N}}_{j=1,2,\dots,M} (\Tcp[ij]+\Tcm[ij]) + \Told = \mathop{\max_{i=1,\dots N}}_{j=1,\dots,M_i}({\Tcp[ij]}) + +\mathop{\min_{j=1,\dots,M_i}} (\Tcm[hj]) \end{equation} -Therefore, the objective function can be modeled in order to find the maximum +Therefore, the objective function can be modelled in order to find the maximum distance between the normalized energy curve and the normalized performance curve -over all available sets of scaling factors as follows: +over all possible sets of scaling factors as follows: \begin{equation} \label{eq:max-grid} \MaxDist = -\mathop{ \mathop{\max_{i=1,\dots N}}_{j=1,\dots,M}}_{k=1,\dots,F} +\mathop{ \mathop{\max_{i=1,\dots N}}_{j=1,\dots,M_i}}_{k=1,\dots,F_j} (\overbrace{\Pnorm(S_{ijk})}^{\text{Maximize}} - \overbrace{\Enorm(S_{ijk})}^{\text{Minimize}} ) \end{equation} -where $N$ is the number of clusters, $M$ is the number of nodes in each cluster and -$F$ is the number of available frequencies for each node. Then, the optimal set +where $N$ is the number of clusters, $M_i$ is the number of nodes in each cluster and +$F_j$ is the number of available frequencies for the node $j$. Then, the optimal set of scaling factors that satisfies (\ref{eq:max-grid}) can be selected. -\subsection{The scaling factors selection algorithm for a grid } +\subsection{The scaling factors selection algorithm for a grid architecture} \label{ch3:3:2} \begin{algorithm} @@ -1118,7 +1098,7 @@ of scaling factors that satisfies (\ref{eq:max-grid}) can be selected. \Require ~ \item [{$N$}] number of clusters in the grid. - \item [{$M$}] number of nodes in each cluster. + \item [{$M_i$}] number of nodes in each cluster. \item[{$\Tcp[ij]$}] array of all computation times for all nodes during one iteration and with the highest frequency. \item[{$\Tcm[ij]$}] array of all communication times for all nodes during one iteration and with the highest frequency. \item[{$\Fmax[ij]$}] array of the maximum frequencies for all nodes. @@ -1128,15 +1108,16 @@ of scaling factors that satisfies (\ref{eq:max-grid}) can be selected. \Ensure $\Sopt[11],\Sopt[12] \dots, \Sopt[NM_i]$, a vector of scaling factors that gives the optimal trade-off between energy consumption and execution time - \State $\Scp[ij] \gets \frac{ \mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M}(\Tcp[ij])} {\Tcp[ij]} $ + \State $\Scp[ij] \gets \frac{ \mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M_i}(\Tcp[ij])} {\Tcp[ij]} $ \State $F_{ij} \gets \frac{\Fmax[ij]}{\Scp[i]},~{i=1,2,\cdots,N},~{j=1,2,\dots,M_i}.$ \State Round the computed initial frequencies $F_i$ to the closest available frequency for each node. \If{(not the first frequency)} \State $F_{ij} \gets F_{ij}+\Fdiff[ij],~i=1,\dots,N,~{j=1,\dots,M_i}.$ \EndIf - \State $\Told \gets \mathop{\max\limits_{i=1,2,\dots,N}}\limits_{j=1,2,\dots,M} (\Tcp[ij]+\Tcm[ij]) $ - \State $\Eoriginal \gets \sum_{i=1}^{N} \sum_{j=1}^{M} ( \Pd[ij] \cdot \Tcp[ij]) + - \mathop{\sum_{i=1}^{N}} \sum_{j=1}^{M} (\Ps[ij] \cdot \Told) $ + \State $\Told \gets \mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M_i}({\Tcp[ij]}) + +\mathop{\min\limits_{j=1,\dots,M_i}} (\Tcm[hj]) $ + \State $\Eoriginal \gets \sum_{i=1}^{N} \sum_{j=1}^{M_i} ( \Pd[ij] \cdot \Tcp[ij]) + + \mathop{\sum_{i=1}^{N}} \sum_{j=1}^{M_i} (\Ps[ij] \cdot \Told) $ \State $\Sopt[ij] \gets 1,~i=1,\dots,N,~{j=1,\dots,M_i}. $ \State $\Dist \gets 0 $ \While {(all nodes have not reached their minimum frequency \textbf{or} $\Pnorm - \Enorm < 0 $)} @@ -1144,17 +1125,17 @@ of scaling factors that satisfies (\ref{eq:max-grid}) can be selected. \State $F_{ij} \gets F_{ij} - \Fdiff[ij],~{i=1,\dots,N},~{j=1,\dots,M_i}$. \State $S_{ij} \gets \frac{\Fmax[ij]}{F_{ij}},~{i=1,\dots,N},~{j=1,\dots,M_i}.$ \EndIf - \State $\Tnew \gets \mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M}({\TcpOld[ij]} - \cdot S_{ij}) +\mathop{\min\limits_{j=1,\dots,M}} (\Tcm[hj]) $. - \State $\Ereduced \gets \sum\limits_{i=1}^{N} \sum\limits_{i=1}^{M} {(S_{ij}^{-2} \cdot \Pd[ij] - \cdot \Tcp[ij])} + \sum\limits_{i=1}^{N} \sum\limits_{j=1}^{M} (\Ps[ij] \cdot - (\mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M}({\Tcp[ij]} \cdot S_{ij}) - +\mathop{\min\limits_{j=1,\dots M}} (\Tcm[hj]) ))$ + \State $\Tnew \gets \mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M_i}({\TcpOld[ij]} + \cdot S_{ij}) +\mathop{\min\limits_{j=1,\dots,M_i}} (\Tcm[hj]) $ + \State $\Ereduced \gets \sum\limits_{i=1}^{N} \sum\limits_{i=1}^{M_i} {(S_{ij}^{-2} \cdot \Pd[ij] + \cdot \Tcp[ij])} + \sum\limits_{i=1}^{N} \sum\limits_{j=1}^{M_i} (\Ps[ij] \cdot + (\mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M_i}({\Tcp[ij]} \cdot S_{ij}) + +\mathop{\min\limits_{j=1,\dots,M_i}} (\Tcm[hj]) ))$ \State $\Pnorm \gets \frac{\Told}{\Tnew}$ \State $\Enorm \gets \frac{\Ereduced}{\Eoriginal}$ \If{$(\Pnorm - \Enorm > \Dist)$} - \State $\Sopt[ij] \gets S_{ij},~i=1,\dots,N,~j=1,\dots,M_i. $ + \State $\Sopt[ij] \gets S_{ij},~i=1,\dots,N,~j=1,\dots,M_i$ \State $\Dist \gets \Pnorm - \Enorm$ \EndIf \EndWhile @@ -1167,7 +1148,7 @@ of scaling factors that satisfies (\ref{eq:max-grid}) can be selected. \begin{figure}[!t] \centering \includegraphics[scale=0.7]{fig/ch3/init_freq} - \caption{Selecting the initial frequencies in grid} + \caption{Selecting the initial frequencies in the grid architecture} \label{fig:st_freq-grid} \end{figure} @@ -1180,56 +1161,53 @@ of scaling factors that satisfies (\ref{eq:max-grid}) can be selected. In this section, the scaling factors selection algorithm for a grid, Algorithm~\ref{HSA-grid}, -is presented. It selects the vector of the frequency +is presented. It selects the vector of frequency scaling factors that gives the best trade-off between minimizing the energy consumption and maximizing the performance of a message passing -synchronous iterative application executed on a grid that satisfies the objective function -(\ref{eq:max-grid}). -It has the same principles and specifications of the frequencies selection algorithm of the heterogeneous -local cluster \ref{HSA}. + application with synchronous iterations executed on a grid. +It is similar to the frequency selection algorithm for heterogeneous +local clusters presented in Section \ref{ch3:1:4}. The value of the initial frequency scaling factor for each node is inversely proportional to its -computation time that was gathered from the first iteration. These initial -frequency scaling factors are computed as a ratio between the computation time +computation time that was gathered in the first iteration. The initial +frequency scaling factor for a node $i$ is computed as a ratio between the computation time of the slowest node and the computation time of the node $i$ as follows: \begin{equation} \label{eq:Scp-grid} - \Scp[ij] = \frac{ \mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M}(\Tcp[ij])} {\Tcp[ij]} + \Scp[ij] = \frac{ \mathop{\max\limits_{i=1,\dots N}}\limits_{j=1,\dots,M_i}(\Tcp[ij])} {\Tcp[ij]} \end{equation} Using the initial frequency scaling factors computed in (\ref{eq:Scp-grid}), the algorithm computes the initial frequencies for all nodes as a ratio between the -maximum frequency of node $i$ and the computation scaling factor $\Scp[i]$ as -follows: +maximum frequency of the node and its computed scaling factor, as follows: \begin{equation} \label{eq:Fint-grid} - F_{ij} = \frac{\Fmax[ij]}{\Scp[ij]},~{i=1,2,\dots,N},~{j=1,\dots,M} + F_{ij} = \frac{\Fmax[ij]}{\Scp[ij]},~{i=1,2,\dots,N},~{j=1,\dots,M_i} \end{equation} Figure \ref{fig:st_freq-grid} shows the selected initial frequencies for a grid composed of three clusters. In contrast to algorithm \ref{HSA}, algorithm \ref{HSA-grid} replaces the computed initial frequency for a node by the nearest available frequency if not available in the gears of that node. -The frequency scaling algorithm of the grid stops its iteration if it reaches to lower bound, which is the computed distance between the energy and performance at this frequency if it is less than zero. +The frequency scaling algorithm of the grid stops its iteration if it reaches the lower bound, which is the frequency that gives a negative distance between the energy and performance. A negative distance means that the performance degradation ratio is higher than the energy saving ratio as in figure \ref{fig:rel-grid}. In this situation, the algorithm must stop the downward search because it has reached the lower bound and it is useless to test the lower frequencies. Indeed, they will all give worse distances. -Therefore, the algorithm iterates on all remaining frequencies, from the higher +Therefore, the algorithm iterates on all the remaining frequencies, from the higher bound until all nodes reach their minimum frequencies or their lower bounds, to compute the overall -energy consumption and performance and selects the optimal vector of the frequency scaling -factors. The DVFS algorithm~\ref{dvfs-heter} is also used to call the algorithm \ref{HSA-grid} in the MPI -program executed over grid platform. +energy consumption and execution time. Then, it selects the vector of frequency scaling +factors that give the maximum distance (MaxDist). Algorithm~\ref{dvfs-heter} is also used to call the Algorithm \ref{HSA-grid} in the MPI program executed over the grid platform. -\section{Experimental results over Grid5000 platform} +\section{Experimental results over the Grid5000 platform} \label{ch3:4} In this section, real experiments were conducted over the Grid'5000 platform. -Grid'5000~\cite{ref21} is a large-scale testbed that consists of ten sites distributed all over metropolitan France and Luxembourg. These sites are: Grenoble, Lille, Luxembourg, Lyon, Nancy, Reims, Rennes , Sophia, Toulouse, Bordeaux. Figure \ref{fig:grid5000-dis} shows the geographical distribution of grid'5000 sites over France and Luxembourg. All the sites are connected together via a special long distance network called RENATER, which is abbreviation of the French +Grid'5000~\cite{ref21} is a large-scale testbed that consists of ten sites distributed all over metropolitan France and Luxembourg. These sites are: Grenoble, Lille, Luxembourg, Lyon, Nancy, Reims, Rennes , Sophia, Toulouse and Bordeaux. Figure \ref{fig:grid5000-dis} shows the geographical distribution of grid'5000 sites over France and Luxembourg. All the sites are connected together via a special long distance network called RENATER, which is the abbreviation of the French National Telecommunication Network for Technology. Each site in the grid is composed of a few heterogeneous computing clusters and each cluster contains many homogeneous nodes. In total, Grid'5000 has about one thousand heterogeneous nodes and eight thousand cores. In each site, the clusters and their nodes are connected via high speed local area networks. Two types of local networks are used, Ethernet or Infiniband networks, which have different characteristics in terms of bandwidth and latency. -Grid'5000 is dedicated as a test-bed for grid computing and thus users can book the required nodes from different sites. -It also gives the opportunity to the users to deploy their configured image of the operating system over the reserved nodes. -Indeed, many software tools are available for users in order to control and manage the reservation and deployment processes from their local machines. For example, OAR \cite{ref22} is a batch scheduler that is used to manage the heterogeneous resources of the grid'5000. +Grid'5000 is dedicated for research experiments and users can book nodes from different sites to conduct their experiments. +It also gives the opportunity to the users to deploy their customized operating system over the reserved nodes. +Indeed, many software tools are available for users in order to control and manage the reservation and deployment processes remotely. For example, OAR \cite{ref22} is a batch scheduler that is used to manage the heterogeneous resources of the grid'5000. \begin{figure}[h!] \centering @@ -1239,8 +1217,8 @@ Indeed, many software tools are available for users in order to control and man \end{figure} - Moreover, the Grid'5000 testbed provides at some sites a power measurement tool to capture -the power consumption for each node in those sites. The measured power is the overall consumed power by all the components of a node at a given instant, such as CPU, hard drive, main-board, memory, \dots{} For more details refer to \cite{ref79}. +Moreover, the Grid'5000 testbed provides at some sites a power measurement tool to capture +the power consumption for each node in those sites. The measured power is the overall consumed power by all the components of a node at a given instant. For more details refer to \cite{ref79}. In order to correctly measure the CPU power of one core in a node $j$, firstly, the power consumed by the node while being idle at instant $y$, noted as $\Pidle[jy]$, was measured. Then, the power was measured while running a single thread benchmark with no communication (no idle time) over the same node with its CPU scaled to the maximum available frequency. The latter power measured at time $x$ with maximum frequency for one core of node $j$ is noted $\Pmax[jx]$. The difference between the two measured power consumptions represents the dynamic power consumption of that core with the maximum frequency, see Figure~\ref{fig:power_cons}. @@ -1258,13 +1236,13 @@ $\lbrace\Theta_1,\Theta_2\rbrace$ is the time interval for the measured idle po Therefore, the dynamic power of one core is computed as the difference between the maximum measured value in maximum powers vector and the minimum measured value in the idle powers vector. -On the other hand, the static power consumption by one core is a part of the measured idle power consumption of the node. Since in Grid'5000 there is no way to measure precisely the consumed static power and same as in sections \ref{ch3:2} and \ref{ch2:6} it was assumed that the static power represents a ratio of the dynamic power, the value of the static power is assumed as 20\% of dynamic power consumption of the core. +On the other hand, the static power consumption by one core is a part of the measured idle power consumption of the node. Since in Grid'5000 there is no way to measure precisely the consumed static power and it was assumed, as in Sections \ref{ch3:2} and \ref{ch2:6}, that the static power represents a ratio of the dynamic power, the value of the static power is assumed to be equal to 20\% of the dynamic power consumption of the core. -In the experiments presented in the following sections, two sites of Grid'5000 were used, Lyon and Nancy sites. These two sites have in total seven different clusters as shown on Figure~\ref{fig:grid5000}. +In the experiments presented in the following sections, two sites of Grid'5000 were used, Lyon and Nancy sites. These two sites have in total seven different clusters as shown in Figure~\ref{fig:grid5000}. Four clusters from the two sites were selected in the experiments: one cluster from Lyon's site, Taurus, and three clusters from Nancy's site, Graphene, -Griffon and Graphite. Each one of these clusters has homogeneous nodes inside, while nodes from different clusters are heterogeneous in many aspects such as: computing power, power consumption, available +Griffon and Graphite. Each one of these clusters composed of homogeneous nodes, while nodes from different clusters are heterogeneous in many aspects such as: computing power, power consumption, available frequency ranges and local network features: the bandwidth and the latency. Table~\ref{table:grid5000-1} shows the detailed characteristics of these four clusters. Moreover, the dynamic powers were computed using Equation~\ref{eq:pdyn} for all the nodes in the selected clusters and are presented in Table~\ref{table:grid5000-1}. @@ -1279,19 +1257,18 @@ selected clusters and are presented in Table~\ref{table:grid5000-1}. \begin{figure}[!t] \centering \includegraphics[scale=0.8]{fig/ch3/power_consumption.pdf} - \caption{The power consumption by one core from the Taurus cluster} + \caption{The power consumed by one core from the Taurus cluster} \label{fig:power_cons} \end{figure} The energy model and the scaling factors selection algorithm were applied to the NAS parallel benchmarks v3.3 \cite{ref65} and evaluated over Grid'5000. The benchmark suite contains seven applications: CG, MG, EP, LU, BT, SP and FT. These applications have different computations and communications ratios and strategies which make them good testbed applications to evaluate the proposed algorithm and energy model. -The benchmarks have seven different classes, S, W, A, B, C, D and E, that represent the size of the problem that the method solves. In this work, class D was used for all benchmarks in all the experiments presented in the next sections. - +The benchmarks have seven different classes, S, W, A, B, C, D and E, that represent the size of the problem that the method solves. In the next sections, the class D was used for all the benchmarks in all the experiments. \begin{table}[!t] - \caption{CPUs characteristics of the selected clusters} + \caption{The characteristics of the CPUs in the selected clusters} % title of Table \centering \begin{tabular}{|*{7}{c|}} @@ -1321,25 +1298,23 @@ The benchmarks have seven different classes, S, W, A, B, C, D and E, that repres \end{table} - -\subsection{The experimental results of the scaling algorithm of Grid} +\subsection{The experimental results of the scaling algorithm on a Grid} \label{ch3:4:1} -In this section, the results of applying the scaling factors selection algorithm \ref{HSA} -to NAS parallel benchmarks are presented. - +In this section, the results of applying the scaling factors selection algorithm +to the NAS parallel benchmarks are presented. As mentioned previously, the experiments were conducted over two sites of Grid'5000, Lyon and Nancy sites. Two scenarios were considered while selecting the clusters from these two sites : \begin{itemize} \item In the first scenario, nodes from two sites and three heterogeneous clusters were selected. The two sites are connected via a long distance network. -\item In the second scenario nodes from three clusters located in one site, Nancy site, were selected. +\item In the second scenario nodes from three clusters located in one site, Nancy's site, were selected. \end{itemize} The main reason for using these two scenarios is to evaluate the influence of long distance communications (higher latency) on the performance of the scaling factors selection algorithm. Indeed, in the first scenario the computations to communications ratio -is very low due to the higher communication times which reduce the effect of DVFS operations. +is very low due to the higher communication times which reduces the effect of the DVFS operations. The NAS parallel benchmarks are executed over 16 and 32 nodes for each scenario. The number of participating computing nodes from each cluster @@ -1348,7 +1323,7 @@ Table~\ref{tab:sc} shows the number of nodes used from each cluster for each sce \begin{table}[h] -\caption{The different clusters scenarios} +\caption{The different grid scenarios} \centering \begin{tabular}{|*{4}{c|}} \hline @@ -1359,7 +1334,7 @@ Table~\ref{tab:sc} shows the number of nodes used from each cluster for each sce & Graphene & Nancy & 5 \\ \cline{2-4} & Griffon & Nancy & 6 \\ \hline -\multirow{3}{*}{Tow sites / 32 nodes} & Taurus & Lyon & 10 \\ \cline{2-4} +\multirow{3}{*}{Two sites / 32 nodes} & Taurus & Lyon & 10 \\ \cline{2-4} & Graphene & Nancy & 10 \\ \cline{2-4} & Griffon &Nancy & 12 \\ \hline @@ -1377,105 +1352,96 @@ Table~\ref{tab:sc} shows the number of nodes used from each cluster for each sce The NAS parallel benchmarks are executed over these two platforms - with different number of nodes, as in Table~\ref{tab:sc}. +with different number of nodes, as in Table~\ref{tab:sc}. The overall energy consumption of all the benchmarks solving the class D instance and using the proposed frequency selection algorithm is measured -using the equation of the reduced energy consumption, Equation~\ref{eq:energy-grid}. This model uses the measured dynamic power showed in Table~\ref{table:grid5000-1} -and the static -power is assumed to be equal to 20\% of the dynamic power. The execution -time is measured for all the benchmarks over these different scenarios. +using Equation~\ref{eq:energy-grid}. The energy consumptions and the execution times for all the benchmarks are presented in Figures~\ref{fig:exp-time-energy} (a) and (b) respectively. - -For the majority of the benchmarks, the energy consumed while executing the NAS benchmarks over one site scenario -for 16 and 32 nodes is lower than the energy consumed while using two sites. -The long distance communications between the two distributed sites increase the idle time, which leads to more static energy consumption. +For the majority of the benchmarks, the energy consumed while executing the NAS benchmarks over one site on 16 and 32 nodes is lower than the energy consumed while using two sites. +The long distance communications between the two distributed sites increase the idle times, which lead to more static energy consumption. The execution times of these benchmarks -over one site with 16 and 32 nodes are also lower when compared to those of the two sites -scenario. Moreover, most of the benchmarks running over the one site scenario have their execution times approximately divided by two when the number of computing nodes is doubled from 16 to 32 nodes (linear speed up according to the number of the nodes). +over one site with 16 and 32 nodes are also lower than those of the two sites +scenario. Moreover, most of the benchmarks running over the one site scenario have their execution times approximately halved when the number of computing nodes is doubled from 16 to 32 nodes (linear speed up according to the number of the nodes). -However, the execution times and the energy consumptions of EP and MG +However, the execution times and the energy consumptions of the EP and MG benchmarks, which have no or small communications, are not significantly affected in both scenarios, even when the number of nodes is doubled. On the -other hand, the communication times of the rest of the benchmarks increases when -using long distance communications between two sites or increasing the number of +other hand, the communication times of the rest of the benchmarks increase when +using long distance communications between two sites or when increasing the number of computing nodes. The energy saving percentage is computed as the ratio between the reduced energy consumption, Equation~\ref{eq:energy-grid}, and the original energy consumption, -Equation~\ref{eq:eorginal-grid}, for all benchmarks as in Figure~\ref{fig:eng_s}. -This figure shows that the energy saving percentages of one site scenario for +Equation~\ref{eq:eorginal-grid}, for all the benchmarks as in Figure~\ref{fig:eng_s}. +This figure shows that the energy saving percentages of the one site scenario for 16 and 32 nodes are bigger than those of the two sites scenario which is due to the higher computations to communications ratio in the first scenario than in the second one. Moreover, the frequency selecting algorithm selects smaller frequencies when the computation times are bigger than the communication times which results in a lower energy consumption. Indeed, the dynamic consumed power is exponentially related to the CPU's frequency value. On the other hand, the increase in the number of computing nodes can increase the communication times and thus produces less energy saving depending on the -benchmarks being executed. The results of benchmarks CG, MG, BT and FT show more -energy saving percentage in one site scenario when executed over 16 nodes comparing to 32 nodes. While, LU and SP consume more energy with 16 nodes than 32 in one site because their computations to communications ratio is not affected by the increase of the number of local communications. -\begin{figure}[!t] +benchmarks being executed. The results of the benchmarks CG, MG, BT and FT show more +energy saving percentage in the one site scenario when executed over 16 nodes than on 32 nodes. LU and SP consume more energy with 16 nodes than with 32 nodes on one site because their computations to communications ratio is not affected by the increase of the number of local communications. +\begin{figure}[!h] \centering \centering \includegraphics[width=.7\textwidth]{fig/ch3/eng_con_scenarios.eps}\\~~~~~~~~~(a)\\ \includegraphics[width=.7\textwidth]{fig/ch3/time_scenarios.eps}\\~~~~~~~~~(b) \caption{ (a) energy consumption and (b) execution time of NAS Benchmarks over different scenarios} - \label{fig:exp-time-energy} - + \label{fig:exp-time-energy} \end{figure} - -The energy saving percentage is reduced for all the benchmarks because of the long distance communications in the two sites -scenario, except for the EP benchmark which has no communication. Therefore, the energy saving percentage of this benchmark is -dependent on the maximum difference between the computing powers of the heterogeneous computing nodes, for example -in the one site scenario, the graphite cluster is selected but in the two sites scenario -this cluster is replaced with the Taurus cluster which is more powerful. -Therefore, the energy savings of the EP benchmark are bigger in the two sites scenario due -to the higher maximum difference between the computing powers of the nodes. - -In fact, high differences between the nodes' computing powers make the proposed frequencies selecting -algorithm select smaller frequencies for the powerful nodes which -produces less energy consumption and thus more energy saving. -The best energy saving percentage was obtained in the one site scenario with 16 nodes, the energy consumption was on average reduced up to 30\%. - - - -\begin{figure*}[t] +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/eng_s.eps} -\caption{The energy reduction while executing the NAS benchmarks over different scenarios} +\caption{The energy reduction percentages while executing the NAS benchmarks over different scenarios} \label{fig:eng_s} \end{figure*} -\begin{figure*}[t] + +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/per_d.eps} -\caption{The performance degradation of the NAS benchmarks over different scenarios} +\caption{The performance degradation percentages of the NAS benchmarks over different scenarios} \label{fig:per_d} \end{figure*} -\begin{figure*}[t] + +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/dist.eps} -\caption{The trade-off distance between the energy reduction and the performance of the NAS benchmarks +\caption{The trade-off distance percentages between the energy reduction and the performance of the NAS benchmarks over different scenarios} \label{fig:dist-grid} \end{figure*} +The energy saving percentage is reduced for all the benchmarks because of the long distance communications in the two sites +scenario, except for the EP benchmark which has no communication. Therefore, the energy saving percentage of this benchmark is +dependent on the maximum difference between the computing powers of the heterogeneous computing nodes, for example +in the one site scenario, the graphite cluster is selected but in the two sites scenario +this cluster is replaced with the Taurus cluster which is more powerful. +Therefore, the energy savings of the EP benchmark are bigger in the two sites scenario due +to the higher maximum difference between the computing powers of the nodes. +In fact, high differences between the nodes' computing powers make the proposed frequencies selecting +algorithm select smaller frequencies for the powerful nodes which +produces less energy consumption and thus more energy saving. +The best energy saving percentage was obtained in the one site scenario with 16 nodes, the energy consumption was on average reduced up to 30\%. -Figure \ref{fig:per_d} presents the performance degradation percentages for all benchmarks over the two scenarios. +Figure \ref{fig:per_d} presents the performance degradation percentages for all the benchmarks over the two scenarios. The performance degradation percentage for the benchmarks running on two sites with -16 or 32 nodes is on average equal to 8.3\% or 4.7\% respectively. -For this scenario, the proposed scaling algorithm selects smaller frequencies for the executions with 32 nodes without significantly degrading their performance because the communication times are higher with 32 nodes which results in smaller computations to communications ratio. On the other hand, the performance degradation percentage for the benchmarks running on one site with -16 or 32 nodes is on average equal to 3.2\% or 10.6\% respectively. In contrary to the two sites scenario, when the number of computing nodes is increased in the one site scenario, the performance degradation percentage is increased. Therefore, doubling the number of computing +16 and 32 nodes is on average equal to 8.3\% and 4.7\% respectively. +For this scenario, the proposed scaling algorithm selects smaller frequencies for the executions with 32 nodes without significantly degrading their performance because the communication times are high with 32 nodes which results in smaller computations to communications ratio. On the other hand, the performance degradation percentage for the benchmarks running on one site with +16 and 32 nodes is on average equal to 3.2\% and 10.6\% respectively. In contrary to the two sites scenario, when the number of computing nodes is increased in the one site scenario, the performance degradation percentage is increased. Therefore, doubling the number of computing nodes when the communications occur in high speed network does not decrease the computations to communication ratio. The performance degradation percentage of the EP benchmark after applying the scaling factors selection algorithm is the highest in comparison to the other benchmarks. Indeed, in the EP benchmark, there are no communication and slack times and its performance degradation percentage only depends on the frequencies values selected by the algorithm for the computing nodes. -The rest of the benchmarks showed different performance degradation percentages, which decrease +The rest of the benchmarks showed different performance degradation percentages which decrease when the communication times increase and vice versa. Figure \ref{fig:dist-grid} presents the distance percentage between the energy saving and the performance degradation for each benchmark over both scenarios. The trade-off distance percentage can be @@ -1490,26 +1456,17 @@ which increase the computations to communications ratio and the latter uses lon -\subsection{The experimental results over multi-cores clusters} +\subsection{The experimental results over multi-core clusters} \label{ch3:4:2} The clusters of Grid'5000 have different number of cores embedded in their nodes as shown in Table~\ref{table:grid5000-1}. In -this section, the proposed scaling algorithm of the grid is evaluated over the Grid'5000 platform while using multi-cores nodes selected according to the one site scenario described in Section +this section, the proposed scaling algorithm is evaluated over the Grid'5000 platform while using multi-core nodes selected according to the one site scenario described in Section ~\ref{ch3:4:1}. -The one site scenario uses 32 cores from multi-cores nodes instead of 32 distinct nodes. For example if -the participating number of cores from a certain cluster is equal to 14, -in the multi-core scenario the selected nodes is equal to 4 nodes while using -3 or 4 cores from each node. The platforms with one -core per node and multi-cores nodes are shown in Table~\ref{table:sen-mc}. -The energy consumptions and execution times of running class D of the NAS parallel -benchmarks over these two different scenarios are presented -in Figures \ref{fig:eng-cons-mc} and \ref{fig:time-mc} respectively. - -\begin{table}[] +\begin{table}[!h] \centering -\caption{The multicores scenarios} +\caption{The multi-core scenarios} \begin{tabular}{|*{4}{c|}} \hline Scenario name & Cluster name & Nodes per cluster & @@ -1517,73 +1474,76 @@ Scenario name & Cluster name & Nodes per cluster & \multirow{3}{*}{One core per node} & Graphite & 4 & 1 \\ \cline{2-4} & Graphene & 14 & 1 \\ \cline{2-4} & Griffon & 14 & 1 \\ \hline -\multirow{3}{*}{Multi-cores per node} & Graphite & 1 & 4 \\ \cline{2-4} +\multirow{3}{*}{Multi-core per node} & Graphite & 1 & 4 \\ \cline{2-4} & Graphene & 4 & 3 or 4 \\ \cline{2-4} & Griffon & 4 & 3 or 4 \\ \hline \end{tabular} + \label{table:sen-mc} \end{table} - - - - -\begin{figure}[!t] +\begin{figure}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/time.eps} - \caption{The execution times of running NAS benchmarks over one core and multicores scenarios} + \caption{The execution times of the NAS benchmarks running over the one core and the multi-core scenarios} \label{fig:time-mc} \end{figure} -\begin{figure}[!t] +\begin{figure}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/eng_con.eps} - \caption{The energy consumptions and execution times of NAS benchmarks over one core and multi-cores per node architectures} + \caption{The energy consumptions and execution times of the NAS benchmarks over one core and multi-core per node architectures} \label{fig:eng-cons-mc} \end{figure} -The execution times for most of the NAS benchmarks are higher over the multi-cores per node scenario -than over single core per node scenario. Indeed, - the communication times are higher in the one site multi-cores scenario than in the latter scenario because all the cores of a node share the same node network link which can be saturated when running communication bound applications. Moreover, the cores of a node share the memory bus which can be also saturated and become a bottleneck. +The one site scenario uses 32 cores from multi-core nodes instead of 32 distinct nodes. For example if +the participating number of cores from a certain cluster is equal to 14, +in the multi-core 4 nodes are selected and 3 or 4 cores from each node are used. The platforms with one +core per node and multi-core nodes are shown in Table~\ref{table:sen-mc}. +The energy consumptions and execution times of running class D of the NAS parallel +benchmarks over these two different platforms are presented +in Figures \ref{fig:eng-cons-mc} and \ref{fig:time-mc} respectively. + +The execution times for most of the NAS benchmarks are higher over the multi-core per node scenario +than over the single core per node scenario. Indeed, + the communication times are higher in the one site multi-core scenario than in the latter scenario because all the cores of a node share the same node network link which can be saturated when running communication bound applications. Moreover, the cores of a node share the memory bus which can be also saturated and might become a bottleneck. Moreover, the energy consumptions of the NAS benchmarks are lower over the - one core scenario than over the multi-cores scenario because + one core scenario than over the multi-core scenario because the first scenario had less execution time than the latter which results in less static energy being consumed. The computations to communications ratios of the NAS benchmarks are higher over -the one site one core scenario when compared to the ratio of the multi-cores scenario. +the one site one core scenario when compared to the ratio of the multi-core scenario. More energy reduction can be gained when this ratio is big because it pushes the proposed scaling algorithm to select smaller frequencies that decrease the dynamic power consumption. These experiments also showed that the energy consumption and the execution times of the EP and MG benchmarks do not change significantly over these two scenarios because there are no or small communications. Contrary to EP and MG, the energy consumptions and the execution times of the rest of the benchmarks vary according to the communication times that are different from one scenario to the other. - - -\begin{figure*}[!t] +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/eng_s_mc.eps} - \caption{The energy saving of running NAS benchmarks over one core and multicores scenarios} + \caption{The energy saving percentages of running NAS benchmarks over one core and multi-core scenarios} \label{fig:eng-s-mc} \end{figure*} -\begin{figure*}[!t] + +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/per_d_mc.eps} - \caption{The performance degradation of running NAS benchmarks over one core and multicores scenarios} + \caption{The performance degradation percentages of running NAS benchmarks over one core and multi-core scenarios} \label{fig:per-d-mc} \end{figure*} -\begin{figure*}[!t] + +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/dist_mc.eps} - \caption{The trade-off distance of running NAS benchmarks over one core and multicores scenarios} + \caption{The trade-off distance percentages of running NAS benchmarks over one core and multi-core scenarios} \label{fig:dist-mc} \end{figure*} - -The energy saving percentages of all NAS benchmarks running over these two scenarios are presented in Figure~\ref{fig:eng-s-mc}. -The figure shows that the energy saving percentages in the one -core and the multi-cores scenarios +The energy saving percentages of all the NAS benchmarks running over these two scenarios are presented in Figure~\ref{fig:eng-s-mc}. +It shows that the energy saving percentages in the one +core and the multi-core scenarios are approximately equivalent, on average they are equal to 25.9\% and 25.1\% respectively. The energy consumption is reduced at the same rate in the two scenarios when compared to the energy consumption of the executions without DVFS. - The performance degradation percentages of the NAS benchmarks are presented in -Figure~\ref{fig:per-d-mc}. It shows that the performance degradation percentages are higher for the NAS benchmarks over the one core per node scenario (on average equal to 10.6\%) than over the multi-cores scenario (on average equal to 7.5\%). The performance degradation percentages over the multi-cores scenario are lower because the computations to communications ratios are smaller than the ratios of the other scenario. +Figure~\ref{fig:per-d-mc}. It shows that the performance degradation percentages are higher for the NAS benchmarks executed over the one core per node scenario (on average equal to 10.6\%) than over the multi-core scenario (on average equal to 7.5\%). The performance degradation percentages over the multi-core scenario are lower because the computations to communications ratios are smaller than the ratios of the other scenario. -The trade-off distances percentages of the NAS benchmarks over the two scenarios are presented -in ~Figure~\ref{fig:dist-mc}. These trade-off distances between energy consumption reduction and performance are used to verify which scenario is the best in both terms at the same time. The figure shows that the trade-off distance percentages are on average bigger over the multi-cores scenario (17.6\%) than over the one core per node scenario (15.3\%). +The trade-off distances percentages of the NAS benchmarks over both scenarios are presented +in~Figure~\ref{fig:dist-mc}. These trade-off distances between energy consumption reduction and performance are used to verify which scenario is the best in both terms at the same time. The figure shows that the trade-off distance percentages are on average bigger over the multi-core scenario (17.6\%) than over the one core per node scenario (15.3\%). \subsection{Experiments with different static power scenarios} @@ -1594,32 +1554,33 @@ In Section~\ref{ch3:4}, since it was not possible to measure the static power co The aim of this section is to evaluate the scaling algorithm while assuming different values of static powers. In addition to the previously used percentage of static power, two new static power ratios, 10\% and 30\% of the measured dynamic power of the core, are used in this section. The experiments have been executed with these two new static power scenarios over the one site one core per node scenario. -In these experiments, class D of the NAS parallel benchmarks are executed over the Nancy site. 16 computing nodes from the three clusters, Graphite, Graphene and Griffon, where used in this experiment. +In these experiments, the class D of the NAS parallel benchmarks were executed over the Nancy site. 16 computing nodes from the three clusters, Graphite, Graphene and Griffon, were used in this experiment. -\begin{figure}[!t] +\begin{figure}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/eng_pow.eps} \caption{The energy saving percentages for the nodes executing the NAS benchmarks over the three power scenarios} \label{fig:eng-pow} \end{figure} -\begin{figure}[!t] +\begin{figure}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/per_pow.eps} \caption{The performance degradation percentages for the NAS benchmarks over the three power scenarios} \label{fig:per-pow} \end{figure} -\begin{figure}[!t] + +\begin{figure}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/dist_pow.eps} - \caption{The trade-off distance between the energy reduction and the performance of the NAS benchmarks over the three power scenarios} + \caption{The trade-off distance percentages between the energy reduction and the performance of the NAS benchmarks over the three power scenarios} \label{fig:dist-pow} \end{figure} -\begin{figure} +\begin{figure}[!h] \centering \includegraphics[scale=0.7]{fig/ch3/three_scenarios2.pdf} \caption{Comparing the selected frequency scaling factors for the MG benchmark over the three static power scenarios} @@ -1648,13 +1609,13 @@ distance percentages for these static power scenarios are not significantly diff -\subsection{Comparison of the proposed frequencies selecting algorithm } +\subsection{Comparison between the proposed frequencies selecting algorithm and the EDP method} \label{ch3:4:4} Finding the frequencies that give the best trade-off between the energy consumption and the performance for a parallel application is not a trivial task. Many algorithms have been proposed to tackle this problem. In this section, the proposed frequencies selecting algorithm is compared to a method that uses the well known energy and delay product objective function, $EDP=energy \times delay$, that has been used by many researchers \cite{ref80,ref81,ref82}. -This objective function was also used by Spiliopoulos et al. algorithm \cite{ref67} where they select the frequencies that minimize the EDP product and apply them with DVFS operations to the multi-cores +This objective function was also used by Spiliopoulos et al. algorithm \cite{ref67} where they select the frequencies that minimize the EDP product and apply them with DVFS operations to the multi-core architecture. Their online algorithm predicts the energy consumption and execution time of a processor before using the EDP method. To fairly compare the proposed frequencies scaling algorithm to Spiliopoulos et al. algorithm, called Maxdist and EDP respectively, both algorithms use the same energy model, Equation~\ref{eq:energy-grid} and @@ -1662,63 +1623,62 @@ execution time model, Equation~\ref{eq:perf-grid}, to predict the energy consump Moreover, both algorithms start the search space from the upper bound computed as in Equation~\ref{eq:Fint}. Finally, the resulting EDP algorithm is an exhaustive search algorithm that tests all the possible frequencies, starting from the initial frequencies (upper bound), and selects the vector of frequencies that minimize the EDP product. -Both algorithms were applied to class D of the NAS benchmarks over 16 nodes. +Both algorithms were applied to the class D of the NAS benchmarks running over 16 nodes. The participating computing nodes are distributed according to the two scenarios described in Section~\ref{ch3:4:1}. The experimental results, the energy saving, performance degradation and trade-off distance percentages, are presented in Figures~\ref{fig:edp-eng}, \ref{fig:edp-perf} and \ref{fig:edp-dist} respectively. - - - -\begin{figure*}[!t] +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/edp_eng} -\caption{The energy reduction induced by the Maxdist method and the EDP method} +\caption{The energy reduction percentages induced by the Maxdist method and the EDP method} \label{fig:edp-eng} \end{figure*} -\begin{figure*}[!t] + +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/edp_per} -\caption{The performance degradation induced by the Maxdist method and the EDP method} +\caption{The performance degradation percentages induced by the Maxdist method and the EDP method} \label{fig:edp-perf} \end{figure*} -\begin{figure*}[!t] + +\begin{figure*}[!h] \centering \includegraphics[width=.7\textwidth]{fig/ch3/edp_dist} -\caption{The trade-off distance between the energy consumption reduction and the performance for the Maxdist method and the EDP method} +\caption{The trade-off distance percentages between the energy consumption reduction and the performance for the Maxdist method and the EDP method} \label{fig:edp-dist} \end{figure*} As shown in these figures, the proposed frequencies selection algorithm, Maxdist, outperforms the EDP algorithm in terms of energy consumption reduction and performance for all of the benchmarks executed over the two scenarios. -The proposed algorithm gives better results than EDP because it +The proposed algorithm gives better results than the EDP method because it maximizes the energy saving and the performance at the same time. Moreover, the proposed scaling algorithm gives the same weight for these two metrics. Whereas, the EDP algorithm gives sometimes negative trade-off values for some benchmarks in the two sites scenarios. These negative trade-off values mean that the performance degradation percentage is higher than the energy saving percentage. The high positive values of the trade-off distance percentage mean that the energy saving percentage is much higher than the performance degradation percentage. -The time complexity of both Maxdist and EDP algorithms are $O(N \cdot M \cdot F)$ and -$O(N \cdot M \cdot F^2)$ respectively, where $N$ is the number of the clusters, $M$ is the number of nodes and $F$ is the -maximum number of available frequencies. When Maxdist is applied to a benchmark that is being executed over 32 nodes distributed between Nancy and Lyon sites, it takes on average $0.01 ms$ to compute the best frequencies while EDP is on average ten times slower over the same architecture. +The complexity of both algorithms, Maxdist and EDP, are of order $O(N \cdot M_i \cdot F_j)$ and +$O(N \cdot M_i \cdot F_j^2)$ respectively, where $N$ is the number of the clusters, $M_i$ is the number of nodes and $F_j$ is the +maximum number of available frequencies of node $j$. When Maxdist is applied to a benchmark that is being executed over 32 nodes distributed between Nancy and Lyon sites, it takes on average $0.01$ $ms$ to compute the best frequencies while the EDP method is on average ten times slower over the same architecture. \section{Conclusion} \label{ch3:concl} In this chapter, two new online frequency scaling factors selecting algorithms have been presented. They select the best possible vectors of frequency scaling factors that give the -maximum distance (optimal trade-off) between the predicted energy and the +maximum distance (optimal trade-off) between the predicted energy and the predicted performance curves for a heterogeneous cluster and grid. Both algorithms use a -new energy models for measuring and predicting the energy of distributed -iterative applications running over a heterogeneous local cluster and a grid platform. -Firstly, the proposed scaling factors selection algorithm for a heterogeneous local cluster is applied to NAS parallel benchmarks class C and simulated by SimGrid. -The results of the experiments showed that the algorithm on average reduces by 29.8\% the energy -consumption of NAS benchmarks executed over 8 nodes while limiting the degradation of the performance by 3.8\%. The algorithm also selects different scaling factors according to +new energy models for measuring and predicting the energy consumption of message passing + applications with iterations running over a heterogeneous local cluster and a grid platform. +Firstly, the proposed scaling factors selection algorithm for a heterogeneous local cluster is applied to the class C of the NAS parallel benchmarks and simulated by SimGrid. +The results of the simulations showed that the algorithm on average reduces by 29.8\% the energy +consumption of the NAS benchmarks executed over 8 nodes while limiting the degradation of the performance by 3.8\%. The algorithm also selects different scaling factors according to the percentage of the computing and communication times, and according to the values of the static and dynamic powers of the CPUs. -Secondly, the proposed scaling factors selection algorithm for a grid is applied to NAS parallel benchmarks class D and executed over Grid5000 testbed platform. -The experiments on 16 nodes, distributed over three clusters, showed that the algorithm on average reduces by 30\% the energy consumption -for all the NAS benchmarks while on average only degrading by 3.2\% the performance. -The algorithm was also evaluated in different scenarios that vary in the distribution of the computing nodes between different clusters' sites or use multi-cores per node architecture or consume different static power values. The algorithm selects different vectors of frequencies according to the +Secondly, the proposed scaling factors selection algorithm for a grid is applied to the class D of the NAS parallel benchmarks and executed over the Grid5000 testbed platform. +The experiments executed on 16 nodes distributed over three clusters, showed that the algorithm on average reduces by 30\% the energy consumption +of all the NAS benchmarks while on average only degrading by 3.2\% their performance. +The algorithm was also evaluated in different scenarios that vary in the distribution of the computing nodes between different clusters' sites or use multi-core per node architecture or consume different static power values. The algorithm selects different vectors of frequencies according to the computations and communication times ratios, and the values of the static and measured dynamic powers of the CPUs. Thus, the simulation and the real results are comparable in term of energy saving and performance degradation percentages. -Finally, both the proposed algorithms were compared to another method that uses +Finally, both algorithms were compared to a method that uses the well known energy and delay product as an objective function. The comparison results showed that the proposed algorithms outperform the latter by selecting vectors of frequencies that give a better trade-off results.