Software Containers in Smart Vehicles:


A Workload Management Approach

Containers scheduling Demoย 

scheduling.mp4

Abstract


Docker containers are emerging technologies that enable an easy deployment of the software as services independently from the used hardware devices hosting them (e.g. ECUs). However, the execution of those containers can become quickly computationally intensive in a constrained environment with limited CPU, memory, and energy resources. Consequently, the efficient management of these containers is the key to enable the on-demand usage of the applications in the vehicle based on the available resources and scenarios. In this paper, we propose a dynamic software containers management approach for embedded devices/ECUs in smart cars. To deal with the conflicting objectives and constraints, our search-based approach consists of an intelligent scheduler based on multi-objective optimization to find the optimum management solution, i.e., the allocation of containers within the clusters/ECUs that deliver the optimal usage of the resources while balancing the load between the ECUS of smart cars. In collaboration with our industry partner, the Ford Motor Company, We evaluated our approach using different real-world scenarios in a heterogeneous cluster of ECU devices in the vehicle based on original software containers provided by our partner.


Objectives

In this paper, we aim to provide an effective solution for dynamic workload balancing and intelligent scheduling of Docker containers across a cluster made up of multiple nodes (embedded ECUs). This allows the vehicle to move critical applications to other ECUs in case the vehicle switches to power conservation mode or in case of failure. Our approach relies on search-based optimisation to find the best trade-off between the objective as we aim to minimize the number of nodes, the intra-communications, memory usage and CPU/ ECU resources. These objectives are difficult to deal with using the default scheduler of containers. Furthermore, we rely on the execution history to predict the usage. We evaluate our approach using simulations of containers that run on multiple devices (e.g., Raspberry Pi) and we compare it to the baseline approaches and the existing multi-objective optimisation techniques


In this work, we adopt a many-objective search algorithm, based on NSGA-III to find a trade-off between six conflicting objectives in normal mode and eight in power saving mode, while respecting constraints. Our many-objective algorithm attempts to minimize:



ย Scheduling Constraints

Our proposed approach aims to solve software scheduling problem for connected vehicles, which is typically subject to four constraints:


1ย  activated Nodes Constraints.

Containers must remain allocated to active nodes in the scheduling process. In case of a failure of a specific ECU ๐‘›1, the scheduler must get notified and must promptly allocate the container on activated nodes.


2ย  Placement Constraints.

Some containers in the cluster should be allocated to specific nodes. Therefore, we associate to each container, the list of activated nodes where it can be allocated.


3ย  Resources Constraints (CPU and memory):

Every node has CPU and memory maximum usage that should not be exceeded.


4 Power consumption Constraints:

For an efficient power usage of the cluster. Every node has a power consumption limit that we can not exceed as it is shown inย  the following figure. In this example, container #1 and container #2 were allocated to ECU1 (100W<120W), container #3 is assigned to ECU2 with a power usage limit equal to 40W<10W, but container #4 was halted since by selecting one of the three nodes, the maximum power usage constraint for the 3 nodes will be violated.


5 Dependencies Constraints:

Respecting the containers dependencies when the power saving mode is on is an important constraint in a candidate solution. For example, if a container remains in the final solution, all its dependencies must keep running even if they have a lower priority than other containers, to guarantee a normal behavior for that specific container.

ย NSGA-III WITH A CONSTRAINT HANDLING APPROACH


We propose a many-objective optimization algorithm (NSGA-III) to allocate containers in Docker Swarm mode. This technique takes as input a dependency graph ๐บ of ๐‘› container, and the current Swarm State ๐‘ƒ ๐‘ก. Then, it generates a new Swarm State ๐‘ƒ ๐‘ก +1 , which specifies the new containers placement in the cluster. The pseudo code below describes the steps to generate a population ๐‘ƒ ๐‘ก +1 from a parent population ๐‘ƒ ๐‘ก.