Sie sind auf Seite 1von 5

Peer-to-Peer Bargaining

in Container-Based Datacenters
Yuan Feng, Baochun Li Bo Li
Department of Electrical and Computer Engineering Department of Computer Science
University of Toronto Hong Kong University of Science and Technology
{yfeng, bli}@eecg.toronto.edu bli@cs.ust.hk

Abstract—In container-based datacenters, failure-prone com- Singh et al. [4]) has proposed centralized algorithms to
ponents are sealed in pre-packaged shipping containers, and manage a load-balanced cluster of servers by migrating VMs
component failures over time reduce the availability of re- across server boundaries. By migrating VMs off overloaded
sources. From the perspective of services, application instances
can usually be migrated across the boundary of containers as servers or storage nodes, called “hotspots,” to under-utilized
virtual machines (VMs). In such an environment, it would be servers, performance degradation or premature failures due
sometimes beneficial to migrate application instances to take to overload can be avoided or mitigated. Such centralized
better advantage of available resources. In this paper, we first load management and VM migration is triggered by overload
point out that application placement strategies that are singularly situations in hotspots, and migration is performed across the
focused on the efficiency of resource usage may not be beneficial,
especially when resources are over-provisioned in container-based boundary of individual servers.
data centers. We believe that application instances should be In this paper, we argue that such fine-grained centralized
placed based on the Buffet principle, using resources in an micromanagement to alleviate hotspots represents a step to-
aggressive fashion. Once failures occur, application instances wards the right direction, but is still too microscopic to be
can be migrated across containers, by allowing containers to realistic in modern container-based, or modular, datacenters.
bargain with each other in a peer-to-peer fashion, treating
application instances with different resource requirements as In container-based datacenters, we believe that computational,
“commodities” in a Nash bargaining game. We show that the bandwidth and storage resources are abundantly available, but
ratio of utilizing resources can improved by establishing such component failures over time are the norm, rather than the
local Nash bargaining games, where two containers bargain and exception [5]. This is due to the fact that, once such server-
trade VMs with each other to increase their own utilities. With packed shipping containers are sealed and operational, it is
simulation, we verify the effectiveness of the proposed bargaining
games. very difficult to repair or replace their components individu-
ally. Though the reliability and maintainability of resources
I. I NTRODUCTION are theoretically described by MTBF or MTTF, failures in
One of the design objectives of container-based (modular) different resource dimensions in distinct containers may follow
datacenters is the management of complexity and cost of their own degradation distributions.
deployment. Still, a basic configuration of the Sun MD S20 In this paper, we advocate the application of the Buffet prin-
modular datacenter, for example, is quoted at $559, 000 [1], ciple [6] when it comes to launching application instances to
which represents only a fraction of the total cost of ownership. utilize abundant resources in container-based datacenters. The
As a consequence, it is important to achieve a high level of re- Buffet principle stipulates that, rather than carefully optimizing
source utilization, when it comes to computational, bandwidth, resource usage for efficiency, one can launch as many applica-
and storage resources. Unfortunately, utilization in operational tion instances as needed to utilize all available resources in an
datacenters can be remarkably low, even only 10% [2]. aggressive manner, as long as the marginal benefit outweighs
Recent success in virtualization technologies provides pos- the marginal costs. While the Buffet principle fits well in the
sible solutions to improve resource utilization. Such tech- unique characteristics of container-based datacenters, are we
nologies encourage datacenters be transformed from existing able to handle a reduction of resource availability over time
rigid IT configurations to a more agile infrastructure [3]. due to component failures, if nearly all resources are being
Server virtualization techniques, such as VMware and Xen, utilized?
facilitate application instances to be packaged inside virtual Live migration of VMs comes to our rescue again, but
machines (VMs). These VMs can then be migrated from one at a much coarser granularity. We argue that VMs should
server to another without any downtime to the application be migrated across the boundary of containers, rather than
running within. In addition to virtualizing computational and servers, and only when it is necessary to do so due to a lack
bandwidth resources, storage virtualization techniques, such as of resources (caused by failures). In this paper, we propose that
the IBM SAN Volume Controller and Sun ZFS, are able to containers should be treated as peers, and bargain with each
virtualize storage space into virtual disks (Vdisks), which can other in a peer-to-peer fashion in a local trading market, with
be easily migrated from one storage subsystem to another. VMs traded as “commodities.” Such bargaining games should
As live migration of application and storage instances only be triggered when there exists a resource deficiency, and
become feasible by using virtualization, existing work (e.g., should terminate when the utilization ratio of resources is
2

relatively balanced. Such a design is simple and realistic to — may still outweigh the marginal costs. With a container
be implemented, and takes place in an autonomic and self- costing millions to acquire and hundreds of kilowatts of power
organized manner, precisely as any other bargaining trading to keep up, leaving resources unused may not rational.
markets. . Simple design. Based on the Buffet principle, there is no
The remainder of this paper is organized as follows. In need to design elaborate schemes to determine the number
Sec. II, we briefly introduce the Buffet principle and the of application instances (as VMs) to be deployed in each
VM placement strategy. After showing the benefits of redis- container. The maximum number of VMs is deployed to utilize
tributing VMs across different containers, Sec. III describes all available resources.
the decentralized VM migration algorithm based on the Nash . Enhanced resilience. With the service demand fluctuating
Bargaining Solution. In Sec. IV, we show the effectiveness of quickly and the network changing dynamically, the “sweet
the proposed VM migration algorithm. We conclude this paper spot” is hard to be determined accurately. When experiencing
in Sec. V. a bursty increase of requests within one application, containers
who hold this application currently may be overloaded, leading
II. A PPLYING THE B UFFET P RINCIPLE to performance degradation. Instead of setting a stringent limit
Modern applications hosted by container-based datacenters on resource usage, a greedy consumption of resources may
are highly diverse in their resource requirements. For example, improve the resilience of the entire datacenter to unanticipated
video streaming encoders requires substantial CPU compu- circumstances.
tational resources; while one-click online hosting services
have a huge appetite for storage space. Generally, to ensure III. T HE VM M IGRATION A LGORITHM
efficiency, the number of application instances, in virtual In this section, we propose a distributed VM migration
machines (VMs), is determined within the context of the algorithm based on Nash Bargaining Solution to alleviate re-
application. For example, the default number of replicas in source under-utilization incurred by failures. To minimize the
Google File System is 3 [7], while alternative email services transmission overhead by migrating, the algorithm responds
may require as many as 15 replicas. “lazily” and “locally.”
After the number of application instances is determined,
A. The Benefits of VM Migration
each of these instances is then deployed according to certain
load balancing considerations. The design objective of these As component failures start to occur over time, and as
strategies is the efficiency of utilizing resources, which attempt availability of resources in one dimension (e.g., bandwidth)
to find the “sweet spot” of operation, such that the performance may decrease substantially, it is often the case that such
per unit of resource consumed is maximized. reduced availability makes it harder to fully utilize resources in
However, a singular focus on efficiency may lead to the other dimensions (e.g., storage and CPU). For example, with
under-utilization of resources. Since application demands vary BCube [8], the failure of an aggregator in one container will
quickly over time, it is difficult to predict such demands cause a decrease of its upload bandwidth; then, the reduced
accurately. To guarantee service quality during peak hours, bandwidth may degrade the access to this container’s storage
container-based datacenters routinely over-provision resource and CPU computing resources.
availability. If resources provisioned in a datacenter has the Taking full advantage of the virtualization technology, we
ability to support 5 instances of 100 different applications, yet may migrate VMs to an alternative container, to achieve a
only 3 instances of these applications are deployed within, the higher level of resource utilization in the system. The follow-
strategy unnecessarily wastes resources even when they are ing example illustrates potential benefits by such migrating.
readily available. Consider a datacenter which has two containers and two
We believe that this is a classic example where the Buffet applications. Each of the applications is provided by a cor-
principle [6] should be applied. The Buffet principle argues responding VM: VM1 and VM2, respectively. The available
that resources should be utilized as long as the marginal cost resources of containers at the beginning and resources required
is lower than the marginal benefit. In the context of designing to handle one request in a VM are summarized in Table I.
a strategy to determine how many application instances should TABLE I
be placed in each container, we may simply let each container AVAILABLE R ESOURCES FOR E ACH C ONTAINER AND R EQUIRED
accommodate as many application instances as it can to R ESOURCES FOR E ACH VM
saturate nearly all of its available resources, with respect to Resources Container 1/2 VM1 VM2
either bandwidth, CPU, or storage space. The Buffet principle CPU (MIPS) 6 3 1
is a natural fit in this context for the following reasons: Storage Space (GB) 6 3 3
. Low marginal costs. Once provisioned during design, Bandwidth (Mbps) 6 1 3
resources in a container would be wasted if not utilized. This
implies that the marginal cost of using such resources is Initially VMs are placed as shown in Fig. 1 (a), according to
exceedingly low. Though performance gains beyond the sweet the application placement strategy we discussed in Sec. II. A
spot may not be substantial, the marginal benefits — such as container’s resource utilization ratio is defined as the geometric
improved resilience to failures if more replicas are maintained mean of its utilization ratios in three resource dimensions,
3

storage space, bandwidth and CPU. In this datacenter, the follows:


average resource utilization ratio is about 76%. k k
P
k∈M Ii (t)sk Di (t)
ris (t) = ≤1
Then as time goes by, Container 1 loses some computing Ci (t)
resources, which has only 3 MIPS left, and Container 2 loses P k k
k∈M Ii (t)rk Di (t)
some bandwidth, with 3 Mbps left. If no VM migration is rib (t) = ≤1
Ui (t)
involved, requests for Application 1 and 2 directed to the same P k k
container can not be satisfied at the same time, which leads k∈M Ii (t)clk Di (t)
ric (t) = ≤ 1,
to the average resource utilization ratio decreasing to around Pi (t)
44%. Nevertheless, with VM migration, we can shift VM2 in where inequalities are the resource constraints that resources
Container 1 and VM1 in Container 2, as shown in Fig. 1 (b). utilized by all application instances stored on one container can
In such scenario, the VM, which requires more resource in one not exceeds its available resources. Let σir (t) be the standard
dimension, is fit into the container that holds more available deviation of ris (t), rib (t) and ric (t). When a container i’s σir (t)
resource in that dimension. Then, requests directed to the exceeds the pre-defined threshold σthreshold , this container
same container for both Application 1 and 2 can be satisfied will “trigger” the VM migration algorithm at time t.
simultaneously, so that the average resource utilization ratio 2) The Relaxed Nash Bargaining Solution: To be practical
can be increased to 87%. and auto-managed, the VM migration algorithm is done in a
peer-to-peer fashion. We envision the existence of a bargaining
trading market. VMs are considered as “commodities” in this
VM1 VM2 VM1 VM2 VM2 VM2 VM1 VM1
market. Peers, containers who own the commodities, evaluate
the utility of each commodity in the market, then try to bargain
Container 1 Container 2 Container 1 Container 2 with each other and exchange their commodities to increase
their own utilities.
(a) Without VM migration (b) With VM migration
Our VM migration algorithm is based on the Nash Bar-
Fig. 1. The different application fit with and without VM migration. gaining Solution, which is a Pareto efficient solution to a
two-player bargaining game. In such a game, two individuals
have the opportunity to collaborate for mutual benefit in
From this example, we can see that by allowing VM more than one way. By assuming that I) two individuals are
migration across different containers, the datacenter is not only highly rational, II) each can accurately compare its desire for
able to gain higher resource utilization with limited system- various things, III) they are equal in bargaining skill, and IV)
wide resources, but also gives a more satisfactory performance each has full knowledge of the tastes and preferences of the
as it can handle more requests at the same time. other, Nash proposed a solution which should satisfy certain
axioms [9]. Let u be the utility function for Player 1, and v the
utility function for Player 2. Under these conditions, rational
B. The VM Migration Algorithm Based on Nash Bargaining agents will choose what is known as the Nash bargaining
Solution solution. Namely, they will seek to maximize |u(x) − u(d)|
and |v(y) − v(d)|, where u(d) and v(d) are the status quo
1) System Model and Algorithm Trigger: Before introduc- utilities (i.e., the utility obtained if one decides not to bargain
ing the VM migration algorithm, we first present the system with the other player).
model. Let N denote the set of containers in a datacenter. For In the datacenter trading market, there are multiple con-
every container i ∈ N , it is associated with a current available tainers, i.e., possible players. The trigger peer will choose
storage space of Ci (t), in Gigabytes; a bandwidth of Ui (t), the corresponding player according to the following Player
in Mbps; and a CPU computing capability of Pi (t), capturing Selection Principle: when a container triggers the VM mi-
the amount of processing power it has, in MIPS. Let the set gration algorithm, it first checks out the dimension in which
of application instances provided by the datacenter be denoted its resource utilization ratio is the highest; and then chooses
by M. For any k ∈ M, VMk requires a certain amount of the container with the lowest resource utilization ratio in this
storage space sk , bandwidth of rk , and computing resource of dimension to bargain with.
clk to handle one request. Iik (t) is a binary variable indicating The rationale behind is when σir (t) > σthreshold , dimension
if VMk is provided by container i or not at time t. And with the highest ri becomes the “bottleneck” of fully utilizing
Dik (t) represents the number of requests for VMk directed resources in other dimensions. Application instances require
to container i at time t. high resource usage in the bottleneck dimension should be
Instead of responding to the failures eagerly or regularly, moved out to achieve a more balanced resource utilization
our VM migration algorithm responses lazily, i.e., it is only in all dimensions. Reasonably, the ideal destination of these
operated when the imbalance of resource utilization ratios in VMs should be a container with relatively sufficient available
different dimensions alters over a certain threshold. To be pre- resources in the bottleneck dimension.
cise, at time t, the utilization ratios in storage, bandwidth, and The Nash Bargaining Solution tries to find the optimal
computing resources of each container i can be represented as ownerships of the two players’ commodities, so that both
4

players’ utilities can be maximized. Since a player’s utility Algorithm 1 The VM Migration Algorithm.
here is the sum of all self-evaluated VMs’ utilities stored in this 1: Wait until a container i’s σir (t) > σthreshold . Container i
container, getting the optimal solution may require extensive is the trigger peer.
VM transmissions, which causes heavy transmission overhead. 2: According to the Player Selection Principle, the trigger
Seeing that the objective here is to find a feasible solution, peer chooses another player j in the Bargaining game.
we relax the Pareto optimality property of Nash Bargaining 3: while σir (t) > σthreshold do
Solution, making the solution practical and cost effective in 4: Player i and j compute the utilities of VMk , ∀k ∈ M
datacenters. according to Eqn. (1), and bargain with each other.
Specifically, both players evaluate each VM according to 5: if u(i) − u(d) > 0 and v(j) − v(d) > 0 when
their own information. For player i, the utility of VMk is commodities exchange of k1 and k2 happens, then
computed as: 6: Player i and j trade with commodities k1 and k2 .
sk Dik (t) rk Dik (t) clk Dik (t) 7: end if
Vik (t) = ωis (t) + ωib (t) + ωic (t) . 8: end while
Ci (t) Ui (t) Pi (t)
(1)
where ωis (t), ωib (t) and ωic (t) are the weights given to re-
sources in different dimensions according to the player i’s . Prioritization to Traffic: To further reduce the affection of
current resource usage states, and they are constrained by migration traffic to the productive work, prioritization can be
ωis (t) + ωib (t) + ωic (t) = 1. As we discussed before, resource adopted. The VM migration traffic gets lower priority. They
usage in the bottleneck dimension should be given less value. can be deferring to other tasks, e.g., background transfer of
For simplicity, we define the weights to be inversely propor- TCP Nice or be restricted to opportunistic usage, i.e., VM
tional to the resource utilization ratio in the corresponding traffic occurs only when the resource is idle [6].
dimension, as: . Algorithm Termination: In reality, it is possible that not
1 1 1 a single win-win situation happens between two players. It
ris (t) rib (t) ric (t) is also possible that through several exchanging between two
ωis (t) = , ωib (t) = , ωic (t) = ,
sum r1 (t) sum r1 (t) sum r1 (t) players, the standard deviation of resource utilization ratios
of the trigger peer is still over the threshold. To ensure the
where sum r1 (t) = rs1(t) + rb1(t) + rc1(t) .
i i i stability, a limit on the number of bargain round can be
The bargain process is based on the players’ own evalua-
added to the algorithm. When the number of bargain round
tion of VMs. Whenever comes a “win-win” situation within
is achieved, the algorithm is forced to be terminated. Then the
resource constraints, i.e. the exchange of commodities leads
trigger peer chooses the second proper player according to the
to an increase of both players’ utilities:
X X Player Selection Principle in the next execution period.
u(i) − u(d) = Vik (t) − Vik (t) > 0 AND
IV. E XPERIMENTAL E VALUATION
k∈M0i k∈Mi
X X We dedicate this section to investigations of how the pro-
v(j) − v(d) = Vjk (t) − Vjk (t) > 0, posed VM migration algorithm performs in practical scenarios.
k∈M0j k∈Mj
The results validate that our VM migration algorithm increases
the trade is done. Mi and Mj are the owned VM sets of resource utilization successfully in container-based datacen-
player i and j before commodities exchange, and M0i and M0j ters.
are the owned VM sets of player i and j after commodities The evaluation of the proposed VM migration algorithm
exchange. Once the standard deviation σ r of the trigger peer is based on its implementation in an event-driven simulator
falls below the threshold, the market is closed, which means using C++. We simulate in a system with 20 containers and
the VM migration algorithm is terminated. The VM migration 100 VMs. Every container has the same 2000 storage, 2000
algorithm is summarized as Algorithm 1. Mbps bandwidth and 2000 MIPS CPU computing resource
3) Implementation Issues: Towards a practical implemen- capacities. For every container, resource in each dimension fail
tation, we briefly discuss the implementation concerns here. at times according to a Poisson distribution, the mean of which
. Lazy Response: Though migrating VMs have potential follows a normal distribution of N (30, 10) among containers.
benefits to improve resource utilization ratio, it does not The amount of resource failures of each container at every
come without substantial upfront costs of bandwidth. An time follows a uniform distribution of U (1, 50). Different
example orchestration of live VM and storage migration on the resources required by individual VMs are generated according
testbed through HARMONY shows the transaction throughput to a normal distribution of N (25, 10), with restriction of
drops around 11.9% during VM migration [4]. Application range between 1 and 100. We set σthreshold , the threshold
performance may be affected severely by these live migrations, of standard deviation of resource utilization ratios to trigger
which requires avoiding the migration activities as much as the VM migration algorithm, to be 0.1.
possible. As a consequence, our VM migration algorithm re- Since our objective is to increase resource utilization ratio,
sponses lazily, i.e., it only starts when triggered and terminates the main performance metric in this simulation is the standard
immediately when the utilization ratio is tolerable. deviation of resource utilization ratios, which reflects the
5

Average of Std. Dev. of Two Players


0.14 0.25 0.2
Before Before Before 2
10
After After After
0.12 0.2

Bargaining Overhead
Std. Dev. of Player 1

Std. Dev. of Player 2


0.15
1
0.1 0.15 10
0.1
0.08 0.1
0
0.05 10
0.06 0.05
Successful Bargains
Total Tried Bargains
0.04 0 0
0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100
Index Index Index Index

Fig. 2. Standard deviation of re- Fig. 3. Standard deviation of re- Fig. 4. The average of standard de- Fig. 5. The communication and
source utilization ratios of Player 1 source utilization ratios of Player 2. viation of resource utilization ratios transmission overhead of bargain.
(trigger peer). of two players.

balanced level of resource usage in different dimensions. centralized controller, we present the VM migration algorithm
Besides, we also show the bargaining overhead from the in a peer-to-peer fashion regulated by bargaining behaviors
implementation point of view. We collect 100 samples by between containers. Relying on the inherent self-organized
running the VM migration algorithm. manner of bargaining games, the proposed VM migration
algorithm is effective, with low management complexity. Re-
A. Overall Performance of the VM Migration Algorithm source utilization ratio can be increased locally by bargaining
First, we would like to show the overall performance of behaviors between two peers to increase their own utilities.
the VM migration algorithm. From Fig. 2, we can observe As shown by experiment results, the proposed VM migration
that the standard deviation of resource utilization ratios of the algorithm enjoys substantial improvement with respect to the
trigger peer is successfully decreased below the threshold after resource utilization ratio.
running the algorithm. This shows the effectiveness of the We believe that this work represents the first step towards
VM migration algorithm to lessen the pressure of resource raising resource utilization ratios in container-based datacen-
under-utilization put by imbalance usage among different ters. There are many other interesting topics worth discussing.
dimensions. For example, what is the best routing maps for VMs to “maxi-
It is critical to point out that there are some cases that the mize” resource utilization ratios; how much is the performance
standard deviation of Player 2 appears higher than without gap between our bargaining solution and the optimal one, and
running the VM migration algorithm, which is indicated in so on. For the proposed VM migration algorithm, adopting
Fig. 3. The reason is that by improving the trigger peer’s trading strategies in some multiplayer bargaining games rather
performance, sometimes it is required to sacrifice the other than the two-player bargaining game might obtain higher
container’s performance a little bit, so that the overall perfor- resource utilization. We defer these investigations to our future
mance is improved. As shown in Fig. 4, the average of the work.
standard deviation of resource utilization ratios is improved
evidently. R EFERENCES
[1] [Online]. Available: http://searchdatacenter.techtarget.com/sDefinition/0,
B. Bargaining Overhead ,sid80 gci1306761,00.html
[2] A. Greenberg, J. Hamilton, D. A. Maltz, and P. Patel, “The Cost of
To investigate the communication and transmission over- a Cloud: Research Problems in Data Center Networks,” SIGCOMM
head incurred by bargain, we show how many tried bargaining Comput. Commun. Rev., vol. 39, no. 1, pp. 68–73, 2009.
rounds and actual trades are needed to lower the resource [3] M. Korupolu, A. Singh, and B. Bamba, “Coupled Placement in Modern
Data Centers,” in Proc. IEEE International Symposium on Parallel &
utilization ratios of all the containers to a tolerable balanced Distributed Processing (IPDPS), 2009, pp. 1–12.
situation. As shown in Fig. 5, in most cases the algorithm [4] A. Singh, M. Korupolu, and D. Mohapatra, “Server-Storage Virtual-
terminates within dozens of bargain rounds, which implies ization: Integration and Load Balancing in Data Centers,” in Proc. of
ACM/IEEE Conference on Supercomputing (SC), 2008, pp. 1–12.
the communication overhead is acceptable. It also reveals that [5] A. Greenberg, J. R. Hamilton, N. Jain, S. Kandula, C. Kim, P. Lahiri,
in 80% of all the samples only 1 trade is needed. While D. A. Maltz, P. Patel, and S. Sengupta, “VL2: A Scalable and Flexible
sometimes it may require 2 − 3 successful trades between the Data Center Network,” SIGCOMM Comput. Commun. Rev., vol. 39, no. 4,
pp. 51–62, 2009.
two players, at most this number will not exceed 5, which [6] R. R. Ratul Mahajan, Jitendra Padhye and B. Zill, “Eat All You Can in
suggests that the transmission overhead is pretty satisfying. an All-You-Can-Eat Buffet: A Case for Aggressive Resource usage,” in
Proc. 7th ACM Workshop on Hot Topics in Networks (Hotnets), 2008.
V. C ONCLUDING R EMARKS AND F URTHER W ORK [7] S. Ghemawat, H. Gobioff, and S.-T. Leung, “The Google File System,”
ACM SIGOPS Operating Systems Review, vol. 37, no. 5, pp. 29–43, 2003.
Our focus in this paper is to fully utilize resources in [8] C. Guo, G. Lu, D. Li, H. Wu, X. Zhang, Y. Shi, C. Tian, Y. Zhang, and
container-based datacenters via VM migration. Before describ- S. Lu, “BCube: A High Performance, Server-centric Network Architecture
for Modular Data Centers,” in Proc. ACM SIGCOMM, 2009, pp. 63–74.
ing the VM migration algorithm, we propose a new application [9] J. Nash, “The Bargaining Problem,” Econometrica, vol. 18, no. 2, pp.
placement strategy based on Buffet principle, which advocates 155–162, 1950.
to use the resources aggressively. In contrast to having a

Das könnte Ihnen auch gefallen