Machine Learning Software Allocation SusCom
Machine Learning Software Allocation SusCom
net/publication/375747972
CITATIONS READS
0 14
2 authors, including:
Leila Helali
Sousse University
7 PUBLICATIONS 70 CITATIONS
SEE PROFILE
All content following this page was uploaded by Leila Helali on 09 December 2023.
Keywords: With the growing number of cloud services protected by licenses, compliance management and assurance
Compliance is becoming critical need to support the development of trustworthy cloud systems. In these systems, the
License optimization multiplication of services and the inefficient resource utilization incurred energy consumption and costs
Energy efficiency
increase despite the consolidation initiatives underway. Few works deal with resource allocation optimization
Resource management
at the SaaS level, which does not consider compliance aspects. Generally, the reported consolidation work
AI
Reinforcement learning
does not address license management in the cloud environment as a whole, particularly from a resource
management perspective, and the vast majority of consolidation work focuses on resource optimization at
the infrastructure level. Thus, we propose a software license consolidation scheme based on multi-objective
reinforcement learning that enables efficient use of resources and optimizes energy consumption, resource
wastage, and costs while ensuring compliance with the processor-based licensing model. The experimental
results show that our solution outperforms the baseline approaches in different scenarios with homogeneous
and heterogeneous resources under different data center scales.
1. Introduction and licenses should be scaled up and down rapidly according to real
needs, this method is unsuitable and costly. Moreover, software licens-
With the emergence of new paradigms like softwarization [1] and ing is considered as an obstacle for the cloud [6].1 Here, we consider
network function virtualization, the demand for services and resources processor-based licensing, which depends on the number of cores of
in cloud data centers (DCs) was accelerated. The SaaS market repre- the processor and a core processing license factor as in the Oracle
sents the most important evolution that remains in 2021, with $97
database case [7]. From a resource management perspective, energy
billion in global spending [2]. Proprietary solutions are particularly
consumption represents another important component of operational
underlined due to the current economic climate. Managing these ser-
vices protected by licenses represents a recent challenge where more expenditure in the cloud and can contribute to global warming due to
than 50% of the incurred costs within a DC are reserved for software the enormous emission of carbon and the released temperature. The
licensing, maintenance, and deployment [3]. Indeed, The software amount of energy is significant in the actual data centers delivering
license charges may be included in the virtual machine (VM) price cloud computing services that contain thousands of computational ma-
(License Charges Included) when VM-based virtualization technology chines [8]. Energy consumption is increased with increasing resource
is used or considered separately. In the latter case, the cloud user, utilization within a DC. The poor management of resources can cause
when deploying the software, considers his software license called exploitation of only 10% of about 30% cloud servers [1]. As a result,
Bring Your Own License (BYOL) [4]. Here, we consider the second up to 13% of global electricity will be used by data centers by the year
scenario. In addition to the generated costs, non-compliant situations 2030 [9]. To cope with the aforementioned problems, consolidation
can cause many potential risks which translate into economic losses.
is a suitable technique that allows us to run more workloads with
This notion of compliance appeals to the metric model used in software
lower costs and lowered power demands without adding new hardware
licensing which remains obscure in commercial cloud data centers. The
most popular licensing method uses declarative licenses, where the and resources [1]. Through migration and optimal allocation, software
business agreements established are periodically audited to check com- licenses are dynamically provisioned and released elastically according
pliance [5]. In highly dynamic cloud environments, where resources to the real use to prevent under/over utilization of resources.
∗ Corresponding author.
E-mail addresses: [email protected] (L. Helali), [email protected] (M.N. Omri).
1
Flexera 2020 State of the Cloud Report.
https://doi.org/10.1016/j.suscom.2023.100938
Received 14 February 2022; Received in revised form 20 January 2023; Accepted 18 November 2023
Available online 28 November 2023
2210-5379/© 2023 Elsevier Inc. All rights reserved.
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
Fig. 1. An example of software license consolidation. Each software is associated with a utilization rate representing its resource requirements (CPU and memory) in its hosting
PM, and a cost of licenses, successively. For example, every instance of the software S1 needs 6% of the running PM CPU, 6% of that PM’s memory, and a software cost of 0.5.
Very few works address consolidation at the software level. To implicitly reduces the infrastructure costs. Furthermore, the costs re-
this end, we propose an intelligent scheme based on a reinforcement sulting from penalties caused by non-compliant situations are another
learning framework to migrate and dynamically allocate the software dimension of losses [10] that are treated and avoided in our work
licenses. Our approach tends to maximize the DC utilization by mini- by preserving compliance. This way allows a win–win strategy and
mizing the wasted resources at the physical machine (PM) and virtual improves the provider’s reputation. The following points summarize the
machine levels and reducing energy consumption along with costs key contributions to address the mentioned challenges:
including license and VM costs while being compliant. It is a proactive
approach that handles compliance and checks the number of installed • A pre-allocation approach that, combined with our Maximum Li-
instances of each software from the resource scalability step, instead cense Cost (MLC) migration policy [11], allows important savings
of reactively auditing the already installed software instances to deal via migration by saving the cost of the most expensive software
with compliance. Our proposed model was evaluated regarding homo- licenses, is proposed.
geneous and heterogeneous machines (PMs and VMs) with small and • An intelligent software license consolidation (SLC) scheme is
larger data center sizes. proposed which dynamically reallocates the SLs based on the
These DCs are virtualized according to the VM-container architec- reinforcement learning (RL) framework.
ture when software license (SL) applications are packaged in containers • Extensive simulations are conducted to evaluate our proposed
that run in VMs since software licenses require strict security mea- scheme considering different metrics and approaches which show
sures. This virtualization solution represents the best alternative until the superiority and the effectiveness of our approach.
now [1]. This is also encouraged by the quick deployment of new
SLs along with the agility and lightweight of containers to develop a The rest of this paper is structured as follows. In Section 2, we
dynamic consolidation solution in dynamic and highly changing cloud introduce the software license notions in the cloud environment and
environments. In this architecture, the resources used by the software provide the motivation of our work. In Section 3, we present the related
licenses (processes) are managed through control groups (cgroups) and work followed by the formulation of our proposed model in Section 4.
namespaces [1]. Optimizing operational expenditures, including energy Section 5 describes our proposed architecture and its building blocks,
consumption, represents a challenge for cloud providers (CP). Thus, and details our intelligent consolidation approach applying reinforce-
the classic consolidation works are generally performed from the CP ment learning. The simulation settings, results, and discussions are
perspective by grouping virtual machines in the minimum number detailed in Section 6, followed by a conclusion section.
of servers. Our approach represents another benefit by grouping the
software licenses in the minimum number of virtual machines. This
2. Preliminaries and motivations
allows for minimizing the license costs when many licenses are packed
in the same virtual machine and paid only once without escaping
compliance. This also allows for maximizing the client profit through This section is devoted to presenting an overview of the software
the minimization of the user-monetary costs by minimizing the number licenses in the cloud, the notion of licensing metrics, and the use case
of virtual machines, which offers more flexibility to further reduce considered in the rest of the article. Then, a motivating example of
the number of active physical machines in the data center, and thus, software license placement optimization will be presented.
2
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
2.1. An overview of software licenses in the cloud In the other configuration (Placement B), only 10 VMs and 5 PM are
needed to run this workload.
Today, software services are externalized through the cloud and This encourages us to bundle multiple SLs into the same VM when-
their number is multiplied. Managing this software when they are ever possible instead of dedicating one VM to running each SL. This is
regulated by licenses represents a recent trend in the cloud computing enabled by the emergence of container-based clouds and containerized
environment virtualized to the extreme. workloads [1]. Thus, software licenses can be wrapped in containers
The license determines what a user can and cannot do with the for isolation and containerized SLs run in VMs to provide a high level
software. It represents the ‘‘legal rights to use the software in accor- of security [12]. As part of the work presented in [1], the benefits of
dance with terms and conditions specified by the software licensor’’.2 considering a VM container virtualization solution were discussed. We
Customers use a variety of software licenses example operating system believe that grouping several SLs in the same VM allows us to minimize
licenses (windows server, Red Hat, etc.), database licenses (SQL Server, the waste of resources and thus, to offer more possibilities to optimize
Oracle Database, etc.), Applications licenses (SAP ERP, IBM Websphere, energy consumption. This also helps to optimize virtual machine costs
etc.), and other third-party licenses. and licensing costs, as we will see later. This strategy, when applied to
The software products follow a whole life cycle from purchasing to the DCs of cloud giants like Google and Amazon, will certainly lead to
usage then decommissioning [10]. The rules to follow that organize the huge savings in terms of energy.
use of the product and that contain the information (for example the In our work, we address licensing and consolidation from a re-
region where the product can be installed) about contractual rights are source management perspective to economics, energy consumption
defined in the Product Use Rights (PURs). If the image of the product considerations, and compliance. Our goal is to place software licenses,
is non conform to the established rules or if the used licenses do not either initially or after migration, into the most appropriate machine
fit with the license stock, a penalty will be imposed by publishers. with respect to resource usage and inherent power consumption while
In addition to the usage rights defined in PURs that describe the minimizing costs and ensuring compliance. The originality of our work
conditions of the product use, possessing a sufficient number of licenses is the fact of considering the definition of the metric in an objective
that covers all products is an obligation to be compliant. Having enough of cost reduction, in parallel with the software consolidation which is
licenses is necessary but using them efficiently is more advantageous. little treated in the literature.
It is worth noting that to account for the number of licenses we need
for proprietary software, the concept of metric imposes, which is an 3. Related work
important PUR. In fact, for having the right to use a product, a given
user have to process multiple licenses and this number is computed This section presents software license consolidation-related works,
based on the metric. A single product may have several metrics (users, synthesized in Table 1. It is worth noting that the overwhelming
devices, etc.) with different prices per license depending on the metric majority of consolidation work was concentrated at the infrastructure
model. As an example, two metrics can be used to license the Oracle level and the workload consolidation at the software is still in its
Database namely: (i) Processor where ‘‘The number of required licenses early days [12]. Also, license management and optimization [10]
shall be determined by multiplying the total number of cores of the pro- and compliance aspects [13] are rarely addressed in the literature.
cessor by a core processor factor ’’ [7]. And (ii) Named User Plus (NUP) In [3], Sen et al. considered software license consolidation by placing
metric, which requires a minimum of 25 Named User Plus per Processor workloads with similar software stack on the same PM to reduce the
license or the total number of actual users, whichever is greater. When number of software instances, and thus costs. The authors consider a
licensing the Oracle Database by Named User Plus, all users who are typical CRM web application and they consolidate the software into
using the Oracle Database, as well as all non-human operated devices several layers. This work performs classical hardware consolidation and
that are accessing the Oracle Database must be licensed [7]. a per-server consolidation of software. The limits of this approach are
represented in isolation problems with the lack of dependencies and
2.2. Use case: Processor-based metric support to migrate hosted applications across servers. It also has a
security problem because of the fact of consolidating in the stack above
Counting users on the internet is difficult [7]. Thus, the NUP metric the VM without taking security measures, if the software (application,
is hard to apply. Moreover, in virtualized environments, there is an portal, middleware) is contaminated, it incurs serious security prob-
alternative model to the processor-based metric, based on the vCPU lems. In [14], the authors consider the cost of licensed components in
(virtual CPU). As the number of vCPU depends on the hypervisor, virtual machine consolidation. The objective is to select suitable VMs
it is hard to have the real accurate number of vCPU per machine. to place software components and suitable PMs to accommodate these
Thus, we consider a processor-based licensing use case that allows VMs, without considering the deployment or consolidation aspects of
us to determine accurately the number of cores per physical machine these components. In [15], a software consolidation approach was pro-
and thus the number of licenses in this machine. Furthermore, many posed to optimize energy consumption and costs that do not consider
users can run the same software through many instances in the same licenses. In [11] and [12], some heuristic-based consolidation solutions
provider. Thus, many instances may belong to the same software even for software licenses were proposed. The objective is to optimize costs
for different users. To simplify, each instance designates a license in the and energy consumption. This solution has shown motivating results.
rest of the manuscript. Some virtual machine consolidation work treated resource wastage like
the works proposed in [16] and in [17]. Regarding the technical aspect,
2.3. Motivations heuristics, metaheuristics, and reinforcement learning-based solutions
are the most adopted in cloud resource management and consolidation.
As shown in the example given by Fig. 1, we consider 7 software A comparison is given here [1].
types with 3 licenses of each software (the number of licenses by soft- Contrary to the approaches previously presented, in our work, the
ware can vary) colored with the same color, with their resource usage containers that package the software licenses and their dependencies
(CPU and memory) and fees. To place these SLs, two configurations resolve the isolation problem of Sen’s work [3], and the considered
are presented. In the first configuration (Placement A), each VM runs VM-container virtualization architecture allows to resolve the security
an SL. In this case, we need 21 VMs and 8 PMs to run the workload. risks [1]. We also perform consolidation at the software level and not
the VM as Mann [14] did. In [11] and [12], compliance and wastage
of resources have not been taken into account. In fact, none of the
2
ISO/IEC 19770-5, 3.41. literature work considers resource wastage and compliance aspects.
3
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
Table 1
Summary of related works.
Work CL LC VM cost EC RW Comp
Mann [14] VM ✓ – – – –
Sen et al. [3] Hardware, software ✓ – – – –
Tchana et al.[15] Software, VM – ✓ ✓ – -
Helali et al. [11] Software license ✓ ✓ ✓ – –
Helali et al. [12] Software license ✓ ✓ ✓ – –
Our work Software license ✓ ✓ ✓ ✓ ✓
CL = Consolidation Level, Comp = Compliance, LC = License Cost, EC = Enegry Consumption, RW = Resource Wastage.
successively.
{
1 𝑆𝐿𝑟𝑘 is allocated to 𝑉 𝑀𝑗
𝛼𝑗𝑘 = (2)
0 else
Finally, we express the relationship between a software license
𝑆𝐿𝑟𝑘 and a physical machine 𝑃 𝑀𝑖 as 𝛼𝑗𝑘 𝛿𝑖𝑗 with 𝑖 ∈ [1..𝑁𝑃 𝑀 ], 𝑗 ∈
[1..𝑁𝑉 𝑀 ] and 𝑘 ∈ [1..𝑁𝑆 ].
Fig. 2. The set of PMs with their resource utilization.
{
1 𝑉 𝑀𝑗 is placed on 𝑃 𝑀𝑖
𝛿𝑖𝑗 = (3)
0 else
Our goal is to optimize the total cost (licenses+VMs) along with
the overall energy consumption while minimizing the wasted resources
within the cloud DC.
4
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
The normalized memory utilization of a 𝑃 𝑀𝑖 is given by Eq. (9). In the same way, we propose the Eq. (19) below to model the
Where 𝑁𝑈𝑗𝑚 , 𝑁𝑈𝑘𝑚 and 𝐶𝑎𝑝𝑚 𝑖 represent the normalized memory uti- resource wastage of a q-dimensional 𝑉 𝑀𝑗
lization of the 𝑉 𝑀𝑗 , that of the software license 𝑆𝐿𝑟𝑘 , and the memory ∑𝑞 | 𝑞 |
|𝑁𝑅𝑡𝑗 − 𝑚𝑖𝑛𝑜=1 (𝑁𝑅𝑜𝑗 )| + 𝜌
capacity of the 𝑃 𝑀𝑖 successively. 𝑡=1 | |
𝑅𝑊𝑗 = ∑𝑞 𝑡
(19)
𝑗 𝑁𝑈
∑ 𝛿𝑖 𝑁𝑈𝑗𝑚 𝑡=1 𝑗
𝑁𝑈𝑖𝑚 =
𝑗
𝐶𝑎𝑝𝑚
𝑖 𝑁𝑅𝑚𝑎𝑥
𝑗 = 𝑚𝑎𝑥(𝑁𝑅𝑐𝑗 , 𝑁𝑅𝑚
𝑗 ) (20)
(9)
∑∑ 𝛼𝑗𝑘 𝛿𝑖𝑗 𝑁𝑈𝑘𝑚
= 𝑁𝑅𝑚𝑖𝑛 = 𝑚𝑖𝑛(𝑁𝑅𝑐𝑗 , 𝑁𝑅𝑚 (21)
𝐶𝑎𝑝𝑚 𝑗 𝑗 )
𝑗 𝑘 𝑖
considering 𝑁𝑅𝑚𝑎𝑥
𝑗 and 𝑁𝑅𝑚𝑖𝑛𝑗 that denote the maximum (respec-
4.3. Power and energy models tively minimum) residual resources of memory and CPU utilization (see
Eq. (20) and (21)) of a given 𝑉 𝑀𝑗 , the Eq. (19) became:
The power consumption of a machine 𝑃 𝑀𝑖 is modeled as the sum
| |
of the static (𝑃 𝑠𝑡 ) and dynamic (𝑃 𝑑𝑦 ) parts as shown in Eq. (10). |𝑁𝑅𝑚𝑎𝑥 𝑗 || + 𝜌
− 𝑁𝑅𝑚𝑖𝑛
𝑅𝑊𝑗 = |
𝑗
(22)
𝑃𝑖 = 𝑃𝑖𝑠𝑡 + 𝑃𝑖𝑑𝑦 (10) 𝑁𝑈𝑗𝑐 + 𝑁𝑈𝑗𝑚
The former is defined by the power consumption of the host when 𝑁𝑅𝑡𝑗 is the normalized residual resource vector of the virtual machine
no VM is active and thus no SL runs on the machine. Otherwise, the 𝑉 𝑀𝑗 and is given by the Eq. (23).
dynamic part is added to obtain the total power of a server function
𝑁𝑅𝑡𝑗 = 1 − 𝑁𝑈𝑗𝑡 (23)
of the power consumption of a fully utilized machine (𝑃 𝑓 𝑢 ) which is
detailed in Eq. (11). 𝜌 and 𝜂 are small positive numbers, we assume that 𝜌 = 𝜂 = 0.0001 [16].
{ The total resource wastage in the DC is given by:
𝑐 𝑥 ∗ 𝑃𝑖𝑓 𝑢 + (1 − 𝑥) ∗ 𝑃𝑖𝑓 𝑢 ∗ 𝑁𝑈𝑖𝑐 (𝑡), 𝑁𝑈𝑖𝑐 (𝑡) > 0
𝑃𝑖 (𝑁𝑈𝑖 (𝑡)) = (11) 𝑁𝑃 𝑀
0, otherwise ∑ ∑
𝑅𝑊 = (𝑅𝑊𝑖 + 𝛿𝑖𝑗 𝑅𝑊𝑗 ) (24)
The static power consumption is a part of the dynamic consump- 𝑖=1 𝑗
𝑖=1
As we consider processor-based licensing, the license fee is paid
As discussed in [1], the energy consumption is composed of many once for at least an instance of software running on a given machine.
parts (network, cooling, etc.) rather than the server energy. But, this We notice that the number of licenses (the number of copies permitted
later represents the most important part. Thus, to simplify concerns, of the same software) can be controlled by the ID of containers packing
we only consider the energy consumption at the server level. them as Revenera do.3 The total cost of a VM is given by Eq. (26).
5
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
functions in one function 𝑓 , we adopt the most commonly used lin- resource usage and getting local resource states that will be used
ear weighted sum aggregation (Eq. (30)) [22]. The weights 𝑤𝑖 are by the launcher to trigger the consolidation process. Based on this
comprised in the interval [0,1] and verify the Eq. (31). information, the modeler estimates the cost, energy, and resource waste
∑
𝑛 in the DC. The selector, on the other hand, chooses the software license
𝑓= 𝑤𝑖 ∗ 𝑓 𝑖 (30) to be migrated according to an optimal strategy called MLC which will
𝑖=1
be detailed in the next section. Then, the smart allocator first selects
∑
𝑛
the list of candidate virtual machines for each migrated SL. Afterward,
𝑤𝑖 = 1 (31)
𝑖=1 it proceeds to the evaluation of the potential allocation to, finally,
decide on the most appropriate actions allowing to optimize the DC
In our case, n = 3 and 𝑓 became:
state according to the RL framework.
𝑚𝑖𝑛(𝑤1 ∗ 𝐸 + 𝑤2 ∗ 𝐶 + 𝑤3 ∗ 𝑅𝑊 ) (32) As a first step, the pre-allocator performs a pre-selection as de-
𝑤1 , 𝑤2 and 𝑤3 reflect the importance of each objective function in the scribed below. In the second step, the allocation decision is communi-
single-objective function f. Thus, the final result of the proposed model cated to the compliance checker to check whether any given allocation
depends on these three variables. We consider these three objectives of has escaped compliance proactively. This can be restricted by testing
a comparable magnitude and consider equivalent weights. whether or not the number of instances of the software, of the same
Furthermore, the following constraints are considered: license, exceeds the allowed amount based on the processor-based
metric. If this is the case, the compliance module triggers an alert
𝐿𝑘𝑃 𝑀 <= 𝑁𝑙𝑖 ∀𝑖 ∈ [1..𝑁𝑃 𝑀 ], 𝑘 ∈ [1..𝑁𝑁𝑆 ] (33) (see Fig. 9) and prevents the allocator to evaluating another allocation.
𝑖
The Eq. (33) denotes that the allowed software instances of a given This process is repeated until a conforming allocation is found. The
license type must not exceed the allowed number of that license type last decision of SL placement is then communicated to the activa-
following the processor-based metric. tor/deactivator module to activate new VMs/PMs if necessary and/or
∑ 𝑗 stop unused ones. Finally, the DC state is updated to dynamically start
𝛿𝑖 𝑁𝑈𝑗𝑐 < 𝐶𝑎𝑝𝑐𝑖 ∀𝑖 ∈ [1..𝑁𝑃 𝑀 ], 𝑗 ∈ [1..𝑁𝑉 𝑀 ] (34) a new consolidation after every 5-minute time interval.
𝑗
Eqs. (34) and (35) fix the constraints related to the memory and CPU
utilization limit of a PM which should not be exceeded by the CPU and 5.2. Compliance-aware RL-based dynamic software license placement
memory utilization of all hosted VMs.
∑ 𝑗 The software license consolidation follows a whole process illustrat-
𝛿𝑖 𝑁𝑈𝑗𝑚 < 𝐶𝑎𝑝𝑚 𝑖 ∀𝑖 ∈ [1..𝑁𝑃 𝑀 ], 𝑗 ∈ [1..𝑁𝑉 𝑀 ] (35)
𝑗 ing the main steps of the proposed intelligent scheme to perform the
DC optimization in terms of energy consumption, resource wastage,
Likewise, Eqs. (36) and (37) allow ensuring that the CPU and
and total costs. These steps, detailed below, are performed at runtime
memory utilization of software licenses that are co-located in a VM does
not exceed the limit of CPU and memory utilization of the VM hosting according to the utilization level of the PMs. The DC state is periodically
them. evaluated and the consolidation decision is made based on the resource
∑ state.
𝛼𝑗𝑘 𝑁𝑈𝑘𝑐 < 𝐶𝑎𝑝𝑐𝑗 ∀𝑗 ∈ [1..𝑁𝑉 𝑀 ], 𝑘 ∈ [1..𝑁𝑆𝐿 ] (36)
𝑘
5. Methodology
5.2.2. Migration
After triggering the consolidation process, some SLs have to be
5.1. System architecture
selected for migration (see Fig. 6).
In this section, we detail the proposed architecture for SL consoli- For this step, we use the Maximum License Cost (MLC) migration
dation shown in Fig. 5 and their building blocks. In the Entropy [23] strategy [11,12] that saves the cost of the most expensive SL that cre-
approach, where a central entity is responsible for all aspects of con- ates overload/underload situations. On a critical machine, the critical
solidation, an architecture is entirely centralized. In our approach, we SL(s) that have the maximum license fees will be given the highest
separate monitoring and compliance verification. These two parts are priority to be migrated and it is added to the list of migratable SLs. The
distributed and deployed in each software licensing compute host. This idea is that if we can migrate the software license with the maximum
distributed architecture, regarding resource monitoring and compliance cost in a VM that contains another instance of the same software,
checking, enables natural system scalability and avoids the single point we save the cost of the migrated license. This gives more chances to
of failure. The monitor is responsible for collecting information on optimize costs at the maximum [12].
6
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
An important step when applying reinforcement learning to a prac- 𝑃 𝑀𝑖 at the instant t. Allocating an 𝑆𝐿𝑘 to a 𝑉 𝑀𝑗 changes the state of
tical problem is the identification of the state space, action space, and this VM and thus the PM hosting it.
reinforcement signal (reward function). Action space: For each migrated SL, the action space is defined by
State space: The state space which is denoted by 𝑆𝑡 = {𝑆𝑡1 , 𝑆𝑡2 , … , a binary variable (PLACE/NOT) indicating if the SL will be placed into
𝑆𝑡𝑁 } is formed by the detailed information of the set of 𝑁𝑃 𝑀 a 𝑉 𝑀𝑗 for all the preselected VMs in the previous step if that VM has
𝑃𝑀
elements at time step t. Each element of the state space is given by enough resources to accommodate the SL. We consider all the VMs in
7
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
8
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
Fig. 8. An example of Q_table functioning and updating. In this example, we have 3 PMs represented in rows of the Q_table and 7 VMs in columns. If a VM is not hosted by
a PM, the box at the intersection of the corresponding row and column is colored in black. Otherwise, this later represents the Q_value which is updated through time by the
intelligent agent.
6. Simulation and results analysis small scale, we consider a DC with 30 PMs, 100 VMs, and 300 SLs (30
software and 10 licenses). For the wide scenario, we consider 100 PMs,
In order to reach an optimal data center state in terms of energy 300 VMs, and 1000 SLs (100 software and 10 licenses). Moreover, the
consumption, overall cost, and resource utilization, we implemented overload and underload threshold values are 0.8 and 0.4 respectively.
the proposed scheme and evaluated its performances as will be de- For each PM, we assume a network bandwidth of 1 GB/s. Regarding
tailed below. Firstly, we present the research questions we tend to VM pricing, we use the popular Pay-as-you-go model. M1 medium
answer through extensive simulation, then we detail the setting of the instances VM types are used in the homogeneous scenario, which are
parameters before presenting the results and their analysis. charged at $0.120 per VM per hour. For the heterogeneous scenario,
The main research questions addressed in our work are: we used Azure VMs5 offering the flexibility to virtualize a wide range
of solutions supporting windows server, oracle, SAP, etc.
• How does the proposed intelligent approach perform compared
For software pricing, inspired by App Service pricing6 of Azure, we
to the baseline heuristics and the initial DC state while combined
generated the software license fees randomly in [0,1). Furthermore,
with the migration strategy?
we used the same method as in [12] to generate synthetic workload
• To what extent can our approach improve costs, resource utiliza-
instances. Through normalization, we set the total CPU and memory
tion and energy consumption in different cloud DC scales with
utilization of a PM as 1 and the total CPU and memory utilization
homogeneous and heterogeneous resources?
of a VM as 0.25. For each software, a number of licenses are created
• How does our consolidation solution ensure compliance with the
(initially 10), and their costs are also randomly generated as mentioned
processor-based licensing metric?
above. To simplify our model, let us assume that all software running
in the Dc is licensed. We generated 500 software and created variable
6.1. Simulation environment
licensed instances.
Finally, inspired by some best practices like [24] and [25], our
6.1.1. Setup
intelligent RL agent was trained using a learning rate of 0.3, a discount
The proposed solution was implemented in java language, and the
factor, and the exploration/exploitation factor of 1 that are decreased
simulations are carried out on Intel® CoreTM i3-8100 CPU @ 3.60 GHz,
by 99% during the learning process.
8 GB RAM, Windows 10. In our experiments, we consider homogeneous
and heterogeneous resource configurations as shown in Tables 2 and 3.
6.1.2. Compared algorithms
In the homogeneous scenario, all the servers are of type Haswell (Xeon
For the sake of comparison, regarding the SL selection for migration,
2695). The used VMs and their prices are presented in Table 3 and
we compared our MLC policy by:
here [12]. To take the values of power consumption of different types of
hosts used in our experiments at different utilization levels we used the 1. Maximum Usage (MU) [26]: this strategy tends to select the
SPECpower benchmark.4 For each scenario, to meet the real need for software license having the maximum utilization of CPU.
computing resources, we consider the DC size and experiment with our
proposed schemes in small and relatively large-scale resources. For the
5
https://azure.microsoft.com/en-us/pricing/details/virtualmachines/
windows/
4 6
https://www.spec.org/ https://azure.microsoft.com/en-us/pricing/details/app-service/windows/
9
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
Table 2
Power consumption model for the used physical hosts.
Server type 𝑃 𝑠𝑡 (Wh) 𝑃 𝑓 𝑢 (Wh) Number of cores Number of CPU
Haswell (Xeon 2695) 70 120 14 2
Ivy Bridge (Xeon 2670) 65 115 10 2
Sandy Bridge (Xeon 2670) 55 105 8 2
Table 3
Virtual machines pricing.
Instance type Price ($/h)
DS11-1 v2 0.149
G1 0.49
E8a v4 0.504
10
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
Fig. 12. Number of active PMs results. Fig. 13. Total cost results.
the most power-efficient PMs only from the machines with the lower
capacity of CPU resources. In the LAF approach, however, the first
available host that can accommodate the SL in question is selected,
and not necessarily the fullest one. Even if this led to executing more
migrations to reach an optimal state, this heuristic realized important
savings that reached 45.1% in the small-scale heterogeneous scenario.
As we can see in Fig. 11 in the RL training results, in the small-
scale DCs, the RL agent converges rapidly to the optimized results (at
around 2000 iterations). In large scenarios, however, it takes more
time (around 5000 iterations). This is due to the size of the DC when
the wide scenario needs more time to reach an optimal state. In the
homogeneous scenario, the MMT policy gave the best energy values as
it selects the SLs with minimum memory utilization, which is correlated
to CPU utilization. Thus, when combined with the RL approach using
the 𝜖-greedy policy that selects the best action with the maximum
reward when the exploitation rate is important gives the best results.
This can be seen in the training results of Fig. 11, especially, in the last
iterations when the exploration rate decreases and the agent exploit the
acquired competencies. Moreover, the results (Fig. 12) in terms of the
used number of PMs are equivalent to the energy consumption results
since the energy consumption is proportional to the CPU utilization and
Fig. 14. License cost results.
the amount of power consumed by these PMs.
11
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
the number of VMs decrease, the user monetary costs and the total cost minimum number of machines is used more efficiently, the amount
decrease, which guarantees a win–win strategy for both the client and of resource wastage will be minimized, which is the case with the RL
the provider. approach. The heuristic algorithms and RL approach showed similar
Our approach also allows cost minimization, not only in heteroge- behavior in terms of wasted resources. The LAB approach always gave
neous scenarios but also in homogeneous scenarios. This minimization slightly high values because it allows using the maximum number
is ensured by the fact that the total cost depends, mainly, on the cost of machines that are less utilized causing a less efficient use of the
of the licenses which vary according to the instance of the software resource. The best savings are noted in large-scale scenarios that prove
to which this license belongs and also on the model metric used to the scalability of our approaches and the efficient use of resources that
generate this license. increase with the size of the DC scenarios. The gains reached 77.45%
in the wide homogeneous DC.
6.2.3. Resource wastage results
From Fig. 18, which shows the training results of the RL agent, we 6.3. Compliance check results
notice that with some fluctuations at the beginning, the MU policy
converges to optimized results of resource wastage, especially with Fig. 19 shows the results of the compliance checking algorithm,
heterogeneous resources. This is due to the fact that migrating the which tends to verify if an allocation is compliant with the processor-
SLs with the highest CPU utilization allows better utilization of the based licensing model and report the non-compliant tentatives of place-
destination machines. With the heterogeneous scenario, some target ment. The checking results are transferred to the allocator that decides
machines could accommodate more SLs, which maximizes their uti- to evaluate another potential allocation in case of non-compliance.
lization and thus minimizes wasted resources. In addition, when the We can notice that the LAB heuristic showed the highest number of
12
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
13
L. Helali and M.N. Omri Sustainable Computing: Informatics and Systems 41 (2024) 100938
[13] M. Barati, O. Rana, Tracking GDPR compliance in cloud-based service delivery, [23] F. Hermenier, X. Lorca, J.M. Menaud, G. Muller, J. Lawall, Entropy: A consoli-
IEEE Trans. Serv. Comput. 15 (3) (2022) 1498–1511. dation manager for clusters, in: Proceedings of the 2009 ACM SIGPLAN/SIGOPS
[14] Z.A. Mann, Resource optimization across the cloud stack, IEEE Trans. Parallel International Conference on Virtual Execution Environments, ACM, 2009, pp.
Distrib. Syst. 29 (2018) 169–182. 41–50.
[15] A. Tchana, N.D. Palma, I. Safieddine, D. Hagimont, Software consolidation as an [24] M. Kim, J.-S. Kim, M.-S. Choi, J.-H. Park, Adaptive discount factor for deep
efficient energy and cost saving solution, Future Gener. Comput. Syst. 58 (2016) reinforcement learning in continuing tasks with uncertainty, Sensors 22 (2022).
1–12. [25] L. Zhang, L. Lengersdorff, N. Mikus, J. Gläscher, C. Lamm, Using reinforcement
[16] S. Azizi, M. Shojafar, J. Abawajy, R. Buyya, GRVMP: A greedy randomized learning models in social neuroscience: Frameworks, pitfalls and suggestions of
algorithm for virtual machine placement in cloud data centers, IEEE Syst. J. best practices, Soc. Cogn. Affect. Neurosci. 15 (6) (2020) 695–707.
15 (2) (2021) 2571–2582. [26] S.F. Piraghaj, Energy-Efficient Management of Resources in Container-based
[17] M. Hussein, M. Mousa, M. Alqarni, A placement architecture for a container as Clouds (Ph.D. thesis), The University of Melbourne, Australia, 2016.
a service (caas) in a cloud environment, J Cloud Comp 8 (2019).
[18] W. Ding, F. Luo, C. Gu, H. Lu, Q. Zhou, Performance-to-power ratio aware Leila Helali is a Lecturer in Computer Science at the University Of Sousse, Tunisia.
resource consolidation framework based on reinforcement learning in cloud data Her research interests include reinforcement learning; cloud computing, compliance
centers, IEEE Access 8 (2020) 15472–15483. and resource optimization. Moreover, she has enough knowledge of applied machine
[19] Y. Qin, H. Wang, S. Yi, X. Li, L. Zhai, Virtual machine placement based on learning, distributed systems and computer programming. She is a reviewer of interna-
multi-objective reinforcement learning, Appl. Intell. 50 (2020) 2370–2383. tional journals such as Computer Science Review, Journal of Grid Computing, Scientific
[20] Y. Li, X. Tang, W. Cai, On dynamic bin packing for resource allocation in the Reports and The Journal of Supercomputing.
cloud, in: Proceedings of the 26th ACM Symposium on Parallelism in Algorithms
and Architectures, 2014, pp. 2–11. Mohamed Nazih Omri received his Ph.D. in Computer Science from University of
[21] S.S. Masoumzadeh, Autonomic Management of Virtual Machines in Cloud Data Jussieu, Paris, France, in 1994. He is a Professor in computer science at the University
Centers Using Machine Learning (Ph.D. thesis), University of Vienna, Austria, Of Sousse, Tunisia. From January 2011, he is a member of MARS (Modeling of
2017. Automated Reasoning Systems) Research Laboratory. His group conducts research on
[22] J. García, R. Iglesias, M.A. Rodríguez, C.V. Regueiro, Directed exploration in Information Retrieval, Data Base, Knowledge Base, and Web Services. He supervised
black-box optimization for multi-objective reinforcement learning, Int. J. Inf. more than 20 Ph.D. and Msc students in different fields of computer science. He is a
Technol. Decis. Mak. (2019). reviewer of many international journals such as Information Fusion journal, Psihologija
Journal, and many International Conferences such as AMIA, ICNC-FSKD, AMAI, etc.
14