X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/mpi-energy2.git/blobdiff_plain/2c9279323393cded909289eb5e2718a950798e62..869119dabc9fdb4d7eea5f1682c9bc07a9f95258:/Heter_paper.tex?ds=inline diff --git a/Heter_paper.tex b/Heter_paper.tex index c5f885a..d7e32df 100644 --- a/Heter_paper.tex +++ b/Heter_paper.tex @@ -104,8 +104,8 @@ passing distributed iterative synchronous applications running over heterogeneous platforms. We define a heterogeneous platform as a collection of heterogeneous computing nodes interconnected via a high speed homogeneous network. Therefore, each node has different characteristics such as computing -power (FLOPS), energy consumption, CPU's frequency range, ... but they all have -the same network bandwidth and latency. +power (FLOPS), energy consumption, CPU's frequency range, \dots{} but they all +have the same network bandwidth and latency. \begin{figure}[t] @@ -129,8 +129,16 @@ of a CPU by scaling down its voltage and frequency. Since DVFS lowers the frequ The execution time of a compute bound sequential program is linearly proportional to the frequency scaling factor $S$. On the other hand, message passing distributed applications consist of two parts: computation and communication. The execution time of the computation part is linearly proportional to the frequency scaling factor $S$ but the communication time is not affected by the scaling factor because the processors involved remain idle during the communications~\cite{17}. The communication time for a task is the summation of periods of time that begin with an MPI call for sending or receiving a message till the message is synchronously sent or received. -Since in a heterogeneous platform, each node has 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,..., 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 platform, 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 EQ (\ref{eq:perf}). +Since in a heterogeneous platform, each node has 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 platform, 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 EQ (\ref{eq:perf}). @@ -224,13 +232,34 @@ In the considered heterogeneous platform, each processor $i$ might have differen {}\min_{i=1,2,\dots,N} {T_{cmi}))} \end{multline} -Reducing the the frequencies of the processors according to the vector of scaling factors $(S_1, S_2,..., S_N)$ may degrade the performance of the application and thus, -increase the static energy because the execution time is increased~\cite{36}. +Reducing the 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 +increased~\cite{36}. \section{Optimization of both energy consumption and performance} \label{sec.compet} -Applying DVFS to lower level not surly reducing the energy consumption to minimum level. Also, a big scaling for the frequency produces high performance degradation percent. Moreover, by considering the drastically increase in execution time of parallel program, the static energy is related to this time -and it also increased by the same ratio. Thus, the opportunity for gaining more energy reduction is restricted. For that choosing frequency scaling factors is very important process to taking into account both energy and performance. In our previous work~\cite{45}, we are proposed a method that selects the optimal frequency scaling factor for an homogeneous cluster, depending on the trade-off relation between the energy and performance. In this work we have an heterogeneous cluster, at each node there is different scaling factors, so our goal is to selects the optimal set of frequency scaling factors, $Sopt_1,Sopt_2,...,Sopt_N$, that gives the best trade-off between energy consumption and performance. The relation between the energy and the execution time is complex and nonlinear, Thus, unlike the relation between the performance and the scaling factor, the relation of the energy with the frequency scaling factors is nonlinear, for more details refer to~\cite{17}. Moreover, they are not measured using the same metric. To solve this problem, we normalize the execution time by calculating the ratio between the new execution time (the scaled execution time) and the old one as follow: + +Applying DVFS to lower level not surly reducing the energy consumption to +minimum level. Also, a big scaling for the frequency produces high performance +degradation percent. Moreover, by considering the drastically increase in +execution time of parallel program, the static energy is related to this time +and it also increased by the same ratio. Thus, the opportunity for gaining more +energy reduction is restricted. For that choosing frequency scaling factors is +very important process to taking into account both energy and performance. In +our previous work~\cite{45}, we are proposed a method that selects the optimal +frequency scaling factor for an homogeneous cluster, depending on the trade-off +relation between the energy and performance. In this work we have an +heterogeneous cluster, at each node there is different scaling factors, so our +goal is to selects the optimal set of frequency scaling factors, +$Sopt_1,Sopt_2,\dots,Sopt_N$, that gives the best trade-off between energy +consumption and performance. The relation between the energy and the execution +time is complex and nonlinear, Thus, unlike the relation between the performance +and the scaling factor, the relation of the energy with the frequency scaling +factors is nonlinear, for more details refer to~\cite{17}. Moreover, they are +not measured using the same metric. To solve this problem, we normalize the +execution time by calculating the ratio between the new execution time (the +scaled execution time) and the old one as follow: \begin{multline} \label{eq:pnorm} P_\textit{Norm} = \frac{T_\textit{New}}{T_\textit{Old}}\\ @@ -247,19 +276,23 @@ By the same way, we are normalize the energy by calculating the ratio between th \sum_{i=1}^{N} {(Ps_i \cdot T_{New})}}{\sum_{i=1}^{N}{( Pd_i \cdot Tcp_i)} + \sum_{i=1}^{N} {(Ps_i \cdot T_{Old})}} \end{multline} -Where $T_{New}$ and $T_{Old}$ is computed as in EQ(\ref{eq:pnorm}). The second problem -is that the optimization operation for both energy and performance is not in the same direction. -In other words, the normalized energy and the normalized execution time curves are not at the same direction. -While the main goal is to optimize the energy and execution time in the same time. According to the -equations~(\ref{eq:enorm}) and~(\ref{eq:pnorm}), the set of frequency scaling factors $S_1,S_2,...,S_N$ reduce both the energy and the -execution time simultaneously. But the main objective is to produce maximum energy -reduction with minimum execution time reduction. Many researchers used different -strategies to solve this nonlinear problem for example see~\cite{19,42}, their -methods add big overheads to the algorithm to select the suitable frequency. -In this paper we are present a method to find the optimal set of frequency scaling factors to optimize both energy and execution time simultaneously -without adding a big overhead. Our solution for this problem is to make the optimization process -for energy and execution time follow the same direction. Therefore, we inverse the equation of the normalized -execution time, the normalized performance, as follows: +Where $T_{New}$ and $T_{Old}$ is computed as in EQ(\ref{eq:pnorm}). The second +problem is that the optimization operation for both energy and performance is +not in the same direction. In other words, the normalized energy and the +normalized execution time curves are not at the same direction. While the main +goal is to optimize the energy and execution time in the same time. According +to the equations~(\ref{eq:enorm}) and~(\ref{eq:pnorm}), the set of frequency +scaling factors $S_1,S_2,\dots,S_N$ reduce both the energy and the execution +time simultaneously. But the main objective is to produce maximum energy +reduction with minimum execution time reduction. Many researchers used +different strategies to solve this nonlinear problem for example +see~\cite{19,42}, their methods add big overheads to the algorithm to select the +suitable frequency. In this paper we are present a method to find the optimal +set of frequency scaling factors to optimize both energy and execution time +simultaneously without adding a big overhead. Our solution for this problem is +to make the optimization process for energy and execution time follow the same +direction. Therefore, we inverse the equation of the normalized execution time, +the normalized performance, as follows: \begin{multline} \label{eq:pnorm_inv} @@ -354,22 +387,22 @@ maximum frequency of node $i$ and the computation scaling factor $Scp_i$ as fol \item[$Ps_i$] array of the static powers for all nodes. \item[$Fdiff_i$] array of the difference between two successive frequencies for all nodes. \end{description} - \Ensure $Sopt_1, \dots ,Sopt_N$ is a set of optimal scaling factors + \Ensure $Sopt_1, \dots, Sopt_N$ is a set of optimal scaling factors \State $ Scp_i \gets \frac{\max_{i=1,2,\dots,N}(Tcp_i)}{Tcp_i} $ \State $F_{i} \gets \frac{Fmax_i}{Scp_i},~{i=1,2,\cdots,N}$ \State Round the computed initial frequencies $F_i$ to the closest one available in each node. \If{(not the first frequency)} - \State $F_i \gets F_i+Fdiff_i,~i=1,...,N.$ + \State $F_i \gets F_i+Fdiff_i,~i=1,\dots,N.$ \EndIf - \State $T_\textit{Old} \gets max_{~i=1,...,N } (Tcp_i+Tcm_i)$ + \State $T_\textit{Old} \gets max_{~i=1,\dots,N } (Tcp_i+Tcm_i)$ \State $E_\textit{Original} \gets \sum_{i=1}^{N}{( Pd_i \cdot Tcp_i)} +\sum_{i=1}^{N} {(Ps_i \cdot T_{Old})}$ \State $Dist \gets 0$ - \State $Sopt_{i} \gets 1,~i=1,...,N. $ + \State $Sopt_{i} \gets 1,~i=1,\dots,N. $ \While {(all nodes not reach their minimum frequency)} \If{(not the last freq. \textbf{and} not the slowest node)} - \State $F_i \gets F_i - Fdiff_i,~i=1,...,N.$ - \State $S_i \gets \frac{Fmax_i}{F_i},~i=1,...,N.$ + \State $F_i \gets F_i - Fdiff_i,~i=1,\dots,N.$ + \State $S_i \gets \frac{Fmax_i}{F_i},~i=1,\dots,N.$ \EndIf \State $T_{New} \gets max_\textit{~i=1,\dots,N} (Tcp_{i} \cdot S_{i}) + min_\textit{~i=1,\dots,N}(Tcm_i) $ \State $E_\textit{Reduced} \gets \sum_{i=1}^{N}{(S_i^{-2} \cdot Pd_i \cdot Tcp_i)} + $ \hspace*{43 mm} @@ -377,11 +410,11 @@ maximum frequency of node $i$ and the computation scaling factor $Scp_i$ as fol \State $ P_\textit{Norm} \gets \frac{T_\textit{Old}}{T_\textit{New}}$ \State $E_\textit{Norm}\gets \frac{E_\textit{Reduced}}{E_\textit{Original}}$ \If{$(\Pnorm - \Enorm > \Dist)$} - \State $Sopt_{i} \gets S_{i},~i=1,...,N. $ + \State $Sopt_{i} \gets S_{i},~i=1,\dots,N. $ \State $\Dist \gets \Pnorm - \Enorm$ \EndIf \EndWhile - \State Return $Sopt_1,Sopt_2, \dots ,Sopt_N$ + \State Return $Sopt_1,Sopt_2,\dots,Sopt_N$ \end{algorithmic} \caption{Heterogeneous scaling algorithm} \label{HSA} @@ -660,7 +693,22 @@ The results of applying the proposed scaling algorithm to NAS benchmarks is demo \caption{The average of energy and performance for all NAS benchmarks running with difference number of nodes} \end{figure} -In the NAS benchmarks there are some programs executed on different number of nodes. The benchmarks CG, MG, LU and FT executed on 2 to a power of (1, 2, 4, 8, ...) of nodes. The other benchmarks such as BT and SP executed on 2 to a power of (1, 2, 4, 9, ...) of nodes. We are take the average of energy saving, performance degradation and distances for all results of NAS benchmarks. The average of these three objectives are plotted to the number of nodes as in plots (\ref{fig:avg_eq} and \ref{fig:avg_neq}). In CG, MG, LU, and FT benchmarks the average of energy saving is decreased when the number of nodes is increased due to the increasing in the communication times as mentioned before. Thus, the average of distances (our objective function) is decreased linearly with energy saving while keeping the average of performance degradation the same. In BT and SP benchmarks, the average of energy saving is not decreased significantly compare to other benchmarks when the number of nodes is increased. Nevertheless, the average of performance degradation approximately still the same ratio. This difference is depends on the characteristics of the benchmarks such as the computation to communication ratio that has. +In the NAS benchmarks there are some programs executed on different number of +nodes. The benchmarks CG, MG, LU and FT executed on 2 to a power of (1, 2, 4, 8, +\dots{}) of nodes. The other benchmarks such as BT and SP executed on 2 to a +power of (1, 2, 4, 9, \dots{}) of nodes. We are take the average of energy +saving, performance degradation and distances for all results of NAS +benchmarks. The average of these three objectives are plotted to the number of +nodes as in plots (\ref{fig:avg_eq} and \ref{fig:avg_neq}). In CG, MG, LU, and +FT benchmarks the average of energy saving is decreased when the number of nodes +is increased due to the increasing in the communication times as mentioned +before. Thus, the average of distances (our objective function) is decreased +linearly with energy saving while keeping the average of performance degradation +the same. In BT and SP benchmarks, the average of energy saving is not decreased +significantly compare to other benchmarks when the number of nodes is +increased. Nevertheless, the average of performance degradation approximately +still the same ratio. This difference is depends on the characteristics of the +benchmarks such as the computation to communication ratio that has. \subsection{The results for different powers scenarios}