Guillaume Aupy

Anne Benoit

Rami Melhem

Paul Renaud-Goud

Yves Robert

Energy-aware checkpointing of divisible tasks with soft or hard deadlines

Keywords: Fault-tolerance, checkpointing, energy, model Tolérance aux pannes, checkpoint, énergie, modèle

In this paper, we aim at minimizing the energy consumption when executing a divisible workload under a bound on the total execution time, while resilience is provided through checkpointing. We discuss several variants of this multi-criteria problem. Given the workload, we need to decide how many chunks to use, what are the sizes of these chunks, and at which speed each chunk is executed. Furthermore, since a failure may occur during the execution of a chunk, we also need to decide at which speed a chunk should be re-executed in the event of a failure. The goal is to minimize the expectation of the total energy consumption, while enforcing a deadline on the execution time, that should be met either in expectation (soft deadline), or in the worst case (hard deadline). For each problem instance, we propose either an exact solution, or a function that can be optimized numerically. The different models are then compared through an extensive set of experiments.

Introduction

Divisible load scheduling has been extensively studied in the past years [START_REF] Bharadwaj | Scheduling Divisible Loads in Parallel and Distributed Systems[END_REF][START_REF] Drozdowski | Divisible load. In Scheduling for Parallel Processing[END_REF]. For divisible applications, the computational workload can be divided into an arbitrary number of chunks, whose sizes can be freely chosen by the user. Such applications occur for instance in the processing of very large data files, e.g., signal processing, linear algebra computation, or DNA sequencing. Traditionally, the goal is to minimize the makespan of the application, i.e., the total execution time.

Nowadays, high performance computing is facing a major challenge with the increasing frequency of failures [START_REF] Dongarra | The international exascale software project: a call to cooperative action by the global high-performance community[END_REF]. There is a need to use fault tolerance or resilience mechanisms to ensure the efficient progress and correct termination of the applications in the presence of failures. A well-established method to deal with failures is checkpointing: a checkpoint is taken at the end of the execution of each chunk. During the checkpoint, we check for the accuracy of the result; if the result is not correct, due to a transient failure (such as a memory error or software error), the chunk is re-executed. This model with transient failures is one of the most used in the literature, see for instance [START_REF] Zhu | The effects of energy management on reliability in real-time embedded systems[END_REF][START_REF] Degalahal | Soft errors issues in low-power caches[END_REF].

Furthermore, energy-awareness is now recognized as a first-class constraint in the design of new scheduling algorithms. To help reduce energy dissipation, current processors from AMD, Intel and Transmetta allow the speed to be set dynamically, using a dynamic voltage and frequency scaling technique (DVFS). Indeed, a processor running at speed s dissipates s 3 watts per unit of time [START_REF] Aydin | Energy-aware partitioning for multiprocessor realtime systems[END_REF]. We therefore focus on two objective functions: execution time and energy consumption, while resilience is ensured through checkpointing. More precisely, we aim at minimizing energy consumption, including that of checkpointing and re-execution in case of failure, while enforcing a bound on execution time.

Given a workload W , we need to decide how many chunks to use, and of which sizes. Using more chunks leads to a higher checkpoint cost, but smaller chunks imply less computation loss (and less re-execution) when a failure occurs. We assume that a chunk can fail only once, i.e., we re-execute each chunk at most once. Indeed, the probability that a fault would strike during both the first execution and the re-execution is negligible. We discuss the accuracy of this assumption in Section 4.

Due to the probabilistic nature of failure hits, it is natural to study the expectation E(E) of the energy consumption, because it represents the average cost over many executions. As for the bound D on execution time (the deadline), there are two relevant scenarios: either we enforce that this bound is a soft deadline to be met in expectation, or we enforce that this bound is a hard deadline to be met in the worst case. The former scenario corresponds to flexible environment where task deadlines can be viewed as average response times [START_REF] Buttazzo | Soft Real-Time Systems: Predictability vs. Efficiency[END_REF], while the latter scenario corresponds to real-time environments where task deadlines are always strictly enforced [START_REF] Stankovic | Deadline Scheduling for Real-Time Systems: EDF and Related Algorithms[END_REF]. In both scenarios, we have to determine the number of chunks, their sizes, and the speed at which to execute (and possibly re-execute) every chunk.

Our first contribution is to formalize this important multi-objective problem. The general problem consists of finding n, the number of chunks, as well as the speeds for the execution and the re-execution of each chunk, both for soft and hard deadlines. We identify and discuss two important sub-cases that help tackling the most general problem instance: (i) a single chunk (the task is atomic); and (ii) re-execution speed is always identical to first execution speed. The second contribution is a comprehensive study of all problem instances; for each instance, we propose either an exact solution, or a function that can be optimized numerically. We also analytically prove the accuracy of our model that enforces a single re-execution per chunk. We then compare the different models through an extensive set of experiments. We compare the optimal energy consumption under various models with a set of different parameters. It turns out that when λ is small, it is sufficient to restrict the study to a single chunk, while when λ increases, it is better to use multiple chunks and different reexecution speeds.

The rest of the paper is organized as follows. First we discuss related work in Section 2. The model and the optimization problems are formalized in Section 3. We discuss the accuracy of the model in Section 4. We first focus in Section 5 on the simpler case of an atomic task, i.e., with a single chunk. The general problem with multiple chunks, where we need to decide for the number of chunks and their sizes, is discussed in Section 6. In Section 7, we report several experiments to assess the differences between the models, and the relative gain due to chunking or to using different speeds for execution and re-execution. Finally, we provide some concluding remarks and future research directions in Section 8.

Related work

Dynamic power management through voltage/frequency scaling [START_REF] Weiser | Scheduling for reduced CPU energy. Operating Systems Design and Implementation[END_REF] utilizes the slack in a given computation to reduce energy consumption while checkpointing.The authors of [START_REF] Chandy | Distributed snapshots: determining global states of distributed systems[END_REF][START_REF] Geist | Selection of a checkpoint interval in a critical-task environment[END_REF] utilize that slack to improve the reliability of the computation. Hence, it is natural to explore the interplay of power management and fault tolerance [START_REF] Melhem | The interplay of power management and fault recovery in real-time systems[END_REF], when both techniques result in delaying the completion time of tasks, thus resulting in a tradeoff between power consumption, reliability and performance. This tri-criteria optimization problem has been explored by many researchers, especially in real-time and embedded systems where the completion time of a task is as important as the reliability of its result.

The power/reliability/performance tradeoff has been explored from many different angles. In [START_REF] Zhang | Energy-aware adaptive checkpointing in embedded real-time systems[END_REF], an adaptive scheme is presented to place checkpoints based on the expected frequency of faults and is combined with dynamic speed scaling depending on the actual occurrence of faults. Similarly, in [START_REF] Melhem | The interplay of power management and fault recovery in real-time systems[END_REF], the placement of checkpoints is chosen in a way that minimizes the total energy consumption assuming that the slack reserved for rollback recovery is used for speed scaling if faults do not occur. In [START_REF] Zhu | The effects of energy management on reliability in real-time embedded systems[END_REF], the effect of frequency scaling on the fault rate was considered and incorporated into the optimization problem. In [START_REF] Zhu | Energy management for real-time embedded systems with reliability requirements[END_REF], the study of the tri-criteria optimization was extended to the case of multiple tasks executing on the same processor. In [START_REF] Pop | Scheduling and voltage scaling for energy/reliability trade-offs in fault-tolerant time-triggered embedded systems[END_REF], a constraint logic programming-based approach is presented to decide for the voltage levels, the start times of processes and the transmission times of messages, in such a way that transient faults are tolerated, timing constraints are satisfied and energy is minimized.

Recently, off-line scheduling heuristics that consider the three criteria were presented for systems where active replication, rather than fault recovery, is used to enhance reliability [START_REF] Assayad | Tradeoff exploration between reliability, power consumption, and execution time[END_REF]. Selective re-execution of some tasks were considered RR n°8238 in [START_REF] Aupy | Energy-aware scheduling under reliability and makespan constraints[END_REF] to achieve a given level of reliability while minimizing energy, when tasks graphs are scheduled on multiprocessors with hard deadlines. Approximation algorithms for particular types of task graphs were presented to efficiently solve the same problem in [START_REF] Aupy | Approximation algorithms for energy, reliability and makespan optimization problems[END_REF].

In this work, we consider two types of deadlines that are commonly used for real-time tasks; hard and soft deadlines. In hard real-time systems [START_REF] Stankovic | Deadline Scheduling for Real-Time Systems: EDF and Related Algorithms[END_REF], deadlines should be strictly met and any computation that does not meet its deadline is not useful to the system. These systems are built to cope with worst-case scenarios, especially in critical applications where catastrophic consequences may result from missing deadlines. Soft real-time systems [START_REF] Buttazzo | Soft Real-Time Systems: Predictability vs. Efficiency[END_REF] are more flexible and are designed to adapt to system changes that may prevent the meeting of the deadline. They are suited to novel applications such as multimedia and interactive systems. In these systems, it is desired to reduce the expected completion time rather than to meet hard deadlines.

Framework

Given a workload W , the problem is to divide W into a number of chunks and to decide at which speed each chunk is executed. In case of a transient failure during the execution of one chunk, this chunk is re-executed, possibly at a different speed. We formalize the model in Section 3.1, and then different variants of the optimization problem are defined in Section 3.

Model

Consider first the case of a single chunk (or atomic task) of size W , denoted as SingleChunk. We execute this chunk on a processor that can run at several speeds. We assume continuous speeds, i.e., the speed of execution can take an arbitrary positive real value. The execution is subject to failure, and resilience is provided through the use of checkpointing. The overhead induced by checkpointing is twofold: execution time T C , and energy consumption E C .

We assume that failures strike with uniform distribution, hence the probability that a failure occurs during an execution is linearly proportional to the length of this execution. Consider the first execution of a task of size W executed at speed s: the execution time is T exec = W/s + T C , hence the failure probability is P fail = λT exec = λ(W/s+T C ), where λ is the instantaneous failure rate. If there is indeed a failure, we re-execute the task at speed σ (which may or may not differ from s); the re-execution time is then T reexec = W/σ + T C so that the expected execution time is

E(T ) = T exec + P fail T reexec = (W/s + T C ) + λ(W/s + T C )(W/σ + T C ) . (1)
Similarly, the worst-case execution time is

T wc = T exec + T reexec = (W/s + T C ) + (W/σ + T C ) . (2)
Remember that we assume success after re-execution, so we do not account for second and more re-executions. Along the same line, we could spare the checkpoint after re-executing the last task in a series of tasks, but this unduly complicates the analysis. In Section 4, we show that this model with only a single re-execution is accurate up to second order terms when compared to the model with an arbitrary number of failures that follows an Exponential distribution of parameter λ.

What is the expected energy consumed during execution? The energy consumed during the first execution at speed s is W s 2 +E C , where E C is the energy consumed during a checkpoint. The energy consumed during the second execution at speed σ is W σ 2 + E C , and this execution takes place with probability P fail = λT exec = λ(W/s + T C ), as before. Hence the expectation of the energy consumed is

E(E) = (W s 2 +E C )+λ (W/s+T C ) W σ 2 +E C . (3)
With multiple chunks (MultipleChunks model), the execution times (worst case or expected) are the sum of the execution times for each chunk, and the expected energy is the sum of the expected energy for each chunk (by linearity of expectations).

We point out that the failure model is coherent with respect to chunking. Indeed, assume that a divisible task of weight W is split into two chunks of weights w 1 and w 2 (where w 1 + w 2 = W ). Then the probability of failure for the first chunk is P 1 fail = λ(w 1 /s + T C ) and that for the second chunk is P 2 fail = λ(w 2 /s + T C ). The probability of failure P fail = λ(W/s + T C ) with a single chunk differs from the probability of failure with two chunks only because of the extra checkpoint that is taken; if T C = 0, they coincide exactly. If T C > 0, there is an additional risk to use two chunks, because the execution lasts longer by a duration T C . Of course this is the price to pay for a shorter re-execution time in case of failure: Equation [START_REF] Assayad | Tradeoff exploration between reliability, power consumption, and execution time[END_REF] shows that the expected re-execution time is P fail T reexec , which is quadratic in W . There is a trade-off between having many small chunks (many T C to pay, but small re-execution cost) and a few larger chunks (fewer T C , but increased re-execution cost).

Optimization problems

The optimization problem is stated as follows: given a deadline D and a divisible task whose total computational load is W , the problem is to partition the task into n chunks of size w i , where n i=1 w i = W , and choose for each chunk an execution speed s i and a re-execution speed σ i in order to minimize the expected RR n°8238 energy consumption:

E(E) = n i=1 (w i s 2 i + E C ) + λ w i s i + T C w i σ 2 i + E C ,
subject to the constraint that the deadline is met either in expectation or in the worst case:

Expected-Deadline E(T ) = n i=1 wi si + T C + λ wi si + T C wi σi + T C ≤ D Hard-Deadline T wc = n i=1 wi si + T C + wi σi + T C ≤ D
The unknowns are the number of chunks n, the sizes of these chunks w i , the speeds for the first execution s i and the speeds for the second execution σ i . We consider two variants of the problem, depending upon re-execution speeds:

• SingleSpeed : in this simpler variant, the re-execution speed is always the same as the speed chosen for the first execution. We then have to determine a single speed for each chunk: σ i = s i for all i.

• MultipleSpeeds : in this more general variant, the re-execution speed is freely chosen, and there are two different speeds to determine for each chunk.

We also consider the variant with a single chunk (SingleChunk), i.e., the task is atomic and we only need to decide for its execution speed (in the Sin-gleSpeed model), or for its execution and re-execution speeds (in the Multi-pleSpeeds model). We start the study in Section 5 with this simpler problem.

Accuracy of the model

In this section, we discuss the accuracy of this model, which accounts for a single re-execution. We compare the expressions of the expected deadline and energy (in Equations ( 1) and (3)) to those obtained when adopting the more advanced model where an arbitrary number of Exponentially distributed failures can strike during execution and re-execution. We only deal with soft deadlines here, because no hard deadline can be enforced for the model with Exponentially distributed failures (the execution time of a chunk can be arbitrarily large, although such an event has low probability to occur).

Assume that failures are distributed using an Exponential distribution of parameter λ: the probability of failure during a time interval of length t is P fail = 1 -e -λt . Consider a single task of size W that we first execute at speed s. If we detect a transient failure at the end of the execution, we re-execute the task until success, using speed σ at each of these new attempts. To the best of our knowledge, the expressions for E(T ) and E(E) are unknown for this model, and we establish them below: Proposition 1. With an arbitrary number of Exponentially distributed failures and one single task of size W ,

E(T ) = W/s + T C + e λ(W/σ+T C ) 1 -e -λ(W/s+T C ) (W/σ + T C ) (4)
E(E) = W s 2 + E C + e λ(W/σ+T C ) 1 -e -λ(W/s+T C ) W σ 2 + E C (5)
Proof. With an Exponential distribution, Equation ( 1) can be rewritten as E(T ) = T exec + P fail E(T reexec ), where T exec = W/s + T C and P fail = 1e -λ(W/s+T C ) . Since all re-executions are done at speed σ, the expectation of the re-execution time obeys the following equation:

E(T reexec ) = (W/σ + T C ) + 1 -e -λ(W/σ+T C ) E(T reexec )
We use the memoryless property of the Exponential distribution here: after a failure, the expectation of the time to re-execute the task is exactly the same as before the failure This leads to E(T reexec ) = e λ(W/σ+T C ) (W/σ + T C ). Reporting in the first equation, we end up with Equation ( 4). The expression of the expected energy consumption (Equation ( 5)) is derived using the same line of reasoning.

Proposition 2. With an arbitrary number of Exponentially distributed failures and one single task of size W , when λ → 0,

E(T ) = (W/s + T C ) + λ(W/s + T C )(W/σ + T C ) + O λ 2 (6)
E(E) = (W s 2 + E C ) + λ(W/s + T C )(W σ 2 + E C ) + O λ 2 (7)
Proof. The first-order Taylor expansion of x → e x around 0 gives:

E(T ) = λ→0 (W/s + T C )+ 1 + λ(W/s + T C ) + O λ 2 (W/s + T C ) 2 × λ(W/σ + T C ) + O λ 2 (W/σ + T C ) 2 (W/σ + T C )
Hence,

E(T ) = λ→0 (W/s + T C ) + λ(W/s + T C ) + O λ 2 (W/σ + T C ) E(T ) = λ→0 (W/s + T C ) + λ(W/s + T C )(W/σ + T C ) + O λ 2
Again, the energy formula is built using the same rationale.

As a consequence of Proposition 2, the formulas that we consider with one single re-execution (Equations ( 1) and ( 3)) are accurate up to second order terms when compared to the model with an arbitrary number of Exponential failures. Note that this result is not obvious, because we drop a potentially arbitrarily large number of re-executions in the linear model with at most one re-execution. Furthermore, the result extends naturally when considering a divisible task and MultipleChunks, since the result holds for each chunk, and by summation, one single re-execution of each chunk is accurate up to second order terms.

With a single chunk

In this section, we consider the case of a single chunk, or equivalently of an atomic task: given a non-divisible workload W and a deadline D, find the values of s and σ that minimize

E(E) = (W s 2 + E C ) + λ W s + T C W σ 2 + E C RR n°8238
subject to

E(T ) = W s + T C + λ W s + T C W σ + T C ≤ D
in the Expected-Deadline model, and subject to

W s + T C + W σ + T C ≤ D
in the Hard-Deadline model. We first deal with the SingleSpeed model, where we enforce σ = s, before moving on to the MultipleSpeeds model.

Single speed model

In this section, we express E(E) as functions of the speed s. That is,

E(E)(s) = (W s 2 +E C )(1+λ(W/s+T C )).
The following result is valid for both Expected-Deadline and Hard-Deadline models.

Lemma 1. E(E) is convex on R + . It admits a unique minimum s = λW 6(1 + λT C ) -(3 √ 3 √ 27a 2 -4a -27a + 2) 1/3 2 1/3 - 2 1/3 (3 √ 3 √ 27a 2 -4a -27a + 2) 1/3 -1 (8)
where

a = λE C 2(1+λT C ) λW 2 .
Proof. Let us prove that g(s) = E(E)(s) is convex and admits a unique minimum: we have g (s) = s(2W

(1 + λT C )) + λW 2 -λW E C s 2 , g (s) = (2W (1 + λT C )) + 2λW E C s 3 > 0. This function is strictly convex in R + , and g → 0 + -∞, g → ∞ ∞
thus there exist a unique minimum. Let us find the minimum. For s > 0, we have:

g (s) = 0 ⇔ 2(1 + λT C ) λW 3 s 3 + 2(1 + λT C ) λW 2 s 2 -λE C 2(1 + λT C ) λW 2 = 0 ⇔ X 3 + X 2 -λE C 2(1 + λT C ) λW 2 = 0 where X = 2(1 + λT C ) λW s
Using a computer algebra software, it is easy to show that the minimum is obtained at the value s = s given by Equation 8.

Expected deadline

In the SingleSpeed Expected-Deadline model, we denote E(T )(s) = (W/s+ T C )(1 + λ(W/s + T C )) the constraint on the execution time.

Lemma 2. For any D, if T C + λT 2 C ≥ D, then there is no solution. Otherwise, the constraint on the execution time can be rewritten as

s ∈ W 1 + 2λT C + √ 4λD + 1 2(D -T C (1 + λT C ))
, +∞ .

RR n°8238

Proof. The function s → E(T )(s) is strictly decreasing and converges to

T C + λT 2 C . Hence, if T C + λT 2 C ≥ D,
then there is no solution. Else there exist a minimum speed s 0 such that, E(T )(s 0 ) = D, and for all s ≥ s 0 , E(T )(s) ≤ D.

More precisely, s

0 = W 1 + 2λT C + √ 4λD + 1 2(D -T C (1 + λT C ))
: since there is a unique solution to E(T )(s) = D, we can solve this equation in order to find s 0 .

To simplify the following results, we define

s 0 = W 1 + 2λT C + √ 4λD + 1 2(D -T C (1 + λT C )) . ( 9
)
Proposition 3. In the SingleSpeed model, it is possible to numerically compute the optimal solution for SingleChunk as follows:

1. If T C + λT 2 C ≥ D, then there is no solution;

2. Else, the optimal speed is max(s 0 , s ).

Proof. This is a corollary of Lemma 1: because s → E(T )(s) is convex on R + , then its restriction to the interval [s 0 , +∞( is also convex and admits a unique minimum:

• if s < s 0 , then E(T ) (s) is increasing on [s 0 , +∞(, then the optimal solution is s 0

• else, clearly the minimum is reached when s = s .

The optimal solution is then max(s 0 , s ).

Hard deadline

In the Hard-Deadline model, the bound on the execution time can be written as 2 W s + T C ≤ D Lemma 3. In the SingleSpeed Hard-Deadline model, for any D, if 2T C ≥ D, then there is no solution. Otherwise, the constraint on the execution time can be rewritten as s ∈ Proof. The fact that there is no solution when 2T C ≥ D comes from Lemma 3. Otherwise, the result is obvious by convexity of the expected energy function.

RR n°8238

Multiple speeds model

In this section, we consider the general MultipleSpeeds model. We use the following notations:

E(E)(s, σ) = (W s 2 + E C ) + λ(W/s + T C )(W σ 2 + E C )
Let us first introduce a preliminary Lemma: Lemma 4 (Convexity SingleChunk). The problem of minimizing A 0 + α 0 x 2 under the constraint A 1 + α1

x ≤ A 2 where A 0 , A 1 , A 2 are constants and α 0 , α 1 are positive constants is solved when x is minimum, that is when

A 1 + α1 x = A 2 . Proof. The function A 0 + α 0 x 2 is strictly increasing, so it is is minimized when x is minimum. The function A 1 + α1
x is strictly decreasing with lim x→0 = +∞, hence an upper bound is reached when x is minimum. With those two results, we can say that the constraint should be tight in order to solve our problem.

Expected deadline

The execution time in the MultipleSpeeds Expected-Deadline model can be written as

E(T )(s, σ) = (W/s + T C ) + λ(W/s + T C )(W/σ + T C )
We start by giving a useful property, namely that the deadline is always tight in the MultipleSpeeds Expected-Deadline model: Lemma 5. In the MultipleSpeeds Expected-Deadline model, in order to minimize the energy consumption, the deadline should be tight. Proof. Considering s and W fixed, then E(T )(s, σ) = T 0 + α σ ≤ D, and Lemma 4 we conclude that the deadline should be tight. This lemma allows us to express σ as a function of s:

E(E)(s, σ) = E 0 + ασ 2 , where T 0 = (W/s + E C ) + λT C (W/s + T C ), E 0 = (W s 2 + E C ) + λE C (W/s + T C ) and α = W (W/s + T C ) are constant. With
σ = λW D W s +T C -(1 + λT C ) .
Also we reduce the bi-criteria problem to the minimization problem of the singlevariable function:

s → W s 2 + E C + λ W s + T C   W   λW D W s +T C -(1 + λT C )   2 + E C    (10)
which can be solved numerically.

Hard deadline

In this model we have similar results as with Expected-Deadline. The constraint on the execution time writes:

W s +T C + W σ +T C ≤ D.
Another corollary of Lemma 4 is: Lemma 6. In the MultipleSpeeds Expected-Deadline model, in order to minimize the energy consumption, the deadline should be tight.

This lemma allows us to express σ as a function of s:

σ = W (D -2T C )s -W s
Finally, we reduce the bi-criteria problem to the minimization problem of the single-variable function:

s → W s 2 + E C + λ W s + T C W W (D -2T C )s -W s 2 + E C (11)
which can be solved numerically.

Several chunks

In this section, we deal with the general problem of a divisible task of size W that can be split into an arbitrary number of chunks. We divide the task into n chunks of size w i such that n i=1 w i = W . Each chunk is executed once at speed s i , and re-executed (if necessary) at speed σ i . The problem is to find the values of n, w i , s i and σ i that minimize

E(E) = i w i s 2 i + E C + λ i w i s i + T C w i σ 2 i + E C subject to i w i s i + T C + λ i w i s i + T C w i σ i + T C ≤ D
in the Expected-Deadline model, and subject to

i w i s i + T C + i w i σ i + T C ≤ D
in the Hard-Deadline model. We first deal with the SingleSpeed model, where we enforce σ i = s i , before dealing with the MultipleSpeeds model.

RR n°8238

6.1 Single speed model

Expected deadline

In this section, we deal with the SingleSpeed Expected-Deadline model and consider that for all i, σ i = s i . Then:

E(T )(∪ i (w i , s i , s i )) = i w i s i + T C + λ i w i s i + T C 2 E(E)(∪ i (w i , s i , s i )) = i w i s 2 i + E C 1 + λ w i s i + T C Theorem 1.
In the optimal solution to the problem with the SingleSpeed Expected-Deadline model, all n chunks are of equal size W/n and executed at the same speed s.

Proof. Consider the optimal solution, and assume by contradiction that it includes two chunks w 1 and w 2 , executed at speeds s 1 and s 2 , where either s 1 = s 2 , or s 1 = s 2 and w 1 = w 2 . Let us assume without loss of generality that w1 s1 ≥ w2 s2 . We show that we can find a strictly better solution where both chunks have size w = 1 2 (w 1 + w 2 ), and are executed at same speed s (to be defined later). The size and speed of the other chunks are kept the same. We will show that the execution time of the new solution is not larger than in the optimal solution, while its energy consumption is strictly smaller, hence leading to the contradiction.

We have seen that

E(T )((w 1 , s 1 ), (w 2 , s 2 )) = w 1 s 1 + T C + w 2 s 2 + T C + λ w 1 s 1 + T C 2 + λ w 2 s 2 + T C 2 E(T )((w, s), (w, s)) = 2 w s + T C + 2λ w s + T C 2
Hence,

E(T )((w 1 , s 1 ), (w 2 , s 2 ))-E(T )((w, s), (w, s)) = w 1 s 1 + w 2 s 2 - 2w s +λ w 1 s 1 2 + w 2 s 2 2 -2 w s 2
Similarly, we know that:

E(E)((w 1 , s 1 ), (w 2 , s 2 )) = w 1 s 2 1 + E C + w 2 s 2 2 + E C + λ w 1 s 1 +T C w 1 s 2 1 +E C + λ w 2 s 2 +T C w 2 s 2 2 +E C E(E)((w, s), (w, s)) = 2 ws 2 + E C + 2λ w s + T C ws 2 + E C
and deduce

E(E)((w 1 , s 1 ), (w 2 , s 2 )) -E(E)((w, s), (w, s)) = w 1 s 2 1 + w 2 s 2 2 -2ws 2 (1 + λT C ) + λE C w 1 s 1 + w 2 s 2 - 2w s + λ w 2 1 s 1 + w 2 2 s 2 -2w 2 s (12)

RR n°8238

Let us now define

s A = 2w w1 s1 + w2 s2 = w 1 + w 2 w1 s1 + w2 s2 s B = √ 2w w1 s1 2 + w2 s2 2 1/2 = w 1 + w 2 2 w1 s1 2 +2 w2 s2 2 1/2
We then fix s = max(s A , s B ). Then, since s ≥ s A , we have w1 s1 + w2 s2 -2w s ≥ 0, and since s ≥ s B , we have

w1 s1 2 + w2 s2 2 -2 w s 2 ≥ 0. This ensures that E(T )((w 1 , s 1 ), (w 2 , s 2 )) -E(T )((w, s), (w, s)) ≥ 0.
Note that

(w 1 + w 2 ) 2 s 2 B - (w 1 + w 2 ) 2 s 2 A = 2 w 1 s 1 2 + 2 w 2 s 2 2 - w 1 s 1 + w 2 s 2 2 = w 1 s 1 - w 2 s 2 2 ≥ 0
This means that s A ≥ s B , hence s = s A . To prove that E(E)((w 1 , s 1 ), (w 2 , s 2 ))-E(E)((w, s), (w, s)) > 0, we want to show that:

1. w 1 s 2 1 + w 2 s 2 2 -2ws 2 ≥ 0 2. w1 s1 + w2 s2 -2w s ≥ 0 3. w 2 1 s 1 + w 2 2 s 2 -2w 2 s ≥ 0
4. and that one of the previous inequalities is strict.

Note that by definition of s = s A , the second inequality is true.

Let us first show that

w 1 s 2 1 + w 2 s 2 2 -2ws 2 A ≥ 0 w 1 s 1 + w 2 s 2 2   w 1 s 2 1 + w 2 s 2 2 -(w 1 + w 2 ) w 1 + w 2 w1 s1 + w2 s2 2   = w 3 1 + w 1 w 2 2 s 1 s 2 2 + 2 w 1 w 2 s 1 s 2 w 1 s 2 1 + w 3 2 + w 2 w 2 1 s 2 s 1 2 + 2 w 2 w 1 s 1 s 2 w 2 s 2 2 -(w 1 + w 2 ) 3 = w 1 w 2 2 s 1 s 2 2 + 2 s 2 s 1 -3 + w 2 1 w 2 s 2 s 1 2 + 2 s 1 s 2 -3 = w 1 w 2 2 g s 1 s 2 + w 2 1 w 2 g s 2 s 1 where g : u → u 2 + 2 u -3. It is easy to show that g is nonnegative on R + : indeed, g (u) = 2 u 2 (u 3 -1) is negative in [0, 1[ and positive in ]1, ∞[,
and the unique minimum is g(1) = 0. We derive that w

1 s 2 1 + w 2 s 2 2 -2ws 2 A ≥ 0.
Let us now show that

w 2 1 s 1 + w 2 2 s 2 -2w 2 s ≥ 0 Remember that 2w = w 1 + w 2 . 2 w 1 s 1 + w 2 s 2   w 2 1 s 1 + w 2 2 s 2 - (w 1 + w 2 ) 3 2 w1 s1 + w2 s2   = 2w 3 1 + 2w 2 1 w 2 s 1 s 2 + 2w 3 2 + 2w 1 w 2 2 s 2 s 1 -(w 1 + w 2 ) 3 = w 3 1 + w 3 2 + w 2 1 w 2 2 s 1 s 2 -3 + w 1 w 2 2 2 s 2 s 1 - 3
Remember that we assumed without loss of generality that w1 s1 ≥ w2 s2 .

2 w 1 s 1 + w 2 s 2   w 2 1 s 1 + w 2 2 s 2 - (w 1 + w 2 ) 3 2 w1 s1 + w2 s2   ≥w 3 2 s 1 s 2 3 +1+ s 1 s 2 2 2 s 1 s 2 -3 + s 1 s 2 2 s 2 s 1 -3 ≥3w 3 2 s 1 s 2 3 - s 1 s 2 2 - s 1 s 2 +1 ≥3w 3 2 s 1 s 2 -1 2 s 1 s 2 +1 ≥ 0
Let us now conclude our study: if s1 s2 = 1, then the energy consumption of the optimal solution is strictly greater than the one from our solution which is a contradiction. Hence we must have s 1 = s 2 , and w 1 = w 2 (in fact, since we assumed that w1 s1 ≥ w2 s2 , we must have w 1 > w 2 ). Then we can refine the previous analysis, and obtain that w 2 1 s 1 + w 2 2 s 2 -2w 2 s > 0: again, the optimal energy consumption is strictly greater than in our solution; this is the final contradiction and concludes the proof.

Thanks to this result, we know that the problem with n chunks can be rewritten as follows: find s such that

n W ns + T C + nλ W ns + T C 2 = W s + nT C + λ n W s + nT C 2 ≤ D in order to minimize n W n s 2 + E C + nλ W ns + T C W n s 2 + E C = W s 2 + nE C 1 + λ n W s + nT C
One can see that this reduces to the SingleChunk problem with the Sin-gleSpeed model (Section 5.1) up to the following parameter changes:

• λ ← λ n • T C ← nT C • E C ← nE C RR n°8238
If the number of chunks n is given, we can express the minimum speed such that there is a solution with n chunks:

s 0 (n) = W 1 + 2λT C + 4 λD n + 1 2(D -nT C (1 + λT C )) . ( 13
)
We can verify that when D ≤ nT C (1 + λn), there is no solution, hence obtaining an upper bound on n. Therefore, the two variables problem (with unknowns n and s) can be solved numerically.

Hard deadline

In the Hard-Deadline model, all results still hold, they are even easier to prove since we do not need to introduce a second speed.

Theorem 2. In the optimal solution to the problem with the SingleSpeed Hard-Deadline model, all n chunks are of equal size W/n and executed at the same speed s.

Proof. The proof is similar to the one of Theorem 1, except we do not need to study the case where s B > s A .

Multiple speeds model

Expected deadline

In this section, we still deal with the problem of a divisible task of size W that we can split into an arbitrary number of chunks, but using the more general MultipleSpeeds model. We start by proving that all re-execution speeds are equal:

Let us first introduce a preliminary Lemma:

Lemma 7 (Convexity MultipleChunks). The problem of minimizing A 0 + α 0 x 2 0 + α 1 x 2 1 under the constraint α0 x0 + α1 x1 ≤ A 1 where A 0 is a constant, and A 1 , α 0 , α 1 are positive constants, is solved when x 0 = x 1 , and when the constraint is tight: α0 x0 + α1 x1 = A 1 . Proof. First remark that when x 1 is fixed, then according to Lemma 4, the constraint should be tight. Hence this is true for the optimal solution (any optimal solution when the constraint is not tight can be improved by reducing one of the variables).

To prove the result now that we know that the constraint is tight, it suffices to replace in the function we wish to minimize,

x 0 = α0 A1- α 1 x 1 . Differentiating A 0 + α 0 × α0 A1- α 1 x 1 2 + α 1 x 2
1 with respect to x 1 gives -

2α1α 3 0 x 2 1 A1- α 1 x 1 3 + 2α 1 x 1 .
Then we obtain that the equation is minimized (by differentiating again, we can see that the function is convex) when -

2α1α 3 0 x 2 1 A1- α 1 x 1 3 + 2α 1 x 1 = 0, that is -x 0 + x 1 = 0, hence the result.
Note that if A 1 is nonpositive, then there is no solution.

RR n°8238

Lemma 8. In the MultipleSpeeds model, all re-execution speeds are equal in the optimal solution: ∃σ, ∀i, σ i = σ, and the deadline is tight.

Proof. This is a direct corollary of Lemma 7. If we consider the w i and s i to be fixed, then we can write E(T )(∪ i (w i , s i , σ i )) = T 0 + i αi σi , and

E(E)(∪ i (w i , s i , σ i )) = E 0 + i α i σ 2
i , where T 0 , E 0 and α i are constant. Assuming D -T 0 > 0 (otherwise there is no solution), we can apply Lemma 7, then the problem is minimized when the deadline is tight, and when for all i, σ i = i αi D-T0 . We can now redefine

E(T )(∪ i (w i , s i , σ i )) = T (∪ i (w i , s i ), σ) E(E)(∪ i (w i , s i , σ i )) = E(∪ i (w i , s i ), σ)
Theorem 3. In the MultipleSpeeds model, all chunks have the same size w i = W n , and are executed at the same speed s, in the optimal solution. Proof. We first prove that chunks are of equal size. Assume first, by contradiction, that the optimal solution has two chunks of different sizes, for instance w 1 < w 2 . These chunks are executed at speeds s 1 and s 2 . Thanks to Lemma 8, both chunks are re-executed at a same speed σ. We consider the solution with two chunks of size w = 1 2 (w 1 + w 2 ), executed at a same speed s (to be defined later), and re-executed at speed σ (the value of the re-execution speed in the optimal solution). The size and speed of the other chunks are kept the same. We show that the execution time is not greater than in the optimal solution, while the energy consumption is strictly smaller, hence leading to the contradiction.

We have seen that

E(T )((w 1 , s 1 ), (w 2 , s 2 ), σ) = w 1 s 1 + T C + w 2 s 2 + T C + λ w 1 s 1 + T C w 1 σ + T C + λ w 2 s 2 + T C w 2 σ + T C E(T )((w, s), (w, s), σ) = 2 w s + T C + 2λ w s + T C w σ + T C
Hence,

E(T )((w 1 , s 1 ), (w 2 , s 2 ), σ) -E(T )((w, s), (w, s), σ) = (1 + λT C ) w 1 s 1 + w 2 s 2 - 2w s + λ σ w 2 1 s 1 + w 2 2 s 2 - 2w 2 s
Similarly, we know that:

E(E)((w 1 , s 1 ), (w 2 , s 2 ), σ) = w 1 s 2 1 + E C + w 2 s 2 2 + E C + λ w 1 s 1 + T C w 1 σ 2 + E C + λ w 2 s 2 + T C w 2 σ 2 + E C E(E)((w, s), (w, s), σ) = 2 ws 2 + E C + 2λ w s + T C wσ 2 + E C RR n°8238
and deduce

E(E)((w 1 , s 1 ), (w 2 , s 2 ), σ) -E(E)((w, s), (w, s), σ) = w 1 s 2 1 + w 2 s 2 2 -2ws 2 + λE C w 1 s 1 + w 2 s 2 - 2w s + λσ 2 w 2 1 s 1 + w 2 2 s 2 - 2w 2 s ( 14
)
Let us now define

s A = 2w w1 s1 + w2 s2 = w 1 + w 2 w1 s1 + w2 s2 s B = 2w 2 w 2 1 s1 + w 2 2 s2 = 1 2 (w 1 + w 2 ) 2 w 2 1 s1 + w 2 2 s2
We then fix s = max(s A , s B ). Then, since s ≥ s A , we have w1 s1 + w2 s2 -2w s ≥ 0, and since s ≥ s B , we have

w 2 1 s1 + w 2 2 s2 -2w 2 s ≥ 0. This ensures that E(T )((w 1 , s 1 ), (w 2 , s 2 ), σ) -E(T )((w, s), (w, s), σ) ≥ 0. To prove that E(E)((w 1 , s 1 ), (w 2 , s 2 ), σ) -E(E)((w, s), (w, s), σ) ≥ 0, there remains to show that w 1 s 2 1 + w 2 s 2 2 -2ws 2 ≥ 0.
Let us first suppose that s A > s B Then we have s = s A , and let us show that w 1 s 2 1 + w 2 s 2 2 -2ws 2 A ≥ 0:

w 1 s 1 + w 2 s 2 2   w 1 s 2 1 + w 2 s 2 2 -(w 1 + w 2 ) w 1 + w 2 w1 s1 + w2 s2 2   =w 3 1 + w 1 w 2 2 s 1 s 2 2 + 2 w 1 w 2 s 1 s 2 w 1 s 2 1 + w 3 2 + w 2 w 2 1 s 2 s 1 2 + 2 w 2 w 1 s 1 s 2 w 2 s 2 2 -(w 1 + w 2 ) 3 =w 1 w 2 2 s 1 s 2 2 + 2 s 2 s 1 -3 + w 2 1 w 2 s 2 s 1 2 + 2 s 1 s 2 -3 =w 1 w 2 2 g s 1 s 2 + w 2 1 w 2 g s 2 s 1
where g : u → u 2 + 2 u -3. We know from the proof of Theorem 1 that g is positive on R + , hence w 1 s 2 1 + w 2 s 2 2 -2ws 2 A ≥ 0. Finally, since s > s B , we have

w 2 1 s1 + w 2 2 s2 -2w 2 s
> 0, and all other terms of E(E)((w 1 , s 1 ), (w 2 , s 2 ), σ) -E(E)((w, s A ), (w, s A ), σ) are non-negative, hence proving that the new solution is strictly better than the optimal one, and leading to a contradiction.

Let us now suppose that s A ≤ s B Then we have s = s B . Moreover, we have (w 2 -w 1 )( w2 s2 -w1 s1 ) ≤ 0 (this comes directly from s A ≤ s B ), and since we assume that w 2 > w 1 , w2 s2 -w1 s1 ≤ 0. Let us show that

w 1 s 2 1 + w 2 s 2 2 -2ws 2 B > 0: RR n°8238 4 w 2 1 s 1 + w 2 2 s 2 2 ×   w1s 2 1 + w 2 s 2 2 -(w 1 + w 2 )   1 2 (w 1 + w 2 ) 2 w 2 1 s1 + w 2 2 s2   2    =4w 5 1 + 8w 3 1 w 2 2 s 1 s 2 + 4w 1 w 4 2 s 1 s 2 2 + 4w 5 2 + 8w 2 1 w 3 2 s 2 s 1 + 4w 4 1 w 2 s 2 s 1 2 -(w 1 + w 2 ) 5 =3 w 5 1 + w 5 2 + w 3 1 w 2 2 8 s 1 s 2 -10 + w 3 2 w 2 1 8 s 2 s 1 -10 + w 1 w 4 2 4 s 1 s 2 2 -5 + w 4 1 w 2 4 s 2 s 1 2 -5 4 w 2 1 s 1 + w 2 2 s 2 2   w1s 2 1 +w 2 s 2 2 -(w 1 +w 2 )   1 2 (w 1 +w 2 ) 2 w 2 1 s1 + w 2 2 s2   2    = 4w 5 1 +8w 3 1 w 2 2 s 1 s 2 +4w 1 w 4 2 s 1 s 2 2 +4w 5 2 +8w 2 1 w 3 2 s 2 s 1 + 4w 4 1 w 2 s 2 s 1 2 -(w 1 + w 2 ) 5 = 3 w 5 1 +w 5 2 +w 3 1 w 2 2 8 s 1 s 2 -10 +w 3 2 w 2 1 8 s 2 s 1 - 10
+w 1 w 4 2 4 s 1 s 2 2 -5 +w 4 1 w 2 4 s 2 s 1 2 -5
Now because w 1 ≥ w2s1 s2 , we can bound the last equation. Let u = s1 s2 (and hence w 1 ≥ u × w 2 ):

4 w 2 1 s 1 + w 2 2 s 2 2 ×   w1s 2 1 + w 2 s 2 2 -(w 1 + w 2 )   1 2 (w 1 + w 2 ) 2 w 2 1 s1 + w 2 2 s2   2    ≥w 5 2 3 u 5 + 1 + u 3 (8u -10) + u 2 8 1 u -10 + u 4u 2 -5 + u 4 4 1 u 2 -5 =w 5 2 3u 5 + 3u 4 -6u 3 -6u 2 + 3u + 3 =3w 5 2 (u -1) 2 (u + 1) 3 RR n°8238 4 w 2 1 s 1 + w 2 2 s 2 2   w1s 2 1 +w 2 s 2 2 -(w 1 +w 2 )   1 2 (w 1 +w 2 ) 2 w 2 1 s1 + w 2 2 s2   2    ≥ w 5 2 3 u 5 +1 +u 3 (8u-10)+ u 2 8 1 u -10 +u 4u 2 -5 +u 4 4 1 u 2 -5 = w 5 2 3u 5 + 3u 4 -6u 3 -6u 2 + 3u + 3 = 3w 5 2 (u -1) 2 (u + 1) 3
Since w 2 > w 1 , 0 < u < 1, and this polynomial is strictly positive, hence we have w 1 s 2 1 + w 2 s 2 2 -2ws 2 B > 0. Finally, we can conclude that in both cases, E(E)((w 1 , s 1 ), (w 2 , s 2 ), σ) -E(E)((w, s B ), (w, s B ), σ) > 0, so there exist a better solution with two chunks of same sizes, hence leading to a contradiction.

We had proven that all chunks have the same size. We use the same line of reasoning to prove that all chunks are executed at a same speed s. If there are two chunks executed at speeds s 1 < s 2 (with w 1 = w 2 = w), then we have

s A = s B . Considering that s = s A , it is easy to see that w 1 s 2 1 +w 2 s 2 2 -2ws 2 A > 0 since w 1 w 2 2 g s1 s2 + w 2 1 w 2 g s2 s1 > 0.
Indeed, g is null only in 1, and s 1 = s 2 . We exhibit a solution strictly better, hence showing a contradiction. This concludes the proof.

Thanks to this result, we know that the n chunks problem can be rewritten as follows: find s such that

• W s + nT C + λ n W s + nT C W σ + nT C = D • in order to minimize W s 2 + nE C + λ n W s + nT C W σ 2 + nE C
One can see that this reduces to the SingleChunk MultipleSpeeds Expected-Deadline task problem where

• λ ← λ n • T C ← nT C • E C ← nE C
and allows us to write the problem to solve as a two parameters function:

(n, s) → W s 2 + nE C + λ n W s + nT C   W   λ n W D W s +nT C -(1 + λT C )   2 + nE C    (15)
which can be minimized numerically.

Hard deadline

In this section, the constraint on the execution time can be written as:

i w i s i + T C + w i σ i + T C ≤ D.
Lemma 9. In the MultipleSpeeds Hard-Deadline model with divisible chunk, the deadline should be tight.

Proof. This result is obvious with Lemma 4: if we have a solution such that the deadline is not tight, if we fix every variable but σ 1 (the re-execution speed of the first task), we can improve the solution with a tight deadline.

Lemma 10. In the optimal solution, for all i, j, λ wi si

+ T C σ 3 i = λ wj sj + T C σ 3 j .
Proof. Consider any solution to our problem. Thanks to Lemma 9, we know that the deadline should be tight. Let T i and T j two tasks of er-execution speed σ i , σ j . We show that those speed can be optimally defined such that

λ wi si + T C σ 3 i = λ wj sj + T C σ 3 j . Let us call u i = λ wi si + T C and u j = λ wj sj + T C .
The minimization problem for those speeds can be written as A 0 + u i w i σ 2 i + u j w j σ 2 j under the constraint that A 1 + wi σi + wj σj = D where neither A 0 nor A 1 depends on σ i , σ j .

Replacing

σ i = wi D-A1- w j σ j
in the function we need to minimize, we obtain A 0 +

u i w i wi D-A1- w j σ j 2 +u j w j σ 2 j . A simple differentiation gives -2w j u i w 3 i D-A1- w j σ j 3 σ 2 j + 2u j w j σ j .
Another differentiation shows the convexity of the function we want to minimize. Hence one can see that the function is minimized when

u j σ 3 j = u i wi D-A1- w j σ j 3 = u i σ 3 i .
Lemma 11. If we enforce the condition that the execution speeds of the chunks are all equal, and that the re-execution speeds of the chunks are all equal, then all chunks should have same size in the optimal solution.

Proof. This result is obvious since the problem can be reformulated as the minimization of α w i + β w 2 i where neither α nor β depends on any w i , under the constraints γ w i + ζ ≤ D, and w i = W . It is easy to see the result when there are only two chunks since there is only one variable, and the problem generalizes well in the case of n chunks.

We have not been able to prove a stronger result than Lemma 11. However we conjecture the following result: Conjecture 1. In the MultipleSpeeds Hard-Deadline, in the optimal solution, the re-execution speeds are identical, the deadline is tight. The reexecution speed is equal to σ = W (D-2nT C )s-W s. Furthermore the chunks should have the same size W n and should be executed at the same speed s.

RR n°8238

This conjecture reduces the problem to the SingleChunk MultipleSpeeds problem where

• λ ← λ n • T C ← nT C • E C ← nE C
and allows us to write the problem to solve as a two-parameter function:

(n, s) → W s 2 + nE C + λ n W s + nT C W W (D -2nT C )s -W s 2 + nE C (16)
which can be solved numerically.

Simulations

Simulation settings

We performed a large set of simulations in order to illustrate the differences between all the models studied in this paper, and to show upon to which extent each additional degree of freedom improves the results, i.e., allowing for multiple speeds instead of a single speed, or for multiple smaller chunks instead of a single large chunk. All these experiments are conducted under both constraint types, expected and hard deadlines.

We envision reasonable settings by varying parameters within the following ranges:

• W D ∈ [0.2, 10] • T C D ∈ [10 -4 , 10 -2 ] • E C ∈ [10 -3 , 10 3 ] • λ ∈ [10 -8 , 1].
In addition, we set the deadline to 1. Note that since we study W D and T C D instead of W and T C , we do not need to study how the variation of the deadline impacts the simulation, this is already taken into account.

We use the Maple software to solve numerically the different minimization problems. Results are showed from two perspectives: on the one hand (Figures 1 and2), for a given constraint (Hard-Deadline or Expected-Deadline), we normalize all variants according to SingleSpeed SingleChunk, under the considered constraint. For instance, on the plots, the energy consumed by Mul-tipleChunks MultipleSpeeds (denoted as MCMS) for Hard-Deadline is divided by the energy consumed by SingleChunk SingleSpeed (denoted as SCSS) for Hard-Deadline, while the energy of MultipleChunks Single-Speed (denoted as MCSS) for Expected-Deadline is normalized by the energy of SingleChunk SingleSpeed for Expected-Deadline.

On the other hand (Figures 3 and4), we study the impact of the constraint hardness on the energy consumption. For each solution form (SingleSpeed or W: 0.2 W: 1 q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q qq q q q qq q q q q q q qq q q q q q q qq q q q q q q q q qq q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q 0.25

RR n°8238

W: 5 W: 10 q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q 0.25

RR n°8238

W: 0.2 W: 1 q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q 0.25

RR n°8238

W: 5 W: 10 q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q 0.25

RR n°8238

MultipleSpeeds, and SingleChunk or MultipleChunks), we plot the ratio energy consumed for Expected-Deadline over energy consumed for Hard-Deadline.

Note that for each figure, we plot for each function different values that depend on the different values of T C /D (hence the vertical intervals for points where T C /D has an impact). In addition, the lower the value of T C /D, the lower the energy consumption.

Comparison with single speed

At first, we observe that the results are identical for any value of W/D, up to a translation of E C (see (W/D = 0.2, E C = 10 -3 ) vs. (W/D = 5, E C = 1000) on Figures 1 and2, or see (W/D = 1, E C = 10 -3 ) vs. (W/D = 5, E C = 0.1) on Figures 1 and2, for instance).

Then the next observation is that for Expected-Deadline, with a small λ (< 10 -2 ), MultipleChunks or MultipleSpeeds models do not improve the energy ratio. This is due to the fact that, in both expressions for energy and for execution time, the re-execution term is negligible relative to the execution one, since it has a weighting factor λ. However, when λ increases, if the energy of a checkpoint is small in front of the total work (which is the general case), we can see a huge improvement (between 25% and 75% energy saving) with MultipleChunks.

On the contrary, as expected, for small λ's, re-executing at a different speed has a huge impact for Hard-Deadline, where we can gain up to 75% energy when the failure rate is low. We can indeed run at around half speed during the first execution (leading to the 1/2 2 = 25% saving), and at a high speed for the second one, because the very low failure probability avoids the explosion of expected energy consumption. For both MultipleChunks and SingleChunk, this saving ratio increases with λ (the energy consumed by the second execution cannot be neglected any more, and both executions need to be more balanced), the latter being more sensitive to λ. But the former is the only configuration where T C has a significant impact: its performance decreases with T C ; still it remains strictly better than SingleChunk MultipleSpeeds.

Comparison between Expected-Deadline and Hard-Deadline

As before, the value of W/D does not change the energy ratios up to translations of E C . As expected, the difference between the Expected-Deadline and Hard-Deadline models is very important for the SingleSpeed variant: when the energy of the re-execution is negligible (because of the failure rate parameter), it would be better to spend as little time as possible doing the re-execution in order to have a speed as slow as possible for the first execution, however we are limited in the SingleSpeed Hard-Deadline model by the fact that the re-execution time is fully taken into account (its speed is the same as the first execution, and there is no parameter λ to render it negligible). Furthermore, when λ is minimum, MultipleSpeeds consumes the same energy for Expected-Deadline and for Hard-Deadline. Indeed, as expected, the λ in the energy function makes it possible for the re-execution speed to be maximal: it has little impact on the energy, and it is optimal for the execution time; this way we can focus on slowing down the first execution of each chunk. For Hard-Deadline, we already run the first execution at half speed, thus we cannot save more energy, even considering Expected-Deadline instead. When λ increases, speeds of Hard-Deadline cannot be lowered but the expected execution time decreases, making room for a downgrade of the speeds in the Expected-Deadline problems.

Conclusion

In this work, we have studied the energy consumption of a divisible computational workload on volatile platforms. In particular, we have studied the expected energy consumption under different deadline constraints: a soft deadline (a deadline for the expected execution time), and a hard deadline (a deadline for the worst case execution time).

We have been able to show mathematically, for all cases but one, that when using the MultipleChunks model, then (i) every chunk should be equally sized; (ii) every execution speed should be equal; and (iii) every re-execution speed should also be equal. This problem remains open in the MultipleSpeeds Hard-Deadline variant.

Through a set of extensive simulations, we were able to show the following: (i) when the fault parameter λ is small, for Expected-Deadline constraints, the SingleChunk SingleSpeed model leads to almost optimal energy consumption. This is not true for the Hard-Deadline model, which accounts equally for execution and re-execution, thereby leading to higher energy consumption. Therefore, for the Hard-Deadline model and for small λ, the model of choice should be the SingleChunk MultipleSpeeds model. When the fault parameter rate λ increases, using a single chunk is no longer energy-efficient, and one should focus on the MultipleChunks MultipleSpeeds model for both deadline types.

An interesting direction for future work is to extend this study to the case of an application workflow: instead of dealing with a single divisible task, we would deal with a DAG of tasks, that could be either divisible (checkpoints can take place anytime) or atomic (checkpoints can only take place at the end of the execution of some tasks). Again, we can envision both soft or hard constraints on the execution time, and we can keep the same model with a single re-execution per chunk/task, at the same speed or possibly at a different speed. Deriving complexity results and heuristics to solve this difficult problem is likely to be very challenging, but could have a dramatic impact to reduce the energy consumption of many scientific applications.

  The constraint on the execution time is now 2 W s + T C ≤ D. Proposition 4. Let s the solution indicated in Equation 8. In the Single-Speed Hard-Deadline model if 2T C ≥ D, then there is no solution. Otherwise, the minimum is reached when s = max s , W D 2 -T C .

Figure 1 :

 1 Figure 1: Comparison with SingleChunk SingleSpeed.

Figure 2 :

 2 Figure 2: Comparison with SingleChunk SingleSpeed.

Figure 3 :

 3 Figure 3: Comparison Hard-Deadline versus Expected-Deadline.

Figure 4 :

 4 Figure 4: Comparison Hard-Deadline versus Expected-Deadline.

Table 1 :

 1 2. Table 1 summarizes the main notations. List of main notations.

	W	total amount of work
	s	processor speed for first execution
	σ	processor speed for re-execution
	T C checkpointing time
	E C energy spent for checkpointing

RR n°8238