Index: papers/SMPaT-2012_DCWoRMS/elsarticle-DCWoRMS.tex
===================================================================
--- papers/SMPaT-2012_DCWoRMS/elsarticle-DCWoRMS.tex	(revision 657)
+++ papers/SMPaT-2012_DCWoRMS/elsarticle-DCWoRMS.tex	(revision 666)
@@ -320,5 +320,5 @@
 
 
-\subsection{Application performance modeling}
+\subsection{Application performance modeling}\label{sec:apps}
 
 In general, DCWoRMS implements user application models as objects describing computational, communicational as well as energy requirements and profiles of the task to be scheduled. Additionally, simulator provides means to include complex and specific application performance models during simulations. They allow researchers to introduce specific ways of calculating task execution time. These models can be plugged into the simulation environment through a dedicated API and implementation of an appropriate plugin. To specify the execution time of a task user can apply a number of parameters, including:
@@ -335,21 +335,83 @@
 
 
-\section{Modelling of energy efficiency in DCWoRMS}
-
-TODO - exact models used in experimental phase (here or in the next section??) 
-
-To facilitate the simulation process, DCWoRMS provides some basic implementation of power consumption, air throughput and thermal models.
-
-\subsection{Power consumption models}
+\section{Modeling of energy efficiency in DCWoRMS}
+
+DCWoRMS is an open framework in which various models and algorithms can be investigated as presented in Section \ref{sec:apps}. We discuss possible approaches to modeling that can be applied to simulation of energy-efficiency of distributed computing systems in this section. Additionally, to facilitate the simulation process, DCWoRMS provides some basic implementation of power consumption, air throughput and thermal models. We described them as examples and validate part of them by experiments in real computing system (in Section \ref{sec:experiments}).
+
+The most common questions explored by researchers who study energy-efficiency of distributed computing systems is how much energy $E$ do these systems require to execute workloads. In order to obtain this value the simulator must calculate values of power $P_i(t)$ and load $L_i(t)$ in time for all $m$ computing nodes, $i=1..m$. Load function may depend on specific load models applied. In more complex cases it can even be defined as vectors of different resource usage in time. In a simple case load can be either idle or busy but even in this case estimation of job processing times $p_j$ is needed to calculate total energy consumption. The total energy consumption of computing nodes is given by (\ref{eq:E}):
+
+\begin{equation}
+E=\sum_i^m{\int_t{P_i(t)}} \label{eq:E}
+\end{equation}
+
+
+Power function may depend on load and states of resources or even specific applications as explained in \ref{sec:power}. Total energy can be also completed by adding constant power usage of components that does not depend on load or state of resources. 
+
+In large computing systems which are often characterized by high computational density, total energy consumption of computing nodes is not the only result interesting for researchers. Temperature distribution is getting more and more important as it affects energy consumption of cooling devices, which can reach even half of a total data center energy use. In order to obtain accurate values of temperatures heat transfer simulations based on the Computational Fluid Dynamics (CFD) methods  have to be performed. These methods require as an input (i.e. boundary conditions) a heat dissipated by IT hardware and air throughput generated by fans at servers' outlets. Another approach is based on simplified thermal models that without costly CFD calculations provide rough estimations of temperatures. DCWoRMS enables the use of either approaches. In the the former, the output of simulations including power usage of computing nodes in time and air throughput at node outlets can be passed to CFD solver. This option is further elaborated in Section \ref{sec:coolemall}. Simplified thermal models required by the latter approach are proposed in \ref{sec:thermal}.
+
+
+\subsection{Power consumption models}\label{sec:power}
+
+As stated above power usage of computing nodes depend on a number of factors. 
+
+Generally, the power consumption of a modern CPU is given by the Ohm's law: 
+%\cite{intel_speedstep}:
+
+\begin{equation}
+P=C\cdot V_{core}^{2}\cdot f\label{eq:ohm-law}
+\end{equation}
+
+with $C$ being the processor switching capacitance, $V_{core}$ the
+current P-State's core voltage and $f$ the frequency. Based on the
+above equation it is suggested that although the reduction of frequency
+causes an increase in the time of execution, the reduction of frequency
+also leads to the reduction of $V_{core}$ and thus the power savings
+from the $P\sim V_{core}^{2}$ relation outweigh the increased computation
+time. However, experiments performed on several HPC servers shown that this dependency does not reflect theoretical shape and is often close to linear as presented in Figure \ref{fig:power}. This phenomenon can be explained by impact of other component than CPU and narrow range of available voltages. A good example of impact by other components is power usage of servers with visible influence of fans as illustrated in Figure \ref{fig:fans_P}.
+
+%
+\begin{figure}\label{fig:power}
+\centering
+\includegraphics[width=6cm]{fig/power_default}
+\caption{Average power usage with regard to CPU frequency\protect \\
+\textbf{Tests}: Linpack (\emph{green}), Abinit (\emph{purple}),
+Namd (\emph{blue}) and Cpuburn (\emph{red}). \protect \\
+}
+%
+\end{figure}
+
+\begin{figure}[tbp]
+\centering
+\includegraphics[width = 8cm]{fig/power-fans.png}
+\caption{\label{fig:fans_P} Power in time for highest frequency}
+\end{figure}
+
+
+For these reasons, DCWoRMS allows users to define dependencies between power usage and resource states (such as CPU frequency) in the form of tables or arbitrary functions using energy estimation plugins.
 
 The energy consumption models provided by default can be classified into the following groups, starting from the simplest model up to the more complex ones. Users can easily switch between the given models and incorporate new, visionary scenarios.
 
 \textbf{Static approach} is based on a static definition of resource power usage. This model calculates the total amount of energy consumed by the computing resource system as a sum of energy, consumed by all its components (processors, disks, power adapters, etc.). More advanced versions of this approach assume definition of resource states along with corresponding power usage. This model follows changes of resource power states and sums up the amounts of energy defined for each state.
+In this case, specific values of power usage are defined for all discrete $n$ states as shown in (\ref{eq:static}): 
+
+\begin{equation}
+S_1 \to P_1, S_2 \to P_2, ..., S_n \to P_n  \label{eq:static}
+\end{equation}
 
 \textbf{Resource load} model extends the static power state description and enhances it with real-time resource usage, most often simply the processor load. In this way it enables a dynamic estimation of power usage based on resource basic power usage and state (defined by the static resource description) as well as resource load. For instance, it allows distinguishing between the amount of energy used by idle processors and processors at full load. In this manner, energy consumption is directly connected with power state and describes average power usage by the resource working in a current state.
+In this case, specific values of power usage are defined for all pairs state and load values (discretized to $l$ values) as shown in (\ref{eq:load}): 
+
+\begin{equation}
+(S_1, L_1) \to P_{11}, (S_1, L_2) \to P_{12}, ...,  (S_2, L_1) \to P_{21}, ..., (S_n, L_l) \to P_{nl},  \label{eq:load}
+\end{equation}
 
 \textbf{Application specific} model allows expressing differences in the amount of energy required for executing various types of applications at diverse computing resources. It considers all defined system elements (processors, memory, disk, etc.), which are significant in total energy consumption. Moreover, it also assumes that each of these components can be utilized in a different way during the experiment and thus have different impact on total energy consumption. To this end, specific characteristics of resources and applications are taken into consideration. Various approaches are possible including making the estimated power usage dependent on defined classes of applications, ratio between CPU-bound and IO-bound operations, etc.
-
-\subsection{Air throughput models}
+In this case, power usage is an arbitrary function of state, load, and application characteristics as shown in (\ref{eq:app}): 
+
+\begin{equation}
+f(S, L, A) \to P \label{eq:app}
+\end{equation}
+
+\subsection{Air throughput models}\label{sec:air}
 
 The DCWoRMS comes with the following air throughput models.
@@ -360,5 +422,12 @@
 \textbf{Space} model allows taking into account a duct associated with the investigated air flow. On the basis of the given fan rotation speed and the obstacles before/behind the fans, the output air throughput can be roughly estimated, Thus, it is possible to estimate the air flow level not only referring to the current fan operating state but also with respect to the resource and its subcomponent placement. More advanced scenario may consider mutual impact of several air flows.
 
-\subsection{Thermal models}
+\subsection{Thermal models}\label{sec:thermal}
+
+\begin{figure}[tbp]
+\centering
+\includegraphics[width = 8cm]{fig/temp-fans.png}
+\caption{\label{fig:tempModel} Temperature in time for highest frequency}
+\end{figure}
+
 
 The following models are supported natively. By default, the static strategy is applied.
@@ -368,5 +437,5 @@
 \textbf{Ambient} model allows taking into account the surrounding cooling infrastructure. It calculates the device temperature as a function adopted from the static approach and extends it with the influence of cooling method. The efficiency of cooling system may be derived from the current air throughput value.
 
-\section{Experiments and evaluation}
+\section{Experiments and evaluation}\label{sec:experiments}
 
 Results + RECS and MOP description
@@ -413,5 +482,5 @@
 TODO - experiments
 
-\section{DCWoRMS application/use cases}
+\section{DCWoRMS application/use cases}\label{sec:coolemall}
 
 DCWoRMS in CoolEmAll, integration with CFD
