1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 \newcommand{\Tnorm}{\Xsub{T}{Norm}}
8 \newcommand{\Ltcm}[1][]{\Xsub{L}{tcm}_{\fxheight{#1}}}
9 \newcommand{\Etcm}[1][]{\Xsub{E}{tcm}_{\fxheight{#1}}}
10 \newcommand{\Niter}[1][]{\Xsub{N}{iter}_{\fxheight{#1}}}
12 \chapter{Energy Optimization of Asynchronous Applications}
16 \section{Introduction}
19 A grid is composed of heterogeneous clusters: CPUs from distinct clusters might have different computing power, energy consumption or frequency range.
20 Running synchronous parallel applications on grids results in long slack times where the fast nodes have to wait for the slower ones to finish their computations before synchronously exchanging data with them. Therefore, it is widely accepted that asynchronous parallel methods are more suitable than synchronous ones for such architectures because there is no slack time and the asynchronous communications are overlapped by computations. However, they usually execute more iterations than the synchronous ones and thus consume more energy.
21 In order to make the asynchronous method a good alternative to the synchronous one, it should not be just competitive in performance but also in energy consumption.
22 To reduce the energy consumption of a CPU executing the asynchronous iterative method, the Dynamic voltage and frequency scaling (DVFS) technique can be used. Modern operating systems automatically adjust the frequency of the processor according to their needs using DVFS operations. However, the user can scale down the frequency of the CPU using the on-demand governor \cite{ref96}. It lowers the frequency of a CPU to reduce its energy
23 consumption, but it also decreases its computing power and thus it might increase the
24 execution time of an application running on that processor. Therefore, the frequency that gives the best trade-off between energy consumption and performance must be selected. For parallel asynchronous methods running over a grid, a different frequency might be selected for each CPU in the grid depending on its characteristics.
25 In chapters \ref{ch2} and \ref{ch3}, three frequency selecting algorithms were proposed
26 to reduce the energy consumption of synchronous message passing applications with iterations running over homogeneous or heterogeneous platforms. In this chapter, a new frequency selecting algorithm for asynchronous iterative message passing applications running over grids is presented. An adaptation for hybrid methods, with synchronous and asynchronous communications, is also proposed.
27 The algorithm and its adaptation select the vector of frequencies which simultaneously offers a maximum energy reduction and minimum performance degradation ratio. The algorithm has a very small overhead and works online without needing any training nor any profiling.
29 This chapter is organized as follows: Section~\ref{ch4:2} presents some
30 related works from other authors. Models for predicting the performance and the energy consumption
31 of both synchronous and asynchronous iterative message passing programs
32 executed over grids are explained in Section~\ref{ch4:3}.
33 It also presents the objective function that maximizes the reduction of energy consumption while minimizing
34 the degradation of the program's performance, used to select the frequencies.
35 Section~\ref{ch4:5} details the proposed frequency selecting algorithm.
36 Section~\ref{ch4:6} presents the iterative multi-splitting application which is a hybrid method and was used as a benchmark to evaluate the efficiency of the proposed algorithm.
37 Section~\ref{ch4:7} presents the simulation results of applying the algorithm on the multi-splitting application
38 and executing it on different grid scenarios. It also shows the results of running
39 three different power scenarios and comparing them. Moreover, in the last subsection, the proposed algorithm is compared to the energy and delay product (EDP) method. Section \ref{ch4:8} presents the results of real experiments executed over the Grid'5000 platform and compared to the EDP method. Finally, the chapter ends with a summary.
45 \section{Related works}
49 A message passing application is in general composed of two types of sections, which are the computations and the communications sections. The communications can be done synchronously or asynchronously. In a synchronous message passing application, when a process synchronously sends a message to another node, it is blocked until the latter receives the message. During that time, there is no computation on both nodes and that period is called slack time.
50 On the contrary, in an asynchronous message passing application, the asynchronous communications are overlapped by computations, thus, there is no slack time.
51 Many techniques have been used to reduce the energy consumption of message passing applications,
52 such as scheduling, heuristics and DVFS. For example, different scheduling techniques, to switch off the idle nodes to save their energy consumption, were presented in \cite{ref83,ref84,ref85} and \cite{ref86}. In \cite{ref87}
53 and \cite{ref88}, an heuristic to manage the workloads between the computing resources of the cluster and reduce their energy, was published.
54 However, the dynamic voltage and frequency scaling (DVFS) is the most popular technique to reduce the energy consumption of computing processors.
56 As shown in the related works of chapter \ref{ch2}, most of the works in this field targeted the synchronous message passing applications because they are more common than the asynchronous ones and easier to work on. Some researchers tried to reduce slack times in synchronous applications running over homogeneous clusters. These slack times can happen on such architectures if the distributed workloads over the computing nodes are imbalanced.
57 Other works focused on reducing the energy consumption of synchronous applications running over heterogeneous architectures such as heterogeneous clusters or grids. When executing synchronous message passing applications on these architectures, slack times are generated when fast nodes have to communicate with slower ones. Indeed, the fast nodes have to wait for the slower ones to finish their computations to be able to communicate with them. In this case, some energy was saved as in the work of chapter \ref{ch3} and its related works by reducing the frequencies of the fast nodes with DVFS operations while minimizing the slack times.
59 Whereas, no work has been conducted to optimize the energy consumption of asynchronous message passing applications. Some works use asynchronous communications when applying DVFS operations on synchronous applications. For example, Hsu et al. \cite{ref92} proposed an online adaptive algorithm that divides the synchronous message passing application into several time periods and selects the suitable frequency for each one. The algorithm asynchronously applies the new computed frequencies to overlap the multiple DVFS switching times with computation. Similarly to this work, Zhu et al. \cite{ref93} studied the difference between applying synchronously or asynchronously the frequency changing algorithm during the execution time of the program. The results of the proposed asynchronous scheduler were more energy efficient than synchronous one. In \cite{ref94}, Vishnu et al. presented an energy efficient asynchronous agent that reduces the slack times in a parallel program to reduce the energy consumption. They used asynchronous communications in the proposed algorithm, which calls the DVFS algorithm many times during the execution time of the program. The three previous presented works were applied on applications running over homogeneous platforms.
61 In \cite{ref95}, the energy consumption of an asynchronous iterative linear solver running over a heterogeneous platform, is evaluated. The results showed that the asynchronous version of the application had less execution time than the synchronous one. Therefore, according to their energy model the asynchronous method consumes less energy.
62 However, in their model they do not consider that during synchronous communications only static power which is significantly lower than dynamic power, is consumed.
64 This chapter presents the following contributions:
66 \item new model to predict the energy consumption and the execution time
67 of asynchronous iterative message passing applications running over a grid platform.
69 \item a new online algorithm that selects a vector of frequencies which gives the best trade-off between energy consumption and performance for asynchronous iterative message passing applications running over a grid platform. The algorithm has a very small overhead
70 and does not need any training or profiling. The new algorithm can be applied synchronously and asynchronously on an iterative message passing application.
77 \section{The performance and the energy consumption measurement models}
80 \subsection{The execution time of iterative asynchronous message passing applications}
82 In this chapter, we are interested in running asynchronous iterative message
83 passing distributed applications over a grid while reducing the energy consumption of the
84 CPUs during the execution.
85 Figure \ref{fig:heter} is an example of a grid with four different clusters. Inside each cluster, all the nodes are homogeneous, have the same specifications, but are different from the nodes of the other clusters.
86 To reduce the energy consumption of these applications while running on a grid,
87 the heterogeneity of the clusters' nodes, such as nodes' computing powers (FLOPS), energy consumptions and
88 CPU's frequency ranges, must be taken into account. To reduce the complexity of the experiments and focus on the heterogeneity of the nodes, the local networks of all the clusters are assumed to be identical, with the same latency and bandwidth. The networks connecting the clusters are also assumed to be homogeneous but they are slower than the local networks.
92 \includegraphics[scale=0.9]{fig/ch4/GRID}
93 \caption{A grid platform composed of heterogeneous clusters}
98 An iterative application consists of a block of instructions that is repeatedly executed until convergence. A distributed iterative application with interdependent tasks requires, at each iteration, exchanging data between nodes to compute the distributed tasks. The communications between the nodes can be done synchronously or asynchronously. In the synchronous model, each node has to wait to receive data from all its neighbours to compute its iteration, see figures \ref{fig:ch1:15} and \ref{fig:ch1:16}.
99 Since the tasks are synchronized, all the nodes execute the same number of iterations.
100 Then, The overall execution time of an iterative synchronous message passing application with balanced tasks, running on the grid described above, is equal to the execution time of the slowest node in the slowest cluster running a task as presented in \ref{eq:perf_heter}.
103 Whereas, in the asynchronous model, the fast nodes do not have to wait for the slower nodes to finish their computations to exchange data, see Figure \ref{fig:ch1:17}. Therefore, there are no idle times between successive iterations, the node executes the computations with the last received data from its neighbours and the communications are overlapped by computations. Since there are no synchronizations between nodes, all nodes do not have the same number of iterations.
104 The difference in the number of executed iterations between the nodes depends on the heterogeneity of the computing powers of the nodes. The execution time of an asynchronous iterative message passing application is not equal to the execution time of the slowest node like in the synchronous mode because each node executes a different number of iterations. Moreover, the overall execution time is directly dependent on the method used to detect the global convergence of the asynchronous iterative application. The global convergence detection method might be synchronous or asynchronous and centralized or distributed.
106 In a grid, the nodes in each cluster have different characteristics, especially different frequency gears.
107 Therefore, when applying DVFS operations on these nodes, they may get different scaling factors represented
108 by a scaling vector: $(S_{11}, S_{12},\dots, S_{NM_i})$ where $S_{ij}$ is the
109 scaling factor of processor $j$ in the cluster $i$.
110 To be able to predict the execution time of asynchronous iterative message passing applications running
111 over a grid, for different vectors of scaling factors, the communication times and the computation times for all the tasks must be measured during the first iteration before applying any DVFS operation. Then, the execution time of one iteration of an asynchronous iterative message passing application,
112 running on a grid after applying a vector of scaling factors, is equal to the execution time of the synchronous application but without its communication times. The communication times are overlapped by computations and the execution time can be evaluated for all the application as the average of the execution time of all the parallel tasks. This is presented in Equation \ref{eq:asyn_time}.
116 \Tnew = \frac{\sum_{i=1}^{N} \sum_{j=1}^{M_i}({\TcpOld[ij]} \cdot S_{ij})} {N \cdot M_i }
120 In this work, a hybrid (synchronous/asynchronous) message passing application \cite{ref99} is being used. It is composed of two loops:
122 \item In the inner loop, at each iteration, the nodes in a cluster synchronously exchange data between them. There is no communication between nodes from different clusters.
123 \item In the outer loop, at each iteration, the nodes from different clusters asynchronously exchange their data between them because the network interconnecting the clusters has a high latency.
126 Therefore, the execution time of one outer iteration of such a hybrid application can be evaluated by computing the average of the execution time of the slowest node in each cluster. The overall execution time of the asynchronous iterative applications can be evaluated as follows:
130 \Tnew = \frac{\sum_{i=1}^{N} (\max_{j=1,\dots, M_i} ({\TcpOld[ij]} \cdot S_{ij}) +
131 \min_{j=1,\dots,M_i} ({\Ltcm[ij]}))}{N}
134 In Equation (\ref{eq:asyn_perf}), the communication times $\Ltcm[ij]$ are only the communications between the local nodes because the communications between the clusters are asynchronous and overlapped by computations.
137 \subsection{The energy model and trade-off optimization}
140 The energy consumption of an asynchronous application running over a heterogeneous grid is the summation of
141 the dynamic and static power of each node multiplied by the computation time of that node as in Equation (\ref{eq:asyn_energy1}). The computation time of each node is equal to the overall execution time of
142 the node because the asynchronous communications are overlapped by computations.
144 \label{eq:asyn_energy1}
145 E = \sum_{i=1}^{N} \sum_{j=1}^{M_i} {(S_{ij}^{-2} \cdot \Tcp[ij] \cdot (\Pd[ij]+\Ps[ij]) )}
149 It is common for distributed algorithms running over grids to have asynchronous external communications between clusters and synchronous ones between the nodes of the same cluster. In this hybrid communication scheme, the dynamic energy consumption can be computed in the same way as for the synchronous application with Equation (\ref{eq:Edyn_new}).
150 However, since the nodes of different clusters are not synchronized and do not have the same execution time as in the synchronous application, the static energy consumption is different between them. The cluster execution time is equal to the execution time of the slowest task in that cluster. The energy
151 consumption of the asynchronous iterative message passing application running on a
152 heterogeneous grid platform during one iteration can be computed as follows:
155 \label{eq:asyn_energy}
156 E = \sum_{i=1}^{N} \sum_{j=1}^{M_i} {(S_{ij}^{-2} \cdot \Pd[ij] \cdot \Tcp[ij])} + \sum_{i=1}^{N} \sum_{j=1}^{M_i} (\Ps[ij] \cdot
157 ( \mathop{\max_{j=1,\dots,M_i}} ({\Tcp[ij]} \cdot S_{ij}) + \mathop{\min_{j=1,\dots,M_i}} ({\Ltcm[ij]})))
159 Where $\Ltcm[ij]$ is the local communication time of the cluster $i$ of node $j$.
160 Reducing the frequencies of the processors according to the vector of scaling
161 factors $(S_{11}, S_{12},\dots, S_{NM_i})$ may degrade the performance of the application
162 and thus, increase the static energy consumed because the execution time is
163 increased~\cite{ref78}. The overall
164 energy consumption for the asynchronous application can be computed by multiplying the energy consumption
165 from one iteration of each cluster by the number of the iterations of that cluster, $\Niter[i]$,
166 as in Equation (\ref{eq:asyn_energy_it}).
170 \label{eq:asyn_energy_it}
171 E = \sum_{i=1}^{N} (\sum_{j=1}^{M_i} {(S_{ij}^{-2} \cdot \Pd[ij] \cdot \Tcp[ij])}) \cdot \Niter[i] + \sum_{i=1}^{N} (\sum_{j=1}^{M_i} (\Ps[ij] \cdot \\
172 ( \mathop{\max_{j=1,\dots,M_i}} ({\Tcp[ij]} \cdot S_{ij}) + \mathop{\min_{j=1,\dots,M_i}} ({\Ltcm[ij]})))) \cdot \Niter[i]
175 In order to optimize the energy consumption and the performance of the asynchronous iterative applications at the same time, the maximum distance between the two metrics can be computed as in the previous chapters.
176 However, both the energy model and performance must be normalized as in the Equations \ref{eq:enorm-heter} and
177 \ref{eq:pnorm-heter} respectively.
178 Hence, $\Tnew$ should be computed as in Equation~\ref{eq:asyn_perf} and $\Told$ computed as follows:
181 \Told = \frac{\sum_{i=1}^{N} (\max_{j=1,\dots, M_i} ({\TcpOld[ij]}) +
182 \min_{j=1,\dots,M_i} ({\Ltcm[ij]}))}{N}
185 The original energy consumption of asynchronous applications, $\Eoriginal$ is computed as in (\ref{eq:asyn_energy_original}).
190 \label{eq:asyn_energy_original}
191 E_{original} = \sum_{i=1}^{N} \sum_{j=1}^{M_i} {( \Pd[ij] \cdot \TcpOld[ij])} + \sum_{i=1}^{N} \sum_{j=1}^{M_i} (\Ps[ij] \cdot
192 ( \mathop{\max_{j=1,\dots,M_i}} ({\TcpOld[ij]} ) + \mathop{\min_{j=1,\dots,M_i}} ({\Ltcm[ij]})))
196 Then, the objective function can be modeled as the maximum
197 distance between the normalized energy curve and the normalized
198 performance curve over all available sets of scaling factors and is computed as in the
199 objective function \ref{eq:max-grid}.
202 \section[The scaling algorithm of asynchronous applications]{The scaling factors selection algorithm of asynchronous applications over grid}
204 The frequency selection algorithm~(\ref{HSA-asyn}) works online during the first iteration of asynchronous iterative message passing program running over a grid. The algorithm selects
205 the set of frequency scaling factors $\Sopt[11],\Sopt[12],\dots,\Sopt[NM_i]$ which maximizes
206 the distance, the tradeoff function (\ref{eq:max-grid}), between the predicted normalized energy consumption
207 and the normalized performance of the program. The algorithm is called just once in the iterative program and
208 it uses information gathered from the first iteration to approximate the vector of frequency scaling factors that gives the best tradeoff.
209 According to the returned vector of scaling factors, the DVFS algorithm (\ref{dvfs-heter}) computes the new frequency
210 for each node in the grid. It also shows where and when the proposed scaling algorithm is called in
211 the iterative message passing program.
215 \includegraphics[scale=0.65]{fig/ch4/init_freq}
216 \caption{Selecting the initial frequencies in a grid composed of four clusters}
220 In contrast to the scaling factors selection algorithm of synchronous applications running on the grid
221 (algorithm \ref{HSA-grid}), this algorithm computed the initial frequencies depending on the Equations
222 \ref{eq:Scp-grid} and \ref{eq:Fint-grid}. Figure~\ref{fig:st_freq} shows the selected initial frequencies of the grid composed of four different types of clusters that are presented in the Figure \ref{fig:heter}.
223 The only difference between the two algorithms is the energy and performance models that are used. Furthermore, this algorithm scales down all frequencies of nodes at each iteration, while other algorithm don't scaled down the frequency of the slowest node. However, the performance of asynchronous application does not depend on the performance of the slower nodes, while it depends on the performance of all nodes.
226 \begin{algorithmic}[1]
229 \item [{$N$}] number of clusters in the grid.
230 \item [{$M$}] number of nodes in each cluster.
231 \item[{$\Tcp[ij]$}] array of all computation times for all nodes during one iteration and with the highest frequency.
232 \item[{$\Tcm[ij]$}] array of all communication times for all nodes during one iteration and with the highest frequency.
233 \item[{$\Fmax[ij]$}] array of the maximum frequencies for all nodes.
234 \item[{$\Pd[ij]$}] array of the dynamic powers for all nodes.
235 \item[{$\Ps[ij]$}] array of the static powers for all nodes.
236 \item[{$\Fdiff[ij]$}] array of the differences between two successive frequencies for all nodes.
238 \Ensure $\Sopt[11],\Sopt[12] \dots, \Sopt[NM_i]$, a vector of scaling factors that gives the optimal tradeoff between energy consumption and execution time
240 \State $\Scp[ij] \gets \frac{\max_{i=1,2,\dots,N}(\max_{j=1,2,\dots,M_i}(\Tcp[ij]))}{\Tcp[ij]} $
241 \State $F_{ij} \gets \frac{\Fmax[ij]}{\Scp[i]},~{i=1,2,\cdots,N},~{j=1,2,\dots,M_i}.$
242 \State Round the computed initial frequencies $F_i$ to the closest available frequency for each node.
243 \If{(not the first frequency)}
244 \State $F_{ij} \gets F_{ij}+\Fdiff[ij],~i=1,\dots,N,~{j=1,\dots,M_i}.$
246 \State $\Told \gets \frac{\sum_{i=1}^{N} (\max\limits_{j=1,\dots, M_i} ({\TcpOld[ij]}) +
247 \min\limits_{j=1,\dots,M_i} ({\Ltcm[ij]}))}{N} $
249 \State $\Eoriginal \gets \sum\limits_{i=1}^{N} \sum\limits_{j=1}^{M_i} {( \Pd[ij] \cdot \TcpOld[ij])} + \sum\limits_{i=1}^{N} \sum\limits_{j=1}^{M_i} (\Ps[ij] \cdot
250 (\mathop{\max\limits_{j=1,\dots,M_i}} ({\TcpOld[ij]} ) + \mathop{\min\limits_{j=1,\dots,M_i}} ({\Ltcm[ij]})))$
251 \State $\Sopt[ij] \gets 1,~i=1,\dots,N,~{j=1,\dots,M_i}. $
252 \State $\Dist \gets 0 $
253 \While {(all nodes have not reached their minimum frequency \textbf{or} $\Pnorm - \Enorm < 0 $)}
254 \If{(not the last frequency)}
255 \State $F_{ij} \gets F_{ij} - \Fdiff[ij],~{i=1,\dots,N},~{j=1,\dots,M_i}$.
256 \State $S_{ij} \gets \frac{\Fmax[ij]}{F_{ij}},~{i=1,\dots,N},~{j=1,\dots,M_i}.$
258 \State $\Tnew \gets \frac{\sum\limits_{i=1}^{N} (\max\limits_{j=1,\dots, M_i} ({\TcpOld[ij]} \cdot S_{ij}) + \min\limits_{j=1,\dots,M_i} ({\Ltcm[ij]}))}{N} $
260 \State $\Ereduced \gets \sum\limits_{i=1}^{N} \sum\limits_{j=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
261 ( \mathop{\max\limits_{j=1,\dots,M_i}} ({\Tcp[ij]} \cdot S_{ij}) + \mathop{\min\limits_{j=1,\dots,M_i}} ({\Ltcm[ij]}))) $
262 \State $\Pnorm \gets \frac{\Told}{\Tnew}$
263 \State $\Enorm\gets \frac{\Ereduced}{\Eoriginal}$
264 \If{$(\Pnorm - \Enorm > \Dist)$}
265 \State $\Sopt[ij] \gets S_{ij},~i=1,\dots,N,~j=1,\dots,M_i. $
266 \State $\Dist \gets \Pnorm - \Enorm$
269 \State Return $\Sopt[11],\Sopt[12],\dots,\Sopt[NM_i]$
271 \caption{Scaling factors selection algorithm of asynchronous applications over grid}
278 \section{The iterative multi-splitting method }
281 Multi-splitting algorithms have been initially studied to
282 solve linear systems of equations in parallel
283 \cite{ref97}. Thereafter, they were used to design
284 non linear iterative algorithms and asynchronous iterative
285 algorithms~\cite{ref98}. The principle of multi-splitting
286 algorithms lies in splitting the system of equations, then solving
287 each sub-system using a direct or an iterative method and then
288 combining the results in order to build a global solution. Since a
289 multi-splitting method is iterative, it requires executing several iterations
290 in order to reach global convergence.
292 In this chapter, we have used an asynchronous iterative multisplitting method
293 to solve a 3D Poisson problem as described in~\cite{ref99}. The
294 problem is divided into small 3D sub-problems and each one is solved by a
295 parallel GMRES method. For more information about multi-splitting
296 algorithms, interested readers are invited to
297 consult the previous references.
300 \section{The experimental results over SimGrid}
302 In this section, the heterogeneous scaling algorithm (HSA), Algorithm~(\ref{HSA-asyn}), is applied to the parallel iterative
303 multi-splitting method. The performance of this algorithm is evaluated by
304 executing the iterative multi-splitting method on the Simgrid/SMPI simulator v3.10
305 \cite{ref66}. This simulator offers flexible tools to create a
306 grid architecture and run the iterative application over it. The grid used in these
307 experiments has four different types of nodes. Two types of nodes have different computing powers, frequency ranges, static and dynamic powers. Table \ref{table:platform}
308 presents the characteristics of the four types of nodes. The specifications of the simulated nodes are similar to real Intel processors.
309 Many grid configurations have been used in the experiments where the number of clusters and the number of nodes per cluster are equal to 4 or 8.
310 For the grids composed of 8 clusters, two clusters of each type of nodes were used. The number of nodes per cluster is the same for all the clusters in a given grid.
314 \caption{The characteristics of the four types of nodes}
317 \begin{tabular}{|*{7}{r|}}
319 node& Simulated & Max & Min & Diff. & Dynamic & Static \\
320 type & GFLOPS & Freq. & Freq. & Freq. & power & power \\
321 & of one node & GHz & GHz & GHz & & \\
323 A & 40 & 2.50 & 1.20 & 0.100 & \np[W]{20} & \np[W]{4} \\
325 B & 50 & 2.66 & 1.60 & 0.133 & \np[W]{25} & \np[W]{5} \\
327 C & 60 & 2.90 & 1.20 & 0.100 & \np[W]{30} & \np[W]{6} \\
329 D & 70 & 3.40 & 1.60 & 0.133 & \np[W]{35} & \np[W]{7} \\
332 \label{table:platform}
336 The CPUs' constructors do not specify the amount of static and dynamic powers their CPUs consume.
337 The maximum power consumption for each node's CPU was chosen to be proportional to its computing power (FLOPS). The dynamic power was assumed to represent \np[\%]{80} of the overall power consumption and the rest (\np[\%]{20}) is the static power. Similar assumptions were made in last two chapters and \cite{ref47}.
338 The clusters of the grid are connected via a long distance Ethernet network with
339 \np[Gbit/s]{1} bandwidth, while inside each cluster the nodes are connected via a high-speed \np[Gbit/s]{10} bandwidth local Ethernet network. The local networks have ten times less latency than the network connecting the clusters.
341 \subsection{The energy consumption and the execution time of the multi-splitting application}
343 The multi-splitting (MS) method solves a three dimensional problem of size $N=N_x \cdot N_y \cdot N_z$. The problem is divided into equal sub-problems which are distributed to the computing nodes of the grid and then solved.
344 The experiments were conducted on problems of size $N=400^3$
345 or $N=500^3$ that require more than $12$ and $24$ Gigabyte of memory, respectively.
346 Table \ref{table:comp} presents the different experiment scenarios with different numbers of clusters, nodes per cluster and problem sizes. A name, consisting in the values of these parameters was given to each scenario.
349 \caption{The different experiment scenarios}
352 \begin{tabular}{|*{7}{r|}}
354 Platform & Clusters & Number of nodes &Vector & Total number of \\
355 scenario & number & in cluster &size & nodes in grid \\
357 Grid.4*4.400 & 4 & 4 &$400^3$ &16 \\
359 Grid.4*8.400 & 4 & 8 &$400^3$ &32 \\
361 Grid.8*4.400 & 8 & 4 &$400^3$ &32 \\
363 Grid.8*8.400 & 8 & 8 &$400^3$ &64 \\
365 Grid.4*4.500 & 4 & 4 &$500^3$ &16 \\
367 Grid.4*8.500 & 4 & 8 &$500^3$ &32 \\
369 Grid.8*4.500 & 8 & 4 &$500^3$ &32 \\
371 Grid.8*8.500 & 8 & 8 &$500^3$ &64 \\
377 This section focuses on the execution time and the energy consumed by
378 the MS application while running over the grid platform without using DVFS operations.
379 The energy consumption of the synchronous and asynchronous MS was
380 measured using the energy Equations \ref{eq:energy-grid} and \ref{eq:asyn_energy} respectively.
381 Figures \ref{fig:eng_time_ms} (a) and (b) show the energy consumption
382 and the execution time, respectively, of the multi-splitting application running over a heterogeneous grid
383 with different numbers of clusters and nodes per cluster.
384 The synchronous and the asynchronous versions of the MS application were executed over each scenario in Table \ref{table:comp}.
385 As shown in Figure \ref{fig:eng_time_ms} (a), the asynchronous MS consumes more
386 energy than the synchronous one. Indeed, the asynchronous application overlaps the asynchronous communications with computations and thus it executes more iterations than the synchronous one and has no slack times. More computations result in more dynamic energy consumption by the CPU in the asynchronous MS and since the dynamic power is chosen to be four times higher than the static power, the asynchronous MS method consumes more overall energy than the synchronous one. However, the execution times of the experiments, presented in Figure \ref{fig:eng_time_ms} (b), show that the execution times of the
387 asynchronous MS are smaller than the execution times of the synchronous one. Indeed, in the
388 asynchronous application the fast nodes do not have to wait for the slower ones to exchange data. So there are no slack times and more iterations are executed by fast nodes which accelerates the convergence to the final solution.
393 \includegraphics[width=.80\textwidth]{fig/ch4/energy_ms.eps}\\~~~~~~(a)\\
394 \includegraphics[width=.82\textwidth]{fig/ch4/time_ms.eps}\\~~~~~~~~(b)
395 \caption{(a) energy consumption and (b) execution time of multi-splitting application without applying the HSA algorithm}
396 \label{fig:eng_time_ms}
400 The synchronous and asynchronous MS scale well. The execution times of both methods decrease linearly with the increase of the
401 number of computing nodes in the grid, whereas the energy consumption is approximately
402 the same when the number of computing nodes increases. Therefore, the energy consumption
403 of this application is not directly related to the number of computing nodes.
405 \subsection{The results of the scaling factor selection algorithm}
407 The scaling factor selection algorithm~\ref{HSA-asyn} was applied to both
408 synchronous and asynchronous MS applications which were
409 executed over the 8 possible scenarios presented in table~\ref{table:comp}.
410 The DVFS algorithm \ref{dvfs} needs to send and receive some information before
411 calling the scaling factor selection algorithm algorithm~\ref{HSA-asyn}. The communications of the DVFS algorithm
412 can be applied synchronously or asynchronously which results in four different versions of the application: synchronous or asynchronous MS with synchronous or asynchronous DVFS communications. Figures \ref{fig:eng_time_dvfs} (a) and (b) present the energy consumption and the execution time for the four different versions of the application running on all the scenarios in Table \ref{table:comp}.
417 \includegraphics[width=.82\textwidth]{fig/ch4/energy_dvfs.eps}\\~~~~~~~(a)\\
418 \includegraphics[width=.80\textwidth]{fig/ch4/time_dvfs.eps}\\~~~~~~~~(b)
419 \caption{(a) energy consumption and (b) execution time of different versions of the multi-splitting application after applying the HSA algorithm}
420 \label{fig:eng_time_dvfs}
422 Figure \ref{fig:eng_time_dvfs} (a) shows that the energy
423 consumption of all four versions of the method, running over the 8 grid scenarios described in Table \ref{table:comp}, are not affected by the increase in the number of computing nodes. MS without applying DVFS operations had the same behaviour. On the other hand, Figure \ref{fig:eng_time_dvfs} (b) shows that the execution time of the MS application with DVFS operations
424 decreases in inverse proportion to the number of nodes. Moreover, it can be noticed that the asynchronous MS with synchronous DVFS consumes less energy when compared to the other versions of the method. Two reasons explain this energy consumption reduction:
426 \item The asynchronous MS with synchronous DVFS version uses synchronous DVFS communications which allow it to apply the new computed frequencies at the beginning of the second iteration. Thus, reducing the consumption of dynamic energy by the application from the second iteration until the end of the application. Whereas in
427 asynchronous DVFS versions where the DVFS communications are asynchronous, the new frequencies cannot be computed at the end of the first iteration and consequently cannot be applied at the beginning of the second iteration.
428 Indeed, since the performance information gathered during the first iteration is not sent synchronously at the end of the first iteration, fast nodes might execute many iterations before receiving the performance information, computing the new frequencies based on this information and applying the new computed frequencies. Therefore, many iterations might be computed by CPUs running on their highest frequency and consuming more dynamic energy than scaled down processors.
430 \item As shown in Figure \ref{fig:eng_time_ms} (b), the execution time of the asynchronous MS version is lower than the execution time of the synchronous MS version because there is no idle time in the asynchronous version and the communications are overlapped by computations. Since the consumption of static energy is proportional to the execution time, the asynchronous MS version consumes less static energy than the synchronous version.
436 \includegraphics[scale=0.7]{fig/ch4/energy_saving.eps}
437 \caption{The energy saving percentages after applying the HSA algorithm to the different versions and scenarios}
438 \label{fig:energy_saving}
442 The energy saving percentage is the ratio between the reduced energy consumption after applying the HSA algorithm and the original energy consumption of synchronous MS without DVFS.
443 Whereas, the performance degradation percentage is the ratio between the original execution time of the synchronous MS without DVFS and the new execution time after applying the HSA algorithm.
444 Therefore, in this section, the synchronous MS method without DVFS serves as a reference for comparison with the other methods for the following terms: energy saving, performance degradation and the distance between the two previous terms.
446 In Figure \ref{fig:energy_saving}, the energy saving is computed for the four versions of the MS method which
447 are the synchronous or asynchronous MS that apply synchronously or asynchronously the HSA algorithm.
448 The fifth version is the asynchronous MS without any DVFS operations. Figure \ref{fig:energy_saving} shows that some versions have positive or negative energy saving percentages which means that the corresponding version respectively consumes less or more energy than the reference method.
449 As in Figure \ref{fig:eng_time_dvfs} (a) and for the same reasons presented above, the asynchronous MS with synchronous DVFS version gives the best energy saving percentage when compared to the other versions.
454 \includegraphics[scale=0.7]{fig/ch4/perf_degra.eps}
455 \caption{The results of the performance degradation}
456 \label{fig:perf_degr}
461 \includegraphics[scale=0.7]{fig/ch4/dist.eps}
462 \caption{The results of the tradeoff distance}
466 Figure \ref{fig:perf_degr} shows that some versions have negative performance
467 degradation percentages which means that the new execution time of a given version of the application is less than the execution time of the synchronous MS without DVFS.
468 Therefore, the version with the smallest negative performance degradation percentage has actually the best speed up when compared to the other versions. The version that gives the best execution time is the
469 asynchronous MS without DVFS which on average outperforms the synchronous MS without DVFS version by
470 $16.9\%$. While the worst case is the synchronous MS with synchronous DVFS where the performance is on average degraded by $2.9\%$ when compared to the reference method.
473 The energy consumption and performance trade-off between these five versions is presented in Figure \ref{fig:dist}.
474 These distance values are computed as the differences between the energy saving
475 and the performance degradation percentages as in the optimization function
476 (\ref{eq:max-grid}). Thus, the best MS version is the one that has the maximum distance between the energy saving and performance degradation. The distance can be negative if the energy saving percentage is less than the performance degradation percentage.
477 The asynchronous MS applying synchronously the HSA algorithm gives the best distance which is on average equal to $27.72\%$.
478 This version saves on average up to $22\%$ of energy and on average speeds up the application by $5.72\%$. This overall improvement is due to combining asynchronous computing and the synchronous application of the HSA algorithm.
481 The two platform scenarios, Grid 4*8 and Grid 8*4, use the same
482 number of computing nodes but give different trade-off results.
483 The versions applying the HSA algorithm and running over the Grid 4*8 platform, give higher distance percentages than those running on the Grid 8*4 platform. In the Grid 8*4 platform scenario more clusters are used than in the Grid 4*8 platform and thus the global system is divided into 8 small subsystems instead of 4. Indeed, each subsystem is assigned to a cluster and synchronously solved by the nodes of that cluster. Dividing the global system into smaller subsystems, increases the number of outer iterations required for the global convergence of the system because for the multi-splitting system the more the system is decomposed the higher the spectral radius is. For example, the asynchronous MS, applying synchronously the HSA algorithm, requires on average 135 outer iterations when running over the Grid 4*8 platform and 148 outer iterations when running over the Grid 8*4 platform. The increase in the number of executed iterations over the Grid 8*4 platform justifies the increase in energy consumption by applications running over that platform.
486 \subsection{Comparing the number of iterations executed by the different MS versions}
489 The heterogeneity in the computing power of the nodes in the grid has a direct
490 effect on the number of iterations executed by the nodes of each cluster when running an asynchronous iterative message passing method. The fast nodes execute more iterations than the slower ones because the iterations are not synchronized.
491 On the other hand, in the synchronous versions, all the nodes in all the clusters have the same number of iterations and have to wait for the slowest node to finish its iteration before starting the next iteration because the iterations are synchronized.
493 When the fast nodes asynchronously execute more iterations than the slower ones, they consume more energy without significantly improving the global convergence of the system. Reducing the frequency of the fast nodes will decrease the number of iterations executed by them. If all the nodes, the fast and the slow ones, execute close numbers of iterations, the asynchronous application will consume less energy and its performance will not be significantly affected.
494 Therefore, applying the HSA algorithm over asynchronous applications is very promising. In this section, the number of iterations executed by the asynchronous MS method, while solving a 3D problem of size $400^3$ with and without applying the HSA algorithm, is evaluated. In Table \ref{table:sd}, the standard deviation of the number of iterations executed by the asynchronous application over all the grid platform scenarios, is presented.
499 \caption{The standard deviation of the numbers of iterations for different asynchronous MS versions running over different grid platforms}
501 \begin{tabular}{|l|l|l|l|}
503 \multirow{2}{*}{\begin{tabular}[c]{@{}l@{}}Grid\\platform \end{tabular}}
504 & \multicolumn{3}{c|}{Standard deviation} \\ \cline{2-4}
505 & \begin{tabular}[c]{@{}l@{}}Asyn. MS without \\ HSA\end{tabular}
506 & \begin{tabular}[c]{@{}l@{}}Asyn. MS with \\ Asyn. HSA\end{tabular}
507 & \begin{tabular}[c]{@{}l@{}}Asyn. MS with \\ Syn. HSA\end{tabular} \\ \hline
508 Grid.4*4.400 & 60.43 & 13.86 & 1.12 \\ \hline
509 Grid.4*8.400 & 58.06 & 27.43 & 1.22 \\ \hline
510 Grid.8*4.400 & 50.97 & 20.76 & 1.15 \\ \hline
511 Grid.8*8.400 & 52.46 & 48.40 & 2.38 \\ \hline
515 A small standard deviation value means that there is a very small difference between
516 the numbers of iterations executed by the nodes which means fast nodes did not uselessly execute more iterations than the slower ones and the application does not waste a lot of energy. As shown in Table \ref{table:sd},
517 the asynchronous MS that applies synchronously the HSA algorithm has the best standard deviation value when compared to the other versions. Two reasons explain the advantage of this method:
519 \item The applied HSA algorithm selects new frequencies that reduce the computation power of the fast nodes while maintaining the computation power of the slower nodes. Therefore, it tries to balance as much as possible the computation powers of the heterogeneous nodes.
521 \item Applying synchronously the HSA algorithm scales down the frequencies of the CPUs at the end of the first iteration of the application. Therefore the computation power of all the nodes is balanced as much as possible since the beginning of the application. On the other hand, applying asynchronously the HSA algorithm onto the asynchronous MS application only changes the frequencies of the nodes after executing many iterations. Therefore, before the frequencies are scaled down, the fast nodes have enough time to execute many more iterations than the slower ones and consequently increase the overall energy consumption of the application.
525 Finally, the asynchronous MS version that does not apply the HSA algorithm gives the worst standard deviation values because there is a big difference between the numbers of iterations executed by the heterogeneous nodes. Therefore, this version consumes more energy than the other versions and thus saves less energy as shown in Figure \ref{fig:eng_time_dvfs} (a).
528 \subsection{Comparing different power scenarios}
531 In the previous sections, all the results were obtained by assuming that the dynamic and the static powers are respectively equal to 80\% and 20\% of the total power consumed by a CPU during computation at its highest frequency. The goal
532 of this section is to evaluate the proposed frequency scaling factors selection algorithm when
533 these two power ratios are changed. Two new power scenarios are proposed in this section:
535 \item The dynamic and the static power are respectively equal to 90\% and 10\% of the total power consumed by a CPU during computation at its highest frequency.
536 \item The dynamic and the static power are respectively equal to 70\% and 30\% of the total power consumed by a CPU during computation at its highest frequency.
538 The asynchronous MS method solving a 3D problem of size $400^3$ was executed over two
539 platform scenarios, the Grid 4*4 and Grid 8*4. Two versions of the asynchronous MS method, with synchronous or asynchronous application of the HSA algorithm, were evaluated on each platform scenario.
540 The energy saving, performance degradation and distance percentages for both versions over both platform
541 scenarios and with the three power scenarios are presented in Figures \ref{fig:three_power_syn} and \ref{fig:three_power_asyn}.
545 \includegraphics[width=.7\textwidth]{fig/ch4/three_powers_syn.eps}
546 \caption{The results of the three power scenarios: Synchronous application of the HSA algorithm}
547 \label{fig:three_power_syn}
552 \includegraphics[width=.7\textwidth]{fig/ch4/three_powers_Asyn.eps}
553 \caption{The results of the three power scenarios: Asynchronous application of the HSA algorithm}
554 \label{fig:three_power_asyn}
559 \includegraphics[scale=.7]{fig/ch4/three_scenarios.pdf}
560 \caption{Comparison of the selected frequency scaling factors by the HSA algorithm for the three power scenarios}
561 \label{fig:three_scenarios}
565 The displayed results are the average of the percentages obtained from multiple runs.
566 Both figures show that the \np[\%]{90}-\np[\%]{10} power scenario gives the biggest energy saving percentages.
567 The high dynamic power ratio pushes the HSA algorithm to select bigger scaling factors
568 which decreases exponentially the dynamic energy consumption. Figure \ref{fig:three_scenarios} shows that the HSA algorithm selects in the \np[\%]{90}-\np[\%]{10} power scenario higher frequency scaling factors than in the other power scenarios for the same application. Moreover, the \np[\%]{90}-\np[\%]{10} power scenario has the smallest static power consumption per CPU which reduces the effect of the performance degradation, due to scaling down the frequencies of the CPUs, on the total energy consumption of the application. Finally, the \np[\%]{90}-\np[\%]{10} power scenario gives higher distance percentages than the other two scenarios which means the difference between the energy reduction and the performance degradation percentages is the highest for this scenario. From these observations, it can be concluded that in a platform with CPUs that consume low static power and high dynamic power, a lot of energy consumption can be reduced by applying the HSA algorithm but the performance degradation might be significant.
570 The energy saving percentages are the smallest with the \np[\%]{70}-\np[\%]{30} power scenario. The high static power consumption in this scenario force the HSA algorithm to select small scaling factors in order not to significantly decrease the performance of the application. Indeed, scaling down more the frequency of the CPUs will significantly increase the total execution time and consequently increase the static energy consumption which will outweigh the reduction of dynamic energy consumption. Finally, since the dynamic power consumption ratio is relatively small in this power scenario less dynamic energy reduction can be gained in lowering the frequencies of the CPUs than in the other power scenarios. On the other hand, the \np[\%]{70}-\np[\%]{30} power scenario's main advantage is that its performance suffers the least from the application of the HSA algorithm. From these observations, it can be concluded that in a high static power model just a small percentage of energy can be saved by applying the HSA algorithm.
572 The asynchronous application of the HSA algorithm on average
573 improves the performance of the application more than the synchronous
574 application of the HSA algorithm. This difference can be explained by the fact that applying the HSA algorithm synchronously scales down the frequencies of the CPUs after the first iteration, while applying the HSA algorithm asynchronously scales them down after many iterations, depending on the heterogeneity of the platform.
575 However, for the same reasons as above, the synchronous application of the HSA algorithm reduces the energy consumption more than the asynchronous one even though, the method applying the first has a bigger execution time than the one applying the latter.
577 \subsection{Comparing the HSA algorithm to the energy and delay product method}
580 Many methods have been proposed to optimize the trade-off between the energy consumption and the performance of message passing applications. A well known optimization model used to solve this
581 problem is the energy and delay product, $\mathit{EDP}=\mathit{energy}\times \mathit{delay}$.
582 In \cite{ref100,ref60,ref55}, the researchers used equal weights for the energy and delay factors.
583 However, others added some weights to the factors in order to direct the optimization towards more energy saving or less performance degradation. For example, in ~\cite{ref71} they used the product $\mathit{EDP}=\mathit{energy}\times \mathit{delay}^2$ which favour performance over energy consumption reduction.
585 In this work, the proposed scaling factors selection algorithm optimizes both the energy consumption and the performance at the same time and gives the same weight to both factors as in Equation \ref{eq:max-grid}. In this section, to evaluate the performance of the HSA algorithm, it is compared to the algorithm proposed by Spiliopoulos et al. \cite{ref67}. The latter is an online method that selects for each processor the frequency that minimizes the energy and delay product in order to reduce the energy consumption of a parallel application running over a homogeneous multi-cores platform. It gives the same weight to both metrics and predicts both the energy consumption and the execution time for each frequency gear as in the HSA algorithm.
588 \includegraphics[width=.7\textwidth]{fig/ch4/compare_syndvfs_synms.eps}
589 \caption{Synchronous application of the frequency scaling selection method on the synchronous MS version}
590 \label{fig:compare_syndvfs_synms}
594 \includegraphics[width=.7\textwidth]{fig/ch4/compare_syndvfs_asynms.eps}
595 \caption{Synchronous application of the frequency scaling selection method on the asynchronous MS version}
596 \label{fig:compare_syndvfs_asynms}
600 \includegraphics[width=.7\textwidth]{fig/ch4/compare_asyndvfs_synms.eps}
601 \caption{Asynchronous application of the frequency scaling selection method on the synchronous MS version}
602 \label{fig:compare_asyndvfs_synms}
607 \includegraphics[width=.7\textwidth]{fig/ch4/compare_asyndvfs_asynms.eps}
608 \caption{Asynchronous application of the frequency scaling selection method on the asynchronous MS version}
609 \label{fig:compare_asyndvfs_asynms}
611 To fairly compare the HSA algorithm with the algorithm of Spiliopoulos et al., the same energy models, Equation (\ref{eq:energy-grid}) or (\ref{eq:asyn_energy}), and execution time models, Equation (\ref{eq:perf-grid}) or (\ref{eq:asyn_perf}), are used to predict the energy consumptions and the execution times.
612 The EDP objective function can be equal to zero when the predicted delay is equal to zero. Moreover, this product is equal to zero before applying any DVFS operation. To eliminate the zero values, the EDP function must take the following form:
615 EDP = E_{Norm} \times (1+ D_{Norm})
617 where $E_{Norm}$ is the normalized energy consumption which is computed as in Equation (\ref{eq:enorm})
618 and $D_{Norm}$ is the normalized delay of the execution time which is computed as follows:
621 D_{Norm}= 1 -P_{Norm}= 1- (\frac{T_{old}}{T_{new}})
623 Where $P_{Norm}$ is computed as in Equation (\ref{eq:pnorm}). Furthermore, the EDP algorithm starts the search process from the initial frequencies that are computed as in Equation (\ref{eq:Fint}). It stops the search process when it reaches the minimum available frequency for each processor. The EDP algorithm was applied to the synchronous and asynchronous MS algorithm solving a 3D problem of size $400^3$. Two platform scenarios, Grid 4*4 and Grid 4*8, were chosen for this experiment. The EDP method was applied synchronously and asynchronously to the MS application as for the HSA algorithm. The comparison results of the EDP and HSA algorithms are presented in the Figures \ref{fig:compare_syndvfs_synms}, \ref{fig:compare_asyndvfs_asynms},\ref{fig:compare_asyndvfs_synms} and \ref{fig:compare_asyndvfs_asynms}. Each of these figures presents the energy saving, performance degradation and distance percentages for one version of the MS algorithm. The results shown in these figures are also the average of the results obtained from running each version of the MS method over the two platform scenarios described above.
626 \includegraphics[scale=0.6]{fig/ch4/compare_scales.eps}
627 \caption{Comparison of the selected frequency scaling factors by the two algorithms
628 over the Grid 4*4 platform scenario}
629 \label{fig:three_methods}
631 All the figures show that the proposed HSA algorithm outperforms the EDP algorithm
632 in terms of energy saving and performance degradation. EDP gave for some scenarios negative trade-off values which mean that the performance degradation percentages are higher than
633 the energy saving percentages, while the HSA algorithm gives positive trade-off values over all scenarios.
634 The frequency scaling factors selected by the EDP are most of the time higher than those selected by the HSA algorithm as shown in Figure \ref{fig:three_methods}.
635 The results confirm that higher frequency scaling factors do not always give more energy saving, especially when the overall execution time is drastically increased. Therefore, the HSA method that computes the maximum distance between the energy saving and the performance degradation is an effective method to optimize these two metrics at the same time.
641 \section{The Experimental Results over Grid'5000}
643 The performance of algorithm ~(\ref{HSA-asyn}) was evaluated by
644 executing the iterative multi-splitting method on the Grid'5000 textbed \cite{ref21}.
645 This testbed is a large-scale platform that consists of ten sites distributed
646 all over metropolitan France and Luxembourg. Moreover, some sites are equipped with power measurement tools that capture the power consumption for each node on those sites. Same method for computing the dynamic power consumption described in section \ref{ch3:4} is used.
647 Table \ref{table:grid5000} presents the characteristics of the selected clusters which are located on four different sites.
650 \caption{CPUs characteristics of the selected clusters}
653 \begin{tabular}{|*{7}{c|}}
655 Cluster & CPU & Max Freq. & Min Freq. & Diff. Freq. & Site & Dynamic power \\
656 Name & model & GHz & GHz & GHz & & of one core \\
658 Taurus & Intel & 2.3 & 1.2 & 0.1 & Lyon & \np[W]{35} \\
659 & E5-2630 & & & & & \\
661 Graphene & Intel & 2.53 & 1.2 & 0.133 & Nancy & \np[W]{23} \\
664 Parapide & Inte & 2.93 & 1.6 & 0.133 & Rennes & \np[W]{23} \\
667 StRemi & AMD & 1.7 & 0.8 & 0.2 & Reims & \np[W]{6} \\
668 &6164 HE & & & & & \\
671 \label{table:grid5000}
673 The dynamic power of each core with maximum frequency is computed as the difference between the measured power of the core, only when it is computing at maximum frequency, and the measured power of that core when it is idle as in \ref{eq:pdyn}. The CPUs' constructors do not specify the amount of static power their CPUs consume. Therefore, the static power consumption is assumed to be equal to \np[\%]{20} of the dynamic power consumption.
674 The experiments were conducted on problems of size $N=400^3$ and $N=500^3$ over 4 distributed clusters described in Table \ref{table:grid5000}. Each cluster is composed of 8 homogeneous nodes.
677 Algorithm~\ref{HSA-asyn} was applied synchronously and asynchronously to both synchronous and asynchronous MS applications.
678 Figures \ref{fig:time-compare} and \ref{fig:energy-compare} show the energy consumption and the execution time of the multi-splitting application with and without the application of the HSA algorithm respectively.
679 The asynchronous MS consumes more energy than the synchronous one.
680 Also, it can be noticed that both the asynchronous and synchronous MS with synchronous application of the HSA algorithm consume less energy than the other versions of the application. Synchronously applying the HSA algorithm allows them to scale down the CPUs' frequencies at the beginning of the second iteration. Thus, the consumption of dynamic energy by the application is reduced from the second iteration until the end of the application. On the contrary, with the asynchronous application of the HSA algorithm, the new frequencies cannot be computed at the end of the first iteration and consequently cannot be applied at the beginning of the second iteration. Indeed, since the performance information gathered during the first iteration is not sent synchronously at the end of the first iteration, fast nodes might execute many iterations before receiving the performance information, computing the new frequencies based on this information and applying the new computed frequencies. Therefore, many iterations might be computed by CPUs running on their highest frequency and consuming more dynamic energy than the scaled down processors.
681 Moreover, the execution time of the asynchronous MS version is lower than the execution time of the synchronous MS version because there is no idle time in the asynchronous version and the communications are overlapped by computations. Since the consumption of static energy is proportional to the execution time, the asynchronous MS version consumes less static energy than the synchronous version.
685 \includegraphics[width=.8\textwidth]{fig/ch4/time-compare.eps}
686 \caption{ Comparing the execution time}
687 \label{fig:time-compare}
692 \includegraphics[width=.8\textwidth]{fig/ch4/energy-compare.eps}
693 \caption{ Comparing the energy consumption}
694 \label{fig:energy-compare}
700 \begin{tabular}{|l|l|l|l|l|}
702 Size & Method &\begin{tabular}[c]{@{}l@{}}Energy\\ saving \%\end{tabular} & \begin{tabular}[c]{@{}l@{}}Perf. \\ degra.\%\end{tabular} & Distance \\ \hline
703 \multirow{4}{*}{400} & Sync MS with Sync DVFS & 23.16 & 4.12 & 19.04 \\ \cline{2-5}
704 & Sync MS with Async DVFS & 18.36 & 2.59 & 15.77 \\ \cline{2-5}
705 & Async MS with Sync DVFS & 26.93 & -21.48 & 48.41 \\ \cline{2-5}
706 & Async MS with Async DVFS & 14.9 & -26.41 & 41.31 \\ \hline
707 \multirow{4}{*}{500} & Sync MS with Sync DVFS & 24.57 & 3.15 & 21.42 \\ \cline{2-5}
708 & Sync MS with Async DVFS & 19.97 & 0.60 & 19.37 \\ \cline{2-5}
709 & Async MS with Sync DVFS & 20.69 & -10.95 & 31.64 \\ \cline{2-5}
710 & Async MS with Async DVFS & 9.06 & -18.22 & 27.28 \\ \hline
712 \caption{The experimental results of HSA algorithm}
716 Table \ref{table:exper} shows that there are positive and negative performance
717 degradation percentages. A negative value means that the new execution time of a given version of the application is less than the execution time of the synchronous MS without DVFS.
718 Therefore, the version with the smallest negative performance degradation percentage has actually the best speed up when compared to the other versions.
719 The energy consumption and performance trade-offs between these four versions can be computed as in the optimization Function
720 (\ref{eq:max-grid}). The asynchronous MS applying synchronously the HSA algorithm gives the best distance which is equal to $48.41\%$.
721 This version saves up to $26.93\%$ of energy and even reduces the execution time of the application by
722 $21.48\%$. This overall improvement is due to combining asynchronous computing and the synchronous application of the HSA algorithm.
725 Finally, this section shows that the obtained results over Grid'5000 are comparable to the
726 simulation results of Section \ref{ch4:7:2}, the asynchronous MS applying synchronously the HSA algorithm is the best version in both of sections. Moreover, the results over Grid'5000 are better
727 than simulation results because the computing clusters used in the Grid'5000 experiments are more heterogeneous in term of the computing power and network characteristics than the simulated platform with SimGrid. For example, the nodes in StRemi cluster have lower computing powers compared to the other used three clusters of Grid'5000 platform.
728 As a result, the increase in the heterogeneity between the clusters' computing nodes increases the idle times which forces the proposed algorithm to select a big scaling factors and thus saving more energy.
735 \subsection{Comparing the HSA algorithm to the energy and delay product method}
737 The EDP algorithm, described in Section \ref{ch4:7:5}, was applied synchronously and asynchronously to both the synchronous and asynchronous MS application of size $N=400^3$. The experiments were conducted over 4 distributed clusters, described in Table \ref{table:grid5000}, and 8 homogeneous nodes were used from each cluster.
738 Table \ref{table:comapre} presents the results of energy saving, performance degradation and distance percentages when applying the EDP method on four different MS versions.
739 Figure \ref{fig:compare} compares the distance percentages, computed as the difference between energy saving and performance degradation percentages, of the EDP and HSA
740 algorithms. This comparison shows that the proposed HSA algorithm gives better energy reduction and performance trade-off than the EDP method. EDP gives better results when evaluated over Grid'5000 than over the simulator because the nodes used from Grid'5000 are more heterogeneous than those simulated with SimGrid.
744 \caption{The EDP algorithm results over the Grid'5000}
745 \label{table:comapre}
746 \begin{tabular}{|l|l|l|l|}
748 Method name & Energy saving \% & Perf. degra.\% & Distance \% \\ \hline
749 Sync MS with Sync DVFS & 21.83 & 12.78 & 9.05 \\ \hline
750 Sync MS with Async DVFS & 18.26 & 7.68 & 10.58 \\ \hline
751 Async MS with Sync DVFS & 24.95 & -12.24 & 37.19 \\ \hline
752 Async MS with Async DVFS & 10.32 & -17.04 & 27.36 \\ \hline
758 \includegraphics[scale=0.65]{fig/ch4/compare.eps}
759 \caption{Comparing the trade-off percentages of HSA and EDP methods over the Grid'5000}
765 \section{Conclusions}
767 This chapter presents a new online frequency selection algorithm for asynchronous iterative
768 applications running over a grid. It selects the best vector of frequencies that maximizes
769 the distance between the predicted energy consumption and the predicted execution time.
770 The algorithm uses new
771 energy and performance models to predict the energy consumption and the execution time of asynchronous or hybrid message passing iterative applications running over grids.
772 The proposed algorithm was evaluated twice over the SimGrid simulator and Grid'5000 testbed while running a multi-splitting (MS) application that solves 3D problems.
773 The experiments were executed over different
774 grid scenarios composed of different numbers of clusters and different numbers of nodes per cluster.
775 The HSA algorithm was applied synchronously and asynchronously on a synchronous and an asynchronous version of the MS application. Both the simulation and real experiment results show that applying synchronous HSA algorithm on an asynchronous MS application gives the best trade-off between energy consumption reduction and performance compared to other scenarios.
776 In the simulation results, this scenario saves on average the energy consumption by 22\% and reduces the execution time of the application by 5.72\%. This version optimizes both of the dynamic energy consumption by applying synchronously the HSA algorithm at the end of the first iteration and the static energy consumption by using asynchronous communications between nodes from different clusters which are overlapped by computations. The HSA algorithm was also evaluated over three power scenarios. As expected, the algorithm selects different vectors of frequencies for each power scenario. The highest energy consumption reduction was achieved in the power scenario with the highest dynamic power and the lowest performance degradation was obtained in the power scenario with the highest static power.
777 The proposed algorithm was compared to another method that
778 uses the well known energy and delay product as an objective function.
779 The comparison results showed that the proposed algorithm outperforms the latter
780 by selecting a vector of frequencies that gives a better trade-off between the energy
781 consumption reduction and the performance.
783 The experiments conducted over Grid'5000 showed that applying the synchronous HSA algorithm on an asynchronous MS application gives the best results. It saves the energy consumption by 26.93\% and reduces the execution time of the application by 21.48\%. The experiments executed over Grid'5000 give better results than those simulated with SimGrid because the nodes used in Grid'5000 were more heterogeneous than the ones simulated by SimGrid.