# Enhancing Energy Efficient Task Caching and Offloading in Mobile Edge Computing

Fabiano Lorusso, Frédéric Giroire, Joanna Moulierac, Guillaume Urvoy-Keller

► To cite this version:

Fabiano Lorusso, Frédéric Giroire, Joanna Moulierac, Guillaume Urvoy-Keller. Enhancing Energy Efficient Task Caching and Offloading in Mobile Edge Computing. ISNCC 2025 IEEE International Symposium on Networks, Computers and Communications, IEEE, Oct 2025, Paris, France. hal-05361340

HAL Id: hal-05361340

https://hal.science/hal-05361340v1

Submitted on 24 Nov 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Enhancing Energy Efficient Task Caching and Offloading in Mobile Edge Computing

Fabiano Lorusso*, Frédéric Giroire*, Joanna Moulierac*, Guillaume Urvoy-Keller*

* Université Côte d'Azur, CNRS, Inria, I3S. firstname.name@univ-cotedazur.fr

*Abstract*—Mobile Edge Computing (MEC) enables both to prolong the battery life of mobile devices and support the execution of computationally intensive applications at the edge. This can be achieved by offloading these tasks to a server deployed near the base station and/or by directly caching them.

Previous works focus on only one of these two strategies or formulate optimization problems that are hard to solve and propose a suboptimal solution.

In this paper, we propose a linear model for the joint task caching and offloading optimization problem. Moreover, we present two efficient heuristics which provide close-to-optimal results in terms of energy efficiency with a low execution time. We further prove that the offloading subproblem can be solved with an optimal algorithm. Finally, we demonstrate the performance and scalability of our propositions by extensive simulations on a large number of $10^5$ mobile devices

## I. INTRODUCTION

Mobile devices and sensors need to support complex applications which combine a high computation intensity and real time constraints. Typical examples include image recognition or augmented reality [1], [2]. These requirements either exceed the computing capacities of the mobile devices hardware or can rapidly exhaust their battery.

To enable a correct execution while preserving the battery level of the mobile device, a strategy is to execute part of the application operations in a server in the cloud. However, the stringent delay constraints of these applications call for locating this server close to the mobile device. This is the idea behind Mobile Edge Computing (MEC) [3]. MEC enables the deployment of an edge cloud directly at the base station. It can exploited by ISPs and third party application providers. By bringing computing resources closer to the users, MEC significantly reduces latency, ensuring that the requirements of delay-sensitive tasks are met effectively.

Availability and deployment of MEC has fostered research on task offloading techniques, leading to a lot of models and approaches proposed to reduce energy and task execution [4], [5], [6], [7]. We consider in this work, similarly to previous studies, e.g. [8], a generic model where the nearby and grid powered computing and storage facility can be used in two different manners. First, the mobile applications can decide to offload part of its computation tasks, in terms of code and

data to the MEC server. This is formally called task offloading. Second, the control plane of the applications, likely deployed in the central cloud, can decide to cache some tasks in advance. This is called task caching, and aims at storing popular or computationally intensive tasks.

Unlike traditional cloud computing, MEC features limited scaling capacities and its resources need to be carefully managed. In this paper, we formulate a linear joint optimization problem that allows us to find the optimal task caching and task offloading scheme while guaranteeing the latency constraints of each task and the storage and computing capacities of the edge cloud. We additionally propose two fast heuristic algorithms and show that the offloading subproblem can be tackled with an optimal algorithm.

The paper is structured as follows: in Section II we present the related work on achieving energy efficiency using task caching and task offloading schemes. The modelling of our MEC network is illustrated in detail in Section III with also a thorough description of the linear optimization problem and the two heuristic algorithms derived from it. Section IV presents the simulation results and compares the performances of the different algorithms. Lastly, Section V provides conclusions and future work directions.

## II. RELATED WORK

An extensive standardization and research effort in the field of Mobile Edge Computing (MEC) has been conducted in the last years, see [3] for a survey on the benefits and challenges of MEC. One of the challenge is to profile applications, so as to isolate which application fragments can be offloaded [9]. Once the application fragments candidates for offloading are identified, the next key step is to decide whether to fully or partially offload the fragment. Our work focuses on this crucial problem.

A first series of papers tackles the task offloading problem. In [10], the author considers a device-edge-cloud fusion scenario, where the task can be scheduled either on the mobile device, an edge cloud or a central cloud. Several heuristic algorithms are proposed and compared to an asymptotic lower bound of the optimal solution. Similarly, [11] formulates the problem of minimizing the total energy consumption as a mixed integer non-linear program and proposes a meta-heuristic optimization algorithm, as the authors in [5]. [4] proposes a stochastic optimization approach to ensure a bounded average queue length at the IoT devices in a MEC scenario.

This work was supported by the French government National Research Agency (ANR) through UCA JEDI (ANR-15-IDEX-01), EUR DS4H (ANR-17-EURE-004), France 2030 program under grant agreements No. ANR-23-PECL-0003 and ANR-22-PEFT-0002, by SmartNet, and by the European Network of Excellence dAIEDGE under Grant Agreement Nr. 101120726.
A second series of work then considers the joint optimization of task caching and offloading.

A reference paper for this is [8]. Their model considers computing and storage resource constraints on the edge cloud and delay constraints on the mobile devices. Tasks can be partially or fully offloaded at the MEC server. The authors first formulate this problem as a mixed integer programming problem that is hard to solve. Then they propose an approximate algorithm named Task Caching and Offloading (TCO) based on an alternating iterative approach. [12] formulated task caching and offloading as a non linear problem, similarly to [8] and propose a reinforcement learning approach to obtain an approximate solution for large-scale scenarios. [13] and [14] proposed Lyapunov optimization techniques to solve offloading and caching to minimize execution time with fixed energy budget. [6] proposes a linear version of a variant of the problem in which partial offloading and sequential dependent tasks are considered.

We used the general model in [8] as a starting point and we proved that it can be linearized. We then proposed a heuristic alternative to reduce the execution time. Moreover, we showed that the offloading sub-problem part of their solution can be tackled with an optimal algorithm.

### III. SYSTEM MODEL AND PROBLEM FORMULATION

Similarly to [8], we consider a MEC system composed of one Edge Server deployed in proximity of a base station providing services to a set $N = \{1, 2, ..., N\}$ of mobile devices (or users) through a wireless channel. To each device is assigned one computational task among the set $K = \{1, 2, ..., K\}$ with the assumption that the total number of devices is larger than the number of tasks ($N \ge K$). Moreover, any task can be decomposed into smaller components that can be either processed locally on the mobile device or offloaded and processed on the edge cloud. Additionally, a task can be cached in the edge cloud to avoid computing it locally or offloading it. As a consequence, all the mobile devices that are assigned a task cached in the edge cloud will receive directly the results of the computation of such task and, therefore, will have no energy cost<fnref n="1" />.

This scenario can be summarized by the function formulated in [8] that describes the energy consumption of any mobile device $n$ requesting the task $k_n$:

$$E_{n,k_n} = (1 - x_{k_n})[\alpha_n E_{n,k_n}^l + (1 - \alpha_n)E_{n,k_n}^{tr}] \quad (1)$$

where $x_{k_n} \in \{0, 1\}$ is the integer caching decision variable (1 means task $k_n$ is cached at the edge cloud, 0 means that task $k_n$ is not cached) and $\alpha_n \in [0, 1]$ represents the portion of the task of the device $n$ computed locally (1 means the mobile device $n$ computes locally the whole task $k$, 0 means the task is completely offloaded). The energy cost of local computing

and the energy cost related to the transmission during the offloading of a task are described by the following equations:

$$E_{n,k_n}^l = \kappa (f_n^l)^2 \omega_{k_n} \quad \text{and} \quad E_{n,k_n}^{tr} = P_n \frac{s_{k_n}}{r_n}$$

where $\kappa$ is an energy coefficient that depends on the chip architecture of the mobile device (it is assumed to be $10^{-25}$ for all the devices as mentioned in [8]); $f_n^l$ indicates the CPU computing capability of the mobile device in $[\frac{\text{gigacycles}}{s}]$; $\omega_{k_n}$ is the amount of computing resources required to compute the task in $[\text{cycles per bit}]$; $P_n$ denotes the transmission power of the mobile device in $[W]$; $s_{k_n}$ represents the data size of the task in $[bit]$; $r_n$ is the uplink data rate of the mobile device in $[\frac{bit}{s}]$.

As shown in Figure 1, the delay of execution of the task $T_{n,k_n}$ should not exceed a given deadline $D_n$.

(1) If the task is cached in the cloud, then the delay of the task $T_{n,k_n}$ includes only the processing time in the cloud and is equal to $T_{n,k_n}^c = \frac{\omega_{k_n}}{f_n^c}$, where $f_n^c$ is the computational resource of the edge cloud allocated to user $n$.

(2) If the task is executed locally on the mobile, then the delay $T_{n,k_n}$ depends on the computing capability of the mobile device and is equal to $T_{n,k_n}^l = \frac{\omega_{k_n}}{f_n^l}$.

(3) If the task is completely offloaded in the edge cloud, then the delay implies the transmission of the task to the cloud $T_{n,k_n}^{tr}$ and the delay of computation within the cloud $T_n^c$:

$$T_{n,k_n} = T_{n,k_n}^{tr} + T_{n,k_n}^{c} = \frac{s_{k_n}}{r_n} + \frac{\omega_{k_n}}{f_n^c}$$

(4) If the task is partially offloaded to the edge cloud, then, some portion of the task is computed locally on the mobile device, and the other portion will be transmitted to the cloud.

$$T_{n,k_n} = \alpha_n T_{n,k_n}^l + (1 - \alpha_n)[T_{n,k_n}^c + T_{n,k_n}^{tr}] \\ = \alpha_n \frac{\omega_{k_n}}{f_n^l} + (1 - \alpha_n)[\frac{\omega_{k_n}}{f_n^c} + \frac{s_{k_n}}{r_n}]$$

Finally, the global delay $T_{n,k_n}$ when considering these four cases may be given as follows:

$$x_{k_n} T_{n,k_n}^c + (1 - x_{k_n}) \left[ \alpha_n T_{n,k_n}^l + (1 - \alpha_n) [T_{n,k_n}^c + T_{n,k_n}^{tr}] \right]$$

#### A. Original model

The global energy cost function described above is used in [8] to formulate an optimization problem with the aim of finding the optimal joint task caching and task offloading scheme. This optimization problem can be expressed as:

$$\text{Min:} \quad \sum_{n=1}^{N} (1 - x_{k_n}) [\alpha_n E_{n,k_n}^l + (1 - \alpha_n) E_{n,k_n}^{tr}]$$

Subject to:

$$\begin{aligned}
\text{C1:} \quad & \sum_{k=1}^{K} x_k s_k \le c_e \\
\text{C2:} \quad & \sum_{n=1}^{N} (1 - \alpha_n) f_n^c \le c_s
\end{aligned}
\qquad (2)$$

<footnote n="1">¹We assume no cost for receiving the result of the task, unlike sending the task itself.</footnote>
<figure><img src="image_2.png" /><figcaption>Figure 1. Joint task caching and Offloading model with the energy consumed $E$ and delay of execution $T$. ${\{E, T\}}^{tr}$ is the energy (or the delay) consumed for the transmission of the task, ${\{T\}}^{C}$ is the delay to compute the task in the cloud and ${\{E, T\}}^{L}$ the energy (or delay) to process the task locally.</figcaption></figure>

$$ \text{C3: } x_{k_n} \frac{\omega_{k_n}}{f_n^c} + (1 - x_{k_n}) \left[ \alpha_n \frac{\omega_{k_n}}{f_n^l} + (1 - \alpha_n) \left( \frac{s_{k_n}}{r_n} + \frac{\omega_{k_n}}{f_n^c} \right) \right] \leq D_n, \forall n \in \mathcal{N} $$

$$ \text{C4: } x_k \in \{0, 1\}, \forall k \in \mathcal{K} $$

$$ \text{C5: } \alpha_n \in [0, 1], \forall n \in \mathcal{N} $$

The goal of the problem is to minimize the energy cost of the mobile devices while guaranteeing quality of service by meeting the users' demand for delay and the caching/computing capacities constraints of the edge cloud. In particular, the first constraint (C1) ensures that the data size of cached computing tasks does not exceed the capacity of the edge cloud for caching $c_e$. Constraint (C2) ensures that the total computation resources required for offloaded tasks do not surpass the computational capacity of the edge cloud $c_s$. Constraint (C3) guarantees that task execution for each user occurs within the specified deadline $D_n$. Constraint (C4) ensures that the task caching decision variable is always binary. Lastly, constraint (C5) enables partial offloading of the task.

Since the formulation is mixed integer nonlinear with a nonlinear constraint, and therefore impossible to solve according to the authors of paper [8], they design an approximate scheme called TCO (Task Caching and Offloading). This approach uses alternative optimization techniques. It consists of iterating two integer linear subproblems: a convex subproblem to find the optimal values for the offloading decision variable when the caching variables are given and a 0-1 programming problem to find the optimal values for the caching decision variable.

## B. Linearization of the model: Opt-TCO' 24

Our first contribution in this paper is to show that the model presented in [8] can be linearized, i.e., transformed into an

optimization program with a linear objective function and only linear constraints. This new formulation allows to get optimal solutions for instances with a large number of devices using a linear solver (see Section IV) whereas the previous model was impossible to solve.

We first consider the objective function, which is to minimize the energy used for tasks which are not cached ($x_k = 0$). We note $E_n = \alpha_n E_{n,k_n}^l + (1 - \alpha_n) E_{n,k_n}^{tr}$ the energy used by the task $k_n$ of user $n$ if not cached. We now introduce a family of non negative variables $F_n$ for all $n \in \mathcal{N}$, such that (i) $F_n \le E_n$, and (ii) $F_n = 0$ when the task $k_n$ of user $n$ is not cached. We do so by introducing 2 sets of constraints (C7) and (C8), in which $M_1$ is a large number greater than $\sum_{n,k_n} E_n$. Last, we transform the objective function into $\sum_{n=1}^N E_n - F_n$. Now, if the task of user $n$ is not cached, we have $E_n - F_n = E_n$, as before, otherwise $E_n - F_n = 0$ by minimization. Indeed, minimizing $-F_n$ is equivalent to setting $F_n = E_n$, as (C7) is the only active constraint for $F_n$ in this case.

Second, we tackle Constraint (C3) of the original formulation, as it is not linear (it contains terms with the product of variables $x_k \alpha_n$). We transform it into 2 sets of constraints (C3.2) and (C3.1), where $M$ is a large number such that $M_2 = \sup_{n, \alpha_n} \alpha_n \frac{\omega_{k_n}}{f_n^l} + (1 - \alpha_n) \left( \frac{s_{k_n}}{r_n} + \frac{\omega_{k_n}}{f_n^c} \right)$. (C3.2) constrains the task of user $n$ to have a delay lower than $D_n$ when cached ($x_k = 1$), and does not constraint it when not cached. Conversely, (C3.1) gives that same delay constraint as the one of the original (C3), when the task is not cached, and does not constraint it when cached, as $M_2$ was chosen large enough.

We thus get the following linear program, Opt-TCO' 24, equivalent to the non linear original formulation:

$$ \text{Min: } \sum_{n=1}^{N} \alpha_n E_{n,k_n}^l + (1 - \alpha_n) E_{n,k_n}^{tr} - F_n $$

Subject to:

$$ \text{C1: } \sum_{k=1}^{K} x_k s_k \leq c_e $$

$$ \text{C2: } \sum_{n=1}^{N} (1 - \alpha_n) f_n^c \leq c_s $$

$$ \text{C3.1: } \alpha_n \frac{\omega_{k_n}}{f_n^l} + (1 - \alpha_n) \left( \frac{s_{k_n}}{r_n} + \frac{\omega_{k_n}}{f_n^c} \right) \leq D_n + x_{k_n} M_2, \forall n \in \mathcal{N} $$

$$ \text{C3.2: } x_{k_n} \frac{\omega_{k_n}}{f_n^c} \leq D_n, \forall n \in \mathcal{N} $$

$$ \text{C4: } x_k \in \{0, 1\}, \forall k \in \mathcal{K} $$

$$ \text{C5: } \alpha_n \in [0, 1], \forall n \in \mathcal{N} $$

$$ \text{C6: } F_n \geq 0, \forall n \in \mathcal{N} $$

$$ \text{C7: } F_n \leq \alpha_n E_{n,k_n}^l + (1 - \alpha_n) E_{n,k_n}^{tr}, \forall n \in \mathcal{N} $$

$$ \text{C8: } F_n \leq x_k M_1, \forall n \in \mathcal{N} $$

$$ \text{C9: } \alpha_n \geq x_{k_n}, \forall n \in \mathcal{N} $$
### C. The Caching and the Offloading Sub-Problems

This global problem can be divided as an approximation into two subproblems, the caching problem and the offloading problem. We show here that both of them can be reduced with simple transformations to simple classic optimization problems: a 0-1 knapsack problem for the first one and a fractional knapsack for the second one, which can be solved optimally with a simple algorithm with complexity $O(n \log n)$.

1) **Caching Problem:** As the values of $\alpha_n$ are fixed, for each task, we can check if the delay constraint is satisfied, when cached or not cached. If the constraint is satisfied in both case ($n \in \text{cachable } \mathcal{N}$), the constraint can be removed from the program. If it is satisfied in neither cases, the instance has no solution. If it is satisfied only when the task is cached ($n \in \text{forcedCached}$)(resp. not cached $n \in \text{forcedNotCached}$), $x_k$ has to be set to 1 (resp. 0). In this case, we remove from the cache capacity $x_k s_k$. The linear program can thus be rewritten as:

$$ \text{Min:} \quad \sum_{n \in \text{cachable } \mathcal{N}} (1 - x_{k_n}) E_n $$

Subject to:

$$ \sum_{k \in \text{cachable } \mathcal{K}} x_k s_k \le c_e - \sum_{n \in \text{forcedCached}} s_k \\ x_k \in \{0, 1\}, \forall k \in \text{cachable } \mathcal{K}, $$

where $E_n = \alpha_n^* E_{n,k_n}^l + (1 - \alpha_n^*) E_{n,k_n}^{tr}$. The optimal solution can be found by solving the equivalent problem of maximizing $\sum_{n \in \text{cachable } \mathcal{N}} x_{k_n} E_n$ with the same constraints, which is a 0-1 knapsack problem. To solve it, we use the classic greedy algorithm [15], which selects the tasks by non increasing order of value per units. Note that these classic problem and algorithm were intensively studied and the latter<fnref n="2" /> was shown to be a 1/2-approximation algorithm in the worst case and to converge in average to the optimal solution for large families of random inputs when $n$ grows, see e.g. [16], [17]

2) **Offloading Problem:** In the offloading problem, the cached tasks have been chosen and the problem is to find the best value of the offloading variables $\alpha_n$, $\forall n \in \mathcal{N}$ to minimize the energy used.

Let us note $C$ (resp. $\bar{C}$) the set of users whose tasks have been cached (resp. not cached). We introduce the variables $\beta_n = 1 - \alpha_n$ to note the portion of the task of user $n$, which is offloaded. Let us consider the delay constraint C3. We have to consider only the tasks which are not cached. The constraint thus is:

$$ (1 - \beta_n) \frac{\omega_k}{f_n^l} + \beta_n \left( \frac{s_k}{r_n} + \frac{\omega_k}{f_n^c} \right) \le D_n, \forall n \in \bar{C} \quad (3) $$

It can be rewritten as

$$ \left\{ \begin{array}{ll} \beta_n \le \frac{D_n - \frac{\omega_k}{f_n^l}}{\frac{\omega_k}{r_n} + \frac{\omega_k}{f_n^c} - \frac{\omega_k}{f_n^l}} = a_n & \text{if } \frac{s_k}{r_n} + \frac{\omega_k}{f_n^c} - \frac{\omega_k}{f_n^l} \ge 0. \\ \\ \beta_n \ge \frac{D_n - \frac{\omega_k}{f_n^l}}{\frac{\omega_k}{r_n} + \frac{\omega_k}{f_n^c} - \frac{\omega_k}{f_n^l}} = b_n & \text{if } \frac{s_k}{r_n} + \frac{\omega_k}{f_n^c} - \frac{\omega_k}{f_n^l} < 0 \end{array} \right. $$

We now note $\beta'_n = (\beta_n - b_n)(a_n - b_n)$. The objective function can be rewritten as

$$ \begin{aligned} & \sum_{n \in \bar{C}} \alpha_n E_{n,k_n}^l + (1 - \alpha_n) E_{n,k_n}^{tr} = (1 - \beta_n) E_{n,k_n}^l + \beta_n E_{n,k_n}^{tr} \\ & = (1 - b_n - \beta'_n) E_{n,k_n}^l + (b_n + \beta'_n) E_{n,k_n}^{tr} \\ & = \sum_{n \in \bar{C}} (E_{n,k_n}^{tr} - E_{n,k_n}^l) \beta'_n + \sum_{n \in \bar{C}} (1 - b_n) E_{n,k_n}^l + b_n E_{n,k_n}^{tr} \end{aligned} $$

which is equivalent to

$$ \text{Max:} \quad \sum_{n \in \bar{C}} \frac{E_{n,k_n}^l - E_{n,k_n}^{tr}}{a_n - b_n} \beta'_n. $$

The program can be rewritten as:

$$ \text{Max:} \quad \sum_{n \in \bar{C}} \sum_{n \in \bar{C}} \frac{E_{n,k_n}^l - E_{n,k_n}^{tr}}{a_n - b_n} \beta'_n $$

Subject to:

$$ \text{C2:} \quad \sum_{n \in \bar{C}} \beta'_n f_n^c \le c_s - \sum_{n \in \bar{C}} b_n f_n^c $$

$$ \text{C5:} \quad \beta'_n \in [0, 1], \quad \forall n \in \bar{C} $$

The last problem is a fractional knapsack problem, which can be solved optimally by the greedy algorithm [15], which chooses to upload the tasks of users by decreasing order of their efficiency $\frac{E_{n,k_n}^l - E_{n,k_n}^{tr}}{(a_n - b_n) f_n^c}$. The complete algorithm is given in Algorithm 1.

**Algorithm 1 Exact algorithm for offloading**

**Input:** $\bar{C} \leftarrow$ the set of not cached task

**Output:** Energy consumed and Percentage of locally computed tasks $\alpha_1, \dots, \alpha_N$

1: Energy $\leftarrow 0$

2: Initialize all $\beta'_n$ and $b_n$ to 0, and all $a_n$ to 1.

3: **for** $n \in \bar{C}$ **do**

4: &nbsp;&nbsp;&nbsp;&nbsp;**if** $\frac{s_k}{r_n} + \frac{\omega_k}{f_n^l} - \frac{\omega_k}{f_n^c} \ge 0$ **then**

5: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$D_n - \frac{\omega_k}{f_n^l}$ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$a_n \leftarrow \frac{s_k}{r_n} + \frac{\omega_k}{f_n^l} - \frac{\omega_k}{f_n^c}$

6: **else**

7: &nbsp;&nbsp;&nbsp;&nbsp;$b_n \leftarrow \frac{D_n - \frac{\omega_k}{f_n^l}}{\frac{s_k}{r_n} + \frac{\omega_k}{f_n^c} - \frac{\omega_k}{f_n^l}}$

8: &nbsp;&nbsp;&nbsp;&nbsp;$L \leftarrow$ sort all users in $\bar{C}$ by non increasing $\frac{E_{n,k_n}^l - E_{n,k_n}^{tr}}{(a_n - b_n) f_n^c}$.

9: **can_be_offloaded** = $c_s - \sum_{n \in \bar{C}} b_n f_n^c$

10: **for** $n \in L$ **do**

11: &nbsp;&nbsp;&nbsp;&nbsp;**if** $f_n^c \le \text{can_be_offloaded}$ **then**

12: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$\beta'_n = a_n - b_n$

13: **else**

14: &nbsp;&nbsp;&nbsp;&nbsp;$\beta'_n = \text{can_be_offloaded}$

15: &nbsp;&nbsp;&nbsp;&nbsp;$\alpha_n \leftarrow 1 - b_n - \frac{\beta'_n}{a_n - b_n}$

16: &nbsp;&nbsp;&nbsp;&nbsp;Energy $\leftarrow \sum_{n \in \bar{C}} \alpha_n E_{n,k_n}^l + (1 - \alpha_n) E_{n,k_n}^{tr}$

17: **return** Energy, $[\alpha_1, \dots, \alpha_N]$

<footnote n="2">²in fact a simple variant, which compares this solution with the solution of taking only the single next job.</footnote>
D. Algorithms: H-TCO'24 and Fastened It-TCO[8]: Fast-It-TCO'24

Based on the discussion of the previous section, we propose
two heuristic algorithms capable of achieving a sub-optimal
solution for the joint optimization problem in a much shorter
time than the linear programs presented before.

The first one, H-TCO'24, first solves the offloading prob-
lem with Algorithm 1 and then solves the caching problem
with the method described in Section III-C1.

The second one, Fast-It-TCO'24, is an improvement
in time of the heuristic presented in [8]. The upgrade consists
in implementing our optimal task offloading algorithm instead
of the fractional linear offloading sub-problem of the original
model. The caching is done optimally with a linear program.
We show in the numerical evaluation that Fast-It-TCO'24
is a lot faster than It-TCO[8], while achieving the same
performance, and that H-TCO'24 is even faster with similar
performance.

IV. NUMERICAL EVALUATION

A. *Experiment setup*

In this section, we present the inputs for the experimen-
tation and evaluation of the four different approaches : (1)
our linearization of the mixed integer programming problem
(Opt-TCO'24), (2) our heuristic H-TCO'24 proposition, (3)
the literature algorithm [8] (It-TCO[8]), and (4) our im-
provement in execution time of this approximation algorithm
(Fast-It-TCO'24).

We are focusing on an edge computing system with an edge
cloud, a set of N mobile devices, N varying from 100 to
10⁵, each of them assigned with one computation task chosen
among a set of K = [N/5] tasks. The edge cloud, deployed
near the wireless access point, has a computing capacity of
25 GHz (c_s = 25 × 10⁹) and a cache size that is proportional
to the number of devices in such a way that 20% of the tasks
are cached in average. The data size of each task is generated
uniformly within the range of 5 MB to 15 MB. Furthermore,
each mobile device has a uniform transmission power of 0.5 W
(P_n = 0.5) and a consistent computing capability of 0.7 GHz
(f_t = 0.7 × 10⁹). The data rate of each device is modeled by
a normal distribution with an average of 2.3 MBps, sourced
from the average upload speed provided by Orange in France
according to [18]. The completion deadline for each user is
set to 2s (D_n = 2), and the computational resource allocated
to each user n at the edge cloud is 2 GHz (f_n^c = 2 × 10⁹).
Moreover, the amount of computing resource required for each
task is generated by a normal distribution with mean that is
eight times bigger than the average task size and a standard
deviation four times smaller than the average task size.

B. *Average energy cost per mobile*

In Figure 3 we compare the performances in terms of energy
costs for the four different approaches with the local approach.
In this approach, the edge cloud is not used and all the tasks
are computed locally on the mobile devices. In this baseline
case scenario, caching cannot be used to reduce the energy of

the popular tasks and the energy used by the mobile is always
the one used to compute locally. No task is sent to the edge
cloud to be computed, and therefore there is no energy used
for the transmission of the task to the cloud

The results of the five approaches are given for 1000
runs with different random instances. As expected, we ob-
serve that optimal Opt-TCO'24 saves the highest amount
of energy compared to computing all the tasks locally
(50.89%), averaging an energy cost of 1.9221 J per device. Our
H-TCO'24 implementation of the joint optimization problem
averages 1.9467 J per device and it is followed closely by the
It-TCO[8] and the Fast-It-TCO'24 with an average of
1.9410 J (with around 50.24% gains of energy).

C. *Execution Time*

We report the execution times of the solutions for an
increasing number of users from 10 to 10⁵ in Figures 2 in
log scale.

We first note that Opt-TCO'24 allows to get the optimal
solutions of instances of 95 000 users in less that 9 minutes,
validating the efficiency and scalability of the formulation of
Section III-B. The second remark is that Fast-It-TCO'24
is a lot faster than It-TCO[8], while giving the exact
same solution. It solves instances with 100 000 users in less
than 100 s, to be compared to 15 min for the latter. Last,
H-TCO'24 is orders of magnitude faster (less than 1 s for
100 000 devices), while giving close to optimal results, as
discussed above. When going to a larger number of devices,
and with 1 h of time limit, It-TCO[8] cannot deal with more
than 200 000 devices, while Opt-TCO'24 can deal with up to
300 000 devices. Opt-TCO'24 has always a lower execution
time than It-TCO[8] while giving optimal results (it is 27%
faster).

Consider now a scenario in which users have access to a
caching and offloading facility at their closest 5G antenna to
help them execute tasks. When they have stringent deadlines
(e.g. 2s), the caching and offloading decisions have to be done
very quickly in this setting. For 100 devices, all algorithms
can provide an efficient solution in less than 10 ms. However,
for 500 devices, only H-TCO'24 and Fast-It-TCO'24

<figure><img src="image_3.png" /><figcaption>Figure 2. Time execution with up to 100 000 devices in log-scale</figcaption></figure>
<figure><img src="image_4.png" /><figcaption>Figure 3. Average energy cost in Joules for each mobile device (1000 iterations)</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Figure 4. Mean energy per mobile in function of the cache and offloading capacities</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Figure 5. Average energy consumption according to the popularity parameter $\gamma$</figcaption></figure>

can return a solution, and, for 1000 devices, only H-TCO'24 can (it scales to up to 16 000 devices). When the delay constraints are less stringent, e.g. 1 second, H-TCO'24 can serve 100 000 devices, Fast-It-TCO'24 3000 devices, Opt-TCO'24 1800 devices and It-TCO[8] 1500 devices. We see the importance of having fast algorithms for the envisioned dense scenarios with thousands of devices of next generation networks.

## D. Energy consumption with varying parameters

a) Impact of the task popularity: Figure 5 shows how the Zipf distribution parameter $\gamma$ impacts on the average energy cost of each mobile device. When $\gamma$ is high, it means that some tasks have a really high popularity and are assigned to a large number of mobile devices. With a lower $\gamma$, the popularity distribution is flatter. As a consequence, as predicted, caching really popular tasks allows to obtain large energy savings. When $\gamma$ is small, there is less impact on the chosen tasks to be cached (as all the tasks share a similar popularity).

b) Impact of the cache size and of cloud offloading capacity: Figure 4 shows that, when the cache size increases, the average energy cost per mobile decreases superlinearly, as we are first caching very popular tasks and then less and less popular tasks, as discussed above. In parallel, the energy cost decreases almost linearly with an increasing cloud offloading capacity, as the energy savings for a the task of a user is linear with the offloaded amount.

## V. CONCLUSION

In this paper, we formulate a linear formulation solving optimally a joint task caching and task offloading problem. This allows to solve optimally medium sized instances. We also show that the caching and offloading sub-problems both have a special structure allowing to solve them efficiently for the first one and optimally for the second one with simple algorithms. We then further propose a heuristic alternative that, while yielding results close to the optimal results, significantly reduces computational time, allowing to solve large instances very quickly. In future works, we plan to extend our current model, e.g. by adding the energy of the cloud in order to propose a global energy reduction scheme.

## REFERENCES

[1] D. N. Jakopin, G. Mohr, E. Cafforio, G. Peres, M. Weber, and K. Burkhanov, "The evolution of data growth in Europe," Arthur D. Little, Tech. Rep., 2023.

[2] P. J. et al., "Ericsson Mobility Report," Ericsson, Tech. Rep., June 2023.

[3] P. Mach and Z. Becvar, "Mobile edge computing: A survey on architecture and computation offloading," *IEEE communications surveys & tutorials*, pp. 1628-1656, 2017.

[4] Y. Chen, N. Zhang, Y. Zhang, X. Chen, W. Wu, and X. Shen, "Energy efficient dynamic offloading in mobile edge computing for internet of things," *IEEE Transactions on Cloud Computing*, 2021.

[5] L. Yang, H. Zhang, M. Li, J. Guo, and H. Ji, "Mobile edge computing empowered energy efficient task offloading in 5g," *IEEE Transactions on Vehicular Technology*, 2018.

[6] S. Bi, L. Huang, and Y.-J. A. Zhang, "Joint optimization of service caching placement and computation offloading in mobile edge computing systems," *IEEE Transactions on Wireless Communications*, 2020.

[7] Z. Li, C. Yang, X. Huang, W. Zeng, and S. Xie, "Coor: Collaborative task offloading and service caching replacement for vehicular edge computing networks," *IEEE Transactions on Vehicular Technology*, 2023.

[8] Y. Hao, M. Chen, L. Hu, M. S. Hossain, and A. Ghoneim, "Energy efficient task caching and offloading for mobile edge computing," *IEEE Access*, 2018.

[9] X. Li, T. Chen, D. Yuan, J. Xu, and X. Liu, "A novel graph-based computation offloading strategy for workflow applications in mobile edge computing," *IEEE Transactions on Services Computing*, 2023.

[10] K. Li, "Design and analysis of heuristic algorithms for energy-constrained task scheduling with device-edge-cloud fusion," *IEEE Transactions on Sustainable Computing*, 2022.

[11] J. Bi, K. Zhang, H. Yuan, and J. Zhang, "Energy-efficient computation offloading for static and dynamic applications in hybrid mobile edge cloud system," *IEEE Transactions on Sustainable Computing*, 2022.

[12] H. H. e. a. Ibrahim A. Elgendy, WZ. Zhang, "Joint computation offloading and task caching for multi-user and multi-task mec systems: Reinforcement learning-based algorithms," *IEEE Transactions on Vehicular Technology*, 2021.

[13] N. Zhang, S. Guo, Y. Dong, and D. Liu, "Joint task offloading and data caching in mobile edge computing networks," *Computer Networks*, 2020.

[14] J. Xu, L. Chen, and P. Zhou, "Joint service caching and task offloading for mobile edge computing in dense networks," in *IEEE INFOCOM*, 2018.

[15] G. B. Dantzig, "Discrete-variable extremum problems," *Operations research*, 1957.

[16] A. M. Cohn and C. Barnhart, "The stochastic knapsack problem with random weights: A heuristic approach to robust transportation planning," 1998.

[17] J. M. Calvin and J. Y.-T. Leung, "Average-case analysis of a greedy algorithm for the 0/1 knapsack problem," *Operations Research Letters*, 2003.

[18] "Opensignal's 5G experience report," November 2021.