Optimal energy-efficient placement of virtual machines with divisible sizes
Introduction
Data centers serve an ever-growing demand for computational power. The resulting growth in the energy consumption of data centers has both huge environmental impact and huge costs [19]. Therefore, the energy-efficient management of data centers has received much attention in the last couple of years.
Hardware vendors have devised techniques to reduce the power consumption of resources that are idle or lightly loaded [2]. As a result, the power consumption of a server depends significantly on its load. For example, the power consumption of a HP ProLiant DL380 G7 server varies from 280W (zero load) to 540W (full load) [10]. It is important to take into account the power characteristics (i.e., how power consumption depends on the server's load) when allocating workload on the servers. Most previous research assumed linear power characteristics [24], but some used more sophisticated power models, e.g., Hsu and Poole found the function to yield the most accurate results [11].
A key technology for enabling effective data center management is virtualization. In a virtualized data center, the applications are deployed in virtual machines (VMs), which are in turn deployed on physical machines (PMs). This way, multiple applications can co-exist on the same PM in an isolated manner. Through virtualization, the workload can be allocated on a few highly utilized PMs and other PMs can be turned off, resulting in significant savings in energy consumption. This leads to an important optimization problem called the VM allocation problem: given the capacity and power consumption characteristics of the PMs and the load of the VMs, how to map the VMs on the PMs so that the overall energy consumption is minimal.
Several slightly different versions of the VM allocation problem have been addressed [16]. In many cases, the objective was to minimize the number of turned-on PMs as a proxy for energy consumption [3], [20], [22], [23]. This is only an approximation though since the power consumption of turned-on PMs can vary heavily. And with the advancement of technology, the dynamic power range (i.e., the difference between maximum and idle power consumption) of PMs is increasing.
In terms of the proposed algorithmic techniques, some works suggested exact methods but the majority applied heuristics. The proposed exact methods rely almost always on some form of mathematic programming (e.g., integer linear programming) and off-the-shelf solvers [9], [20]. Unfortunately, these approaches do not scale to practical problem sizes.
There is a natural connection between the VM allocation problem and bin-packing: VMs with their loads can be seen as items with given sizes that need to be packed into bins (PMs) of given capacity. On one hand, this proves that VM allocation is NP-hard. On the other hand, several researchers suggested to adopt bin-packing heuristics like First-Fit, Best-Fit, First-Fit-Decreasing etc. to the VM allocation problem [4], [14], [25]. However, VM placement is in several ways more complex than bin-packing, so that the known approximation results concerning these algorithms on bin-packing [6], [7] cannot be transferred to VM placement; in other words, they remain heuristics the results of which can be arbitrarily far from the optimum [15], [17], [18].
Some relevant generalizations of bin-packing have also been considered, mainly from an approximation point of view. Epstein and Levin showed an asymptotic polynomial-time approximation scheme (APTAS) for the problem in which different bin types are considered, each bin type is associated with a capacity and a cost, and the aim is to pack the items into a set of bins with minimum total cost, assuming that a sufficient number of bins are available from each type [8]. The problem that we are addressing now is more complex in the sense that the cost of a bin (its energy consumption) is not constant, but depends on how full it is. If each bin's cost depends linearly on how full it is, and this linear function is the same for each bin, then it is easy to see that the problem admits an APTAS [17]. However, the problem in which the cost of different bins can be described by different and not necessarily linear functions (which is a more realistic model of the VM allocation problem), has to our knowledge not been addressed yet.
The hardness of bin-packing arises partly because arbitrary sizes can appear in the input. Constraints on the allowed sizes can make the problem much easier. If the item sizes form a divisible series – i.e., for each pair of different item sizes, the smaller is a divisor of the larger – bin-packing can be solved optimally in polynomial time [5]. In this paper, we use a similar approach to devise a polynomial-time exact algorithm for the generalized problem in which the cost of bins depends on how full they are, under the assumption that the item sizes form a divisible series. This assumption is not too strict for VM allocation, because PM capacities and VM sizes are often powers of 2 [21], leading to divisible item size series.
The contributions of this paper are as follows:
- •
We address a version of the VM allocation problem, aiming to minimize total power consumption, where the power consumption of each type of PM is given by some function of its load. In contrast to previous works, we make only very light assumptions on these functions: they must be monotonously increasing and concave. These assumptions hold for example for the linear power consumption characteristics used by several researchers [1], [24] and also for the more sophisticated power consumption characteristics proposed by Hsu and Poole [11]. Further, we assume that VM sizes form a divisible series. This assumption holds for example if the VM sizes are all powers of two, which occurs frequently in practice, as reported by Shen et al. [21].
- •
We devise an algorithm called OptDiv for this problem. OptDiv is based on the First-Fit-Decreasing (FFD) heuristic, but FFD is oblivious of bin costs, so OptDiv extends it with informed decisions relating to power consumption.
- •
We prove that, under the given assumptions, OptDiv results in optimal total power consumption.
- •
OptDiv is very fast, in contrast to the proposed APTASs that are often not practical because of the huge constants in their execution times [13].
Section snippets
Preliminaries
In the bin-packing problem, we are given a set of n items with sizes and a sufficiently large set of bins, each having capacity C, where . The aim is to pack all the items into a minimal number m of bins so that for each , the sum of the sizes of the items in is at most C. denotes both the ith bin and the set of items in that bin.
The items arrive in some order . The First-Fit heuristic (FF) processes the items in this order: it starts by opening a bin
Proposed algorithm (OptDiv)
Given an instance of the VM allocation problem with item sizes , capacity C, and bin type cost functions , our algorithm OptDiv consists of the following two phases:
- 1.
Running FFD with item sizes and capacity C. The result is a series of disjoint subsets such that in each , .
- 2.
Selecting for each a bin of the type j for which is minimal, i.e., is optimal for size .
In other words, we disregard the cost functions in the first phase and pack
Empirical evaluation
To empirically assess the effectiveness and efficiency of the proposed algorithm (OptDiv), we implemented it in a C++ program together with two alternatives. One of them is the normal – i.e., power-oblivious – FFD algorithm, the other is the Power-Aware Best Fit Decreasing (PABFD) algorithm proposed in the literature specifically for the VM allocation problem [4].
We fixed the capacity of the PMs to 1024 and generated n VMs with sizes chosen uniformly at random from the powers of two between 1
Open problems
Several interesting open problems remain. In particular, it is unclear if the presented methods can be carried over to the following generalizations of the problem: (i) bin types with different capacities; (ii) limited number of available bins per bin type; (iii) multi-dimensional vector bin packing.
Acknowledgements
This work was partially supported by the Hungarian Scientific Research Fund (Grant Nr. OTKA 108947) and by the European Union's Horizon 2020 research and innovation programme under grant 731678 (RestAssured).
References (25)
- et al.
Bin packing with divisible item sizes
J. Complex.
(1987) Fast algorithms for bin packing
J. Comput. Syst. Sci.
(1974)Rigorous results on the effectiveness of some heuristics for the consolidation of virtual machines in a cloud data center
Future Gener. Comput. Syst.
(2015)- et al.
CACEV: a cost and carbon emission-efficient virtual machine placement method for green distributed clouds
- et al.
The case for energy-proportional computing
Computer
(2007) - et al.
A branch-and-bound approach to virtual machine placement
- et al.
Optimal online deterministic algorithms and adaptive heuristics for energy and performance efficient dynamic consolidation of virtual machines in cloud data centers
Concurr. Comput., Pract. Exp.
(2012) The tight bound of first fit decreasing bin-packing algorithm is
- et al.
First fit bin packing: a tight analysis
- et al.
An APTAS for generalized cost variable-sized bin packing
SIAM J. Comput.
(2008)
Managing cost, performance, and reliability tradeoffs for energy-aware server provisioning
HP. Power efficiency and power management in HP ProLiant servers
Cited by (4)
Approximation algorithms for a virtual machine allocation problem with finite types
2023, Information Processing LettersPerformance comparison of multi-container deployment schemes for HPC workloads: an empirical study
2021, Journal of SupercomputingA Reinforcement Learning-Based Virtual Machine Placement Strategy in Cloud Data Centers
2020, Proceedings - 2020 IEEE 22nd International Conference on High Performance Computing and Communications, IEEE 18th International Conference on Smart City and IEEE 6th International Conference on Data Science and Systems, HPCC-SmartCity-DSS 2020A Survey on the Current Challenges of Energy-Efficient Cloud Resources Management
2020, SN Computer Science