25
Enhancing Fairness in P2P Cloud Federations Eduardo de Lucena Falc˜ao, Francisco Brasileiro, Andrey Brito, Jos´ e Luis Vivas Federal University of Campina Grande, Department of Computing and Systems, Campina Grande, Brazil Abstract Small and medium size private cloud providers with peaky demand pat- terns may greatly benefit from federating their resources, thereby reducing costs without impairing their capability to meet client demands. In this work, we present a non-monetary market system mechanism for resource sharing within a decentralized lightweight P2P federation of private cloud providers. The mechanism is intended to enable collaborative peers to take appropriate decisions guaranteeing suitable levels of satisfaction and fairness as well as isolation of non-collaborative peers. The proposed scheme leverages the no- tion of the Network of Favors, formerly advanced as an incentive mechanism for P2P opportunistic desktop grids in which peers are concerned primarily with satisfaction, not fairness. An enhancement of the Network of Favors is presented that consists in the introduction of a feedback control loop mech- anism limiting the amount of resources that a private cloud is willing to provide to other members of federation, thereby indirectly keeping resource contention at a level that is adequate for discouraging free riding and guar- anteeing an appropriate degree of fairness, with only minor impact on the satisfaction levels of collaborative peers. Keywords: fairness and satisfaction, cloud federation, resource sharing Email address: [email protected], {fubica,andrey}@computacao.ufcg.edu.br, [email protected] (Eduardo de Lucena Falc˜ ao, Francisco Brasileiro, Andrey Brito, Jos´ e Luis Vivas) Preprint submitted to Cloud computing: current advances and new research trendsSeptember 13, 2015

Enhancing Fairness in P2P Cloud Federations · {fubica,andrey}@computacao.ufcg.edu.br, [email protected] (Eduardo de Lucena Falc~ao, Francisco Brasileiro, Andrey Brito, Jos

  • Upload
    vokhue

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Enhancing Fairness in P2P Cloud Federations

Eduardo de Lucena Falcao, Francisco Brasileiro,Andrey Brito, Jose Luis Vivas

Federal University of Campina Grande, Department of Computing and Systems,Campina Grande, Brazil

Abstract

Small and medium size private cloud providers with peaky demand pat-terns may greatly benefit from federating their resources, thereby reducingcosts without impairing their capability to meet client demands. In this work,we present a non-monetary market system mechanism for resource sharingwithin a decentralized lightweight P2P federation of private cloud providers.The mechanism is intended to enable collaborative peers to take appropriatedecisions guaranteeing suitable levels of satisfaction and fairness as well asisolation of non-collaborative peers. The proposed scheme leverages the no-tion of the Network of Favors, formerly advanced as an incentive mechanismfor P2P opportunistic desktop grids in which peers are concerned primarilywith satisfaction, not fairness. An enhancement of the Network of Favors ispresented that consists in the introduction of a feedback control loop mech-anism limiting the amount of resources that a private cloud is willing toprovide to other members of federation, thereby indirectly keeping resourcecontention at a level that is adequate for discouraging free riding and guar-anteeing an appropriate degree of fairness, with only minor impact on thesatisfaction levels of collaborative peers.

Keywords: fairness and satisfaction, cloud federation, resource sharing

Email address: [email protected],

{fubica,andrey}@computacao.ufcg.edu.br, [email protected] (Eduardo deLucena Falcao, Francisco Brasileiro,Andrey Brito, Jose Luis Vivas)

Preprint submitted to Cloud computing: current advances and new research trendsSeptember 13, 2015

1. Introduction

Organizations with variable and peaky demand patterns often turn topublic clouds (cf. “cloud bursting” [1]) in order to meet unexpected orshort-term needs and avoid failures in meeting business demands and qualityof service targets. However, during off-peak times the resources belonging tothese organizations might become idle, which constitutes an efficiency loss.Under those circumstances cloud bursting alone is not enough for achievingmaximal cost efficiency. Selling these surplus resources might be an inter-esting option here for large private cloud providers, but not for smaller pri-vate cloud providers. An alternative that small and mid-sized private cloudproviders may find advantageous is to collaboratively exchange idle capacityon a Peer-to-Peer (P2P) basis within a federation. In this case, each providerin the federation acts both as a resource provider (during off-peak times) andresource consumer (during peak times).

From the architectural perspective, cloud federations can be either cen-tralized or P2P [2]. In centralized architectures, resource allocation is typi-cally performed by a trusted central entity capable of preventing free ridingand performing the best matching of consumers and providers. In P2P fed-erations, on the other hand, participants must communicate and negotiatedirectly with each other. The advantages of decentralized topologies includeextensibility, scalability, and easier deployment and management. The draw-backs, on the other hand, include difficulties in discovery, routing, security,and trustworthiness, since participants are mostly unknown to each otherand cannot be assumed to be trustworthy or collaborative. Moreover, peersare assumed to be selfish and have an economic incentive to become freeriders, i.e. pure resource consumers.

Similarly, from a market perspective cloud federations can be also classi-fied as centralized or decentralized. In a centralized market system, bids andrequests are typically collected by a central entity or market auctioneer thatdecides the best matching of buyers and sellers. In decentralized markets,on the other hand, buyers and sellers must explore the market by themselvesand bargain directly with each other. An important question here is how effi-cient resource allocation can be guaranteed so that the goals of collaborativecloud members are met.

In a cloud federation, participants may provide resources in exchangefor money or by delayed exchange, i.e. a favor provided by one part inwhich a return from the other part is expected at a later time. Money

2

payment schemes would require the introduction of complex managementmechanisms and procedures, whereas exchange schemes can be more easilyimplemented, e.g. by the use of local credit and debit annotations. Thisscheme is adequate for decentralized architectures since it is wholly non-monetary and distributed, not requiring the presence of trusted centralizedentities. Obviously, there is a close relation between the architecture and themarket structures of private cloud federations.

In this work, we propose a mechanism for building a lightweight P2Pcloud federation infrastructure implementing a decentralized market system.The approach is suitable for very large federations, in which the odds arehigh that resource shortages and surpluses occur simultaneously, and thusmatch each other.

The main challenge here concerns the promotion of cooperation amongrational selfish individuals in a decentralized context with no central andtrusted enforcing authorities. In this type of system, participants are usuallyleft to themselves with only limited information on the trustworthiness ofthe other actors, and must thus rely solely on their own experience, acquiredthrough previous interactions, in order to decide the extent to which theyshould trust other partners. It is thus natural to expect that at first handparticipants will prefer to act as free riders, since this is the behavior thata priori would be easier and most advantageous to them. In addition, col-laborative partners may defect from the federation if not satisfied with theresults of participation.

For the reasons explained above, incentive and/or discouragement mech-anisms must be provided in order to promote cooperation and make thefederation viable. We now introduce two metrics to gauge the efficiency ofsuch mechanisms, namely satisfaction and fairness.

At any given time, a peer’s satisfaction is defined as the ratio betweenthe total amount of resources received so far by the peer from other membersof the federation, and the total amount of resources requested so far by thepeer to the other members of the federation.

A peer’s fairness, on the other hand, is defined as the ratio, at any giventime, between the total amount of resources received so far by the peerfrom the other members of the federation, and the total amount of resourcesprovided so far by the peer to the other members of the federation. In thesame way, we may define the fairness of a given peer with regard to anothersingle peer in the federation, instead of the federation as a whole, taking thusinto consideration only the resources provided to and received from the other

3

single peer.We will present in this study a scheme that guarantees that the levels of

both satisfaction and fairness are good enough in order to ensure that mostparticipants will not defect from the federation and that free riders will beisolated and kept with a very low degree of satisfaction.

The scheme we propose in this paper leverages the notion of the Networkof Favors (NoF) [3], an incentive mechanism for resource sharing in P2P op-portunistic desktop grids. In the NoF a collaborative peer always providesall of its idle resources to the federation, without regard to its level of fair-ness, in order to obtain more credits among federated peers and thus increasethe odds of being reciprocated in the future when resources are needed in-stead. We call this original scheme of the NoF the Satisfaction-Driven NoF(SD-NoF). It is suitable for opportunistic desktop grids, since the costs ofproviding idle cycles from the desktops, which are intended primarily for in-house consumption, are assumed to be so low that collaborative peers maydisregard fairness and focus only on maximizing satisfaction.

By contrast, in the case of private and P2P federated clouds, resources arededicated to the cloud, and the associated direct costs may not be negligible.Fairness may in this case become an important issue, and can be enhanced bylimiting to a certain extent the amount of supplied resources, and hence theinvolved costs, specially in scenarios with initially low resource contention,thereby isolating free riders more efficiently. To this end, we propose anenhancement of the SD-NoF scheme that consists in the introduction of afeedback control loop mechanism limiting, when required, the amount ofsupplied resources. Briefly, in order to reward cooperative actors and isolatefree riders, a peer in the federation will draw upon its current assessment offairness in order to define the maximum amount of resources it will provideat each round, even if at the occasion it would have more idle resources thanthose actually offered. In contrast to the SD-NoF, we call this new schemethe Fairness-Driven NoF (FD-NoF).

The rest of this paper is organized as follows. In Section 2 we introducethe notion of the Network of Favors. Section 3 provides a detailed account ofthe basic questions we are dealing with in this work. Section 4 is dedicatedto a presentation of the Fairness-Driven Network of Favors and the feedbackcontrol loop mechanism proposed to enhance the level of fairness. Section 5presents the main results obtained. In Section 6 we show the most relevantrelated work, and finally in Section 7 we put forward the main conclusions.

4

2. The Network of Favors

In the NoF, a favor consists in the allocation of a resource to a requestingpeer. The model is based on the expectation that participants will eventuallyreciprocate the favors received.

The value of a favor can be calculated as a function of the computationtime and the processing power provided. Let F be the set of peers in thefederation. Each collaborative peer A ∈ F is assumed to keep a local balanceaccount of the total value of all favors provided to and received from eachof the other peers B ∈ F with which it has interacted in the past. Thisinformation is typically updated from time to time. We assume that timeis discrete and use step functions to formalize this balance as a functionγ : F × F × N → R. The function γ(A,B, t) denotes the balance of theinteractions with peer B as perceived by peer A at the beginning of timestep t.

The NoF mechanism is based solely on local annotations of the favorsinterchanged by the peers. Let υ : F× F×N→ R≥0 be a step function thatmodels these annotations. Then, υ(A,B, t) denotes the value of the totalamount of favors that A has donated to B during time step t. Thus,

γ(A,B, t) =t−1∑i=0

υ(B,A, i)− υ(A,B, i). (1)

Peers in the NoF are protected against peer collusion since they do notuse information from third parties, as is the case in some existing reputationschemes [4] [5]. Nevertheless, a peer B with a negative balance towards peerA might be able to deceive A by changing its identity and thereby appearingto A as a newcomer with no previous interaction with it. In P2P networks,it is usually easy in general for a peer to change its identity. To address thisissue, Andrade et al. [6] proposed that the balance function, now formalizedas γ : F× F× N→ R≥0, be always non-negative:

γ(A,B, t) = max

{0,

t−1∑i=0

υ(B,A, i)− υ(A,B, i)

}. (2)

This definition prevents prioritizing malicious ID-changing peers over col-laborative ones who would happen to have consumed more resources from itthan contributed to in the past. However, a peer A would nevertheless not beable to distinguish a free rider peer B who has never provided any resources

5

from a collaborative peer C that would have provided to A in the past butconsumed from A at least as many resources as it has provided, i.e. peerswith a non-positive balance towards A but with a positive υ(B,A, i). Todistinguish between those two kinds of peers, Andrade et al. [6] introducedin the definition of the balance function γ(A,B, t) a history term related tothe amount of previous donations received by A from B. To avoid getting agap between the credits of longtime peers and newcomers that would be towide to bridge for a newcomer, the NoF adds only a sub-linear function ofυ(B,A, t) as the history term in the definition of γ(A,B, t), which might forinstance be

γ(A,B, t) = max

{0,

t−1∑i=0

υ(B,A, i)− υ(A,B, i) +√υ(B,A, i)

}(3)

or

γ(A,B, t) = max

{0,

t−1∑i=0

υ(B,A, i)− υ(A,B, i) + log υ(B,A, i)

}. (4)

In the NoF, a peer with idle resources at any given time will try toallocate all of them to requesting peers. The NoF prioritization mechanismestablishes that in the case of contention for A’s resources, i.e. when twoor more peers are willing to obtain resources from a peer A, A will list therequesting peers in decreasing order according to their respective balances,and will start by trying to provide all the resources requested by the first peerin the list, which is the peer with the highest balance value towards A in thelist. Peers are served one by one according to their placement in the listuntil all available resources have been allocated, or else until all requestingpeers have been served. If two or more peers would have the same balance,A will share equally the available resources between them until the resourceshave been exhausted or both peers have obtained the requested amount ofresources.

By way of illustration, let us consider a federation with only six peers:A, B, C, D, E and F , where peers B, C, D, E and F are ordered by Aaccording to their balance towards A at time step t, as shown in Table 1.

Now suppose that at time step t peer A has an excess capacity of 20 unitsof resources that it is willing to provide to other peers. If at this time step allother peers are requesting resources, with peers C, D and E each requesting5 units of resources and peers B and F 4 units each, then A would allocate 5

6

Peer P∑t−1

i=0 υ(P,A, i)∑t−1

i=0 υ(A,P, i) γ(A,P, t) per Equation 4D 100 80 22E 100 80 22B 1000 990 13C 0 300 0F 100 102 0

Table 1: Example of NoF table kept by peer A at time step t.

units to D and 5 units to E, thereafter 4 units to peer B, and finally 3 unitsto C and 3 units to F .

3. Problem statement

Contention is a metric that characterizes the degree of competition forresources at any given time, and is defined as the ratio between the totalamount of resources that the collaborative peers request from the federationand the total amount of resources that the collaborative peers supply at anygiven point in time. We define contention by a step function κ : N→ R≥0 asfollows.

Let F be the set of peers in the federation, as before. Let Fc ∈ F denotethe set of collaborative peers in the federation, ρ : Fc × N → R≥0 be a stepfunction denoting the amount of resources requested by a peer A ∈ Fc attime step t, and σ : Fc × N → R≥0 a step function denoting the amountof resources that a peer A ∈ Fc offers at time step t. We define resourcecontention at time step t as:

κ(t) =

∑P∈Fc

ρ(P, t)∑P∈Fc

σ(P, t). (5)

Andrade et al. [3] showed that whenever there is contention on resources,i.e. when κ(t) > 1, during a sufficiently large number of subsequent timesteps, the NoF will prioritize collaborative peers against free riders. However,in scenarios of persistent low resource contention, prioritizing collaborativepeers will by itself not be enough for efficiently isolating free riders, and as aresult the system will be more vulnerable to them.

Let us consider an example based on Table 1 presented in Section 2. Weassume that all peers, except C, are collaborative, C being the only free rider.

7

Since in P2P systems the participants do not trust each other, we assumethat none of the collaborative peers knows with certainty which other peersare collaborative or free riders. We consider a scenario in which at time stept peer A is willing to provide 20 units of resources to requesting peers. Thus,if at the same time step peers B, C and D are requesting 15 units each, thefederation would be under high resource contention (κ(t) = 1.5), since thedemand from collaborative peers would be 1.5 times higher than the supply,recalling that the definition of contention only takes into consideration theresources supplied and requested by collaborative peers. With the aid of itsNoF table, A will select peers D and B, in this order, to provide all its 20units (15 to D and 5 to B). Peer C will not be granted resources from Aat time step t because there would be no resources left for it. On the otherhand, if at this time step only peer C requests resources, A will grant C asmany resources as C is requesting and A is able to provide, since in this casethe federation would have no contention on resources, i.e. κ(t) = 0. Thus,in scenarios of low resource contention, i.e. when κ(t) < 1, a collaborativepeer will make unfavorable decisions, granting resources to peers that willnot reciprocate in the future.

In order to assess the performance of the peers in different scenarios ofresource contention, we have defined two metrics, fairness and satisfaction,which were briefly described in the Introduction. Fairness is a measure ofthe level of reciprocity to the favors a peer provides, either to another peeror to the federation as a whole, while satisfaction denotes the probability forsome peer of having its requests fulfilled.

As explained in the Introduction, fairness may be defined with regard toa specific peer or with regard to the whole federation. Fairness at time step ttowards a specific peer may be defined by a step function φ : Fc×F×N→ R≥0denoting the ratio for a given collaborative peer A ∈ Fc towards a peer B ∈ Fbetween the total amount of resources that A has consumed from B and thetotal amount of resources that A has provided to B up to time step t. In thecase that A has performed at least one donation to B by time step t, thisfunction may be defined thus:

φ(A,B, t) =

∑t−1i=0 υ(B,A, i)∑t−1i=0 υ(A,B, i)

. (6)

For convenience, we assume that υ(A,A, i) = 0,∀A ∈ F ∧ ∀t ∈ N. If∑t−1i=0 υ(A,B, i) = 0, then the value of φ(A,B, t) is undefined.

8

In addition, the fairness metric can also be computed in relation to thefederation as a whole by a step function φ : Fc × N→ R≥0 which, whenevera peer A ∈ Fc has provided any resource to another peer, can be defined as:

φ(A, t) =

∑P∈F

∑t−1i=0 υ(P,A, i)∑

P∈F∑t−1

i=0 υ(A,P, i). (7)

Satisfaction, on its turn, is defined by a step function ψ : F× N→ R[0..1]

as the ratio, for any peer A, between the total amount of consumed resourcesand the total amount of requested resources, before time step t:

ψ(A, t) =

∑P∈F

∑t−1i=0 υ(P,A, i)∑t−1

i=0 ρ(A, i). (8)

Note that satisfaction is inversely related to contention, being an indirectfunction of it. Obviously, the higher the contention level, the lower is theprobability that a certain peer will receive what it asks for at any given pointin time, a consequence of the fact that a favor received by a certain peer isa favor granted by another peer. Hence, it is in the common interest of thecollaborative peers to provide as much resources as possible.

Since in the SD-NoF all idle resources are always made available to thefederation, satisfaction in general will be at the highest possible level. Thisis acceptable as long as the cost of resource provision is negligible. However,if this is not the case, satisfaction may come at a price. If the marginalutility value obtained from a received resource is less than the marginal costof the resources provided in order to receive it, a peer might be makinga bad affair by providing all of its available resources. Hence, we may befacing a situation in which the maximization of the level of satisfaction isconstrained by the cost of provision for a peer A, or in other words, by thetotal amount of resources provided at time t, i.e.

∑P∈F υ(A,P, t). Since the

latter is constrained by the amount of resources that peer A makes availableto the federation at time step t, i.e. σ(A, t) ≥

∑P∈F υ(A,P, t), reducing the

amount of offered resources might therefore lead to an increased fairness ifthe amount of received resources is not reduced at the same rate.

In this work, we propose that collaborative peers be equipped with afeedback control loop mechanism that enables them to regulate the amountof resources made available, thereby indirectly impacting the level of resourcecontention in the system. This should be done in such a way that a peer be

9

able to obtain the highest level of fairness that does not significantly impairits level of satisfaction. Such a mechanism is presented in the next section.

4. The Fairness-Driven NoF

Collaborative peers cannot control directly the level of resource con-tention, since the NoF is designed for decentralized P2P systems. However,contention may be indirectly increased when the collaborative peers try toimprove their levels of fairness. The easiest way to increase fairness, undermost circumstances, is by decreasing the amount of provided resources. How-ever, although fairness is important, we must also take into account the levelof satisfaction, because the less the amount of resources provided, the lesswill also be the level of satisfaction in general, including that of collaborativepeers.

The FD-NoF is basically the NoF mechanism running concurrently witha feedback control loop mechanism that allows peers to adjust at any stagethe amount of resources they are willing to supply. Hereafter we will referto this mechanism as the peer’s capacity controller. An implementation forthis capacity controller is described in the next subsection.

4.1. The capacity controller

The idea behind any feedback control loop mechanism is to use outputmeasurements of a system for regulating some input controls in order toachieve externally specified goals [7].

Assume that each collaborative peer has a total resource capacity C ∈R≥0. Let the amount of resources that a peer A ∈ Fc makes available toany other peer B ∈ F at a given time step t be expressed by a step functionα : Fc × F× N→ R[0,C]. The mechanism allows A to determine the value ofα(A,P, t),∀P ∈ F ∧ ∀t ∈ N, with the aim of achieving the desired levels offairness.

The proposed capacity controller requires each collaborative peer A todefine two threshold values, a lower bound value Tmin ∈ R≥0 and higherbound value Tmax ∈ R≥0, establishing thereby an interval [Tmin, Tmax] denot-ing the range of the desired level of fairness. It works as follows. Initially,α(A,P, 0) = C,∀P ∈ F. If at a given time step t, t > 0, the measured fairnessof A in relation to a peer B is such that φ(A,B, t) < Tmin, the capacitycontroller will continuously reduce the value of α(A,B, t) (if α(A,B, t) > 0)at the subsequent time steps until φ(A,B, t) creeps above Tmin. On the other

10

hand, if φ(A,B, t) > Tmax, the capacity controller will instead increase thevalue of α(A,B, t) (if α(A,B, t) < C) at the subsequent time steps untilφ(A,B, t) creeps below Tmax. Finally, whenever Tmin ≤ φ(A,B, t) ≤ Tmax,the capacity controller will run a hill climbing algorithm [8] that consistsin using the most recent recorded values of fairness to decide whether thecapacity supplied should be increased or decreased in order to maximize thefairness of A in relation to B within the interval [Tmin, Tmax].

The approach just described does not apply to a peer B to whom A hasnever donated resources, since in this case φ(A,B, t) is undefined. A simpleapproach that A could follow in this case would be to always offer its fullcapacity (C). However, a free rider could cheat the system by changing itsidentity after each interaction with A. To tackle this issue, A determinesthe maximum amount of resources that are offered to peers with which ithas not interacted earlier, by running the capacity controller algorithm usinginstead its current fairness value in relation to the whole federation. Notethat this can only be performed after A has made its first donation to somepeer. Thus, the capacity controller is only executed in the beginning of astep t if

∑P∈F

∑t−1i=0 υ(A,P, i) > 0, otherwise α(A,P, t) = C,∀P ∈ F.

The pseudo-code presented in Algorithm 1, intended to be executed bya collaborative peer A at the beginning of any time step t, t > 0, occurringafter A has made its first donation to the federation, describes the capacitycontroller run by A; E is a parameter that defines how much the amount ofmaximum resources made available by A will be increased or decreased ateach time step.

Note that by this mechanism a collaborative peer could momentarilyrefuse to provide any resources at all until it receives some from other peers.In an extreme case, when the number of free riders is too high, the use of thealgorithm by all collaborative peers could lead to a definitive defection of allof them from the federation, which would collapse as a result.

5. Evaluating the Fairness-Driven NoF

To assess the behavior of participants in the Fairness-Driven NoF, we havebuilt a simulator for a simplified model of a resource sharing P2P federationof private cloud providers. This simulator can also be used to analyze theparticipants in a Satisfaction-Driven NoF. In this way, we can come to abetter understanding of the advantages and disadvantages of each approachfor the collaborative peers.

11

Algorithm 1 Capacity controller algorithm for peer A at the beginning oftime step t, t > 0 ∧

∑P∈F

∑t−1i=0 υ(A,P, i) > 0.

1: increase← false2: for each P ∈ F do3: if

∑t−1i=0 υ(A,P, i) > 0 then

4: if φ(A,P, t) < Tmin then5: increase← false6: else if φ(A,P, t) > Tmax then7: increase← true8: else if φ(A,P, t) ≤ φ(A,P, t− 1) then9: increase←!increase

10: else11: if φ(A, t) < Tmin then12: increase← false13: else if φ(A, t) > Tmax then14: increase← true15: else if φ(A, t) ≤ φ(A, t− 1) then16: increase←!increase17: if increase then18: α(A,P, t+ 1)← min(C, α(A,P, t) + E)19: else20: α(A,P, t+ 1)← max(0, α(A,P, t)− E)

5.1. Simulation model

The federation F consists of a community of N peers, with (1 − F) · Ncollaborative peers and F·N free riders, 0 ≤ F < 1. The simulation proceedsin discrete steps, which correspond to the time steps in the step functionsdefined in Section 2 and Section 3. At each step each participant can be eitherin consumer state with probability P , or in provider state with probability1− P .

Each peer is assumed to have a total resource capacity of C. When ina provider state at step t, a peer A will provide up to α(A,B, t) units ofresources to any peer B that is in consumer state at step t. When simulatingthe SD-NoF, α(A,P, t) = C, ∀P ∈ F∧∀t ∈ N, while when simulating the FD-NoF, α(A,P, t) can vary from 0 to C, according to the results of the capacitycontroller algorithm (Algorithm 1). A peer in consumer state at any stept will require D + C resource units to fulfill its local demand, of which C

12

units are provided by the local resources and D units are requested to thefederation. At each step, the collaborative peers prioritize the requestingpeers that have the largest positive balance according to the NoF approach,as explained in Section 2.

In the simulations, we want to evaluate the scenarios that are most fa-vorable to free riders. Thus, to make it more difficult to discriminate freeriders from collaborative peers that have momentarily consumed more thanwhat they have provided, we do not consider the history term in the balancecomputation. Instead, we use Equation 2 for calculating γ(A,B, t). By doingso, a collaborative peer A cannot distinguish a free rider from another col-laborative peer B that at step t would have a non-positive balance towardsA. This obviates the need to investigate scenarios in which free riders wouldinitially provide a few resources before becoming free riders, or in some otherway would shift back and forth between being a free rider and being collabo-rative. Nevertheless, in our analysis we consider scenarios in which the ratiobetween demand and provision among collaborative peers can vary widely.

5.2. Scenarios

We want to investigate the performance of the peers in scenarios withdifferent levels of resource contention. Recalling that resource contention isgiven by the ratio of requested resources by offered resources, consideringonly collaborative peers, when simulating the SD-NoF, the expected value ofthe contention level per time step is given by:

E[κ] =P · (1−F) · N · D

(1− P) · (1−F) · N · C=

P · D(1− P) · C

. (9)

Without loss of generality, we let C = 1, and vary P and D in order tocompare cases with low, moderate, high and very high levels of contention.To this end, in our experiment design we select E[κ] from the set {0.5, 1, 2, 4}.

We simulate the same scenarios for SD-NoF and FD-NoF in order to beable to compare them. Note, however, that under the FD-NoF, collaborativepeers may reduce the amount of resources offered to other peers to valuesless than C. Therefore, in the FD-NoF simulations, the value of E[κ] simplydefines a lower bound for the expected value of the contention that willactually be experienced by the system during the simulation. Nevertheless,we keep referring to E[κ] in the FD-NoF simulations, simply to identify thedifferent contention scenarios analyzed.

13

We must also take into account the fact that, given a value for F , thelarger the number of participants in the federation, the less beneficial willthe situation be for free riders. This is because the larger the total amountof collaborative peers, the less will the deviation be from the expected valueof the total amount of providers at each step, i.e. N · (1−F) · (1−P), andhence the probability that a significant amount of resources will be availableto free riders at each step. Therefore, we set N = 200 in all scenarios.

In the simulations we are interested in assessing scenarios in which theimpact of free riders on the system would be highest. Thus, for free riders weset P = 1 and D =∞, i.e. they are always trying to consume the maximumamount of resources. We considered two main levels of free riding: F = 0.25(moderate) and F = 0.75 (very high). Furthermore, we also simulate somescenarios with F = 0 in order to compare them with scenarios in whichF > 0. In this manner we pave the way for a better comprehension of theexact impact of free riders on the federation.

In relation to the configuration of the capacity controller, we set Tmin =0.75, Tmax = 0.95 and E = 0.05 for all collaborative peers. Finally, a total of5000 steps have been performed for each simulation, which has been shownto be sufficient to lead the system to a steady state.

Summarizing, the simulation design includes the following constant pa-rameters: the total number of peers (N = 200), the maximum resourcecapacity of collaborative peers (C = 1), the lower and upper bounds and vari-ation constant for the FD-NoF capacity controller algorithm (Tmin = 0.75,Tmax = 0.95 and E = 0.05), and the number of steps for the simulation (5000steps). Moreover, there are three variables: The amount of requested units(D), the probability for being in a consumer state (P), and the proportion offree riders (F). To facilitate the analysis of the performance of collaborativepeers and free riders with regard to these independent variables, we brokeour experiments into two different design groups, one involving homogeneouspeers, and another involving heterogeneous peers. Those are described next.

5.2.1. Homogeneous peers

At first, we were interested in understanding how the collaborative peersperform in relation to free riders. Thus, to eliminate the impact that differenttypes of collaborative peers would have on the results, we assumed that theyall have the same probability of being in a consumer state (P) and the sameexcess demand needs (D). All free riders are also identical, with D =∞ andP = 1. This scenario of homogeneous peers was simulated with F = 0.25

14

and F = 0.75.For each value of E[κ] in the set {0.5, 1, 2, 4} we simulated 30 different

scenarios. The first 15 scenarios were generated by choosing 15 values forD evenly distributed in the interval [1..3]; for each value of D we calculatedthe values of P corresponding to the four values of E[κ] in {0.5, 1, 2, 4} usingEquation 9, i.e. P = E[κ]/(E[κ]+D). The other 15 scenarios were generatedin a similar way, but now starting instead with 15 values for P evenly dis-tributed in the interval [0.2..0.8], and afterwards setting D to E[κ]·(1−P)/P ,according to Equation 9, for each value of E[κ] in {0.5, 1, 2, 4}.

5.2.2. Heterogeneous peers

It is natural to expect that the participants in a federation will have dif-ferent behaviors regarding the relation between the amount of resources thatthey demand from and offer to the federation. We simulated this scenarioby fixing D, the excess demand of the collaborative peers, and letting P , theprobability of being in a consumer state, vary over a set of values. To thisend, we took hold of a truncated normal distribution function with meanvalue 0.5, standard deviation 0.1, lower bound 0 and upper bound 1, anddrew from this distribution the values of P for each collaborative peer.

Here we also analyzed systems with different levels of contention. Thus,in each case a different value of D was selected for all collaborative peers insuch a way as to obtain the desired expected values of the contention levelE[κ] , i.e. 0.5, 1, 2 and 4. Since the mean of the distribution from which thevalues of P were drawn is 0.5, from Equation 9 we have D = E[κ]. Hencewe chose exactly those values for D, i.e. 0.5, 1, 2 and 4. Similarly to thecase with homogeneous peers, the simulation for each contention level wasreplicated 30 times, each with a different assignment of the values of P forthe collaborative peers.

In order to better understand the real impact of free riders in the perfor-mance of collaborative peers in both SD-NoF and FD-NoF, we simulated twolevels of free riding: F = 0 and F = 0.25. For F = 0, instead of N = 200 weset N = 150 in order to keep the same number of peers with the same be-havior in both cases. In addition, we may interpret differently the scenariosin which F = 0. Instead of having sheer free riders that never donate, a realP2P system is more likely to have peers that are only partially free riders inthe sense that they will demand much more resources than they are willingto supply. Hence, the simulations can be analyzed by regarding peers withhigh P as being free riders on a higher degree than peers with low P .

15

5.3. Results and analysis

5.3.1. Homogeneous peers

For scenarios in which peers are homogeneous, when the expected valueof resource contention is low, i.e. E[κ] = 0.5, a high proportion of free riderswould make the federation unfit for collaborative peers with low levels of Por D. The only way for such a peer to achieve an adequate level of fairnessis to limit the amount of resources offered to other peers, which on the otherhand may lead to a massive defection from the federation. In our simulations,this occurred in one third of scenarios with F = 0.75, specifically with valuesP ≤ 0.14 or D ≤ 0.59. Since in the scenarios presented here all peers arehomogeneous, all of them would reduce within a few time steps the amount ofresources supplied to the federation up to α(A,P, t) = 0, leading to massivedefection.

In Figure 1 one can observe the levels of fairness and satisfaction of collab-orative peers by looking at their corresponding mean and confidence intervalsin the last step of the simulations with E[κ] varying over the set {0.5, 1, 2, 4}.Moreover, we can also compare their performance in SD-NoF and FD-NoFscenarios with F = 0.25 and F = 0.75. The scenarios with F = 0.75,in which the federation collapses, were not included in the diagram plot ofFigure 1b for the sake of comparing plots 1a and 1b.

(a) F = 0.25 (b) F = 0.75

Figure 1: Average and confidence interval for fairness and satisfaction in step 5000. Allcollaborative peers are set with homogeneous characteristics and simulations were ranunder SD-NoF and FD-NoF

Regarding F , the main conclusion we can draw from Figure 1 is that

16

apart from the fact that the federation is more likely to collapse when F ishigh, there is no great difference between the various alternatives concern-ing the impact they may cause to the fairness and satisfaction levels of thecollaborative peers. So, since we think F = 0.75 is not a realistic value fora P2P system, we decided to use F = 0.25 in the rest of the simulationspresented.

Figure 1 also shows the SD-NoF effectiveness in providing high levels offairness for collaborative peers in scenarios of high resource contention suchas E[κ] = 2 or E[κ] = 4. However, we also observe that the SD-NoF is notenough for ensuring fairness in low resource contention scenarios despite highlevels of satisfaction. This is where the capacity controller comes into play.It increases the fairness of collaborative peers in low and moderate resourcecontention scenarios whereas the level of satisfaction is only slightly reduced.Table 2 shows the absolute values of this improvement.

E[κ] fairness satisfactionSD-NoF FD-NoF improvement SD-NoF FD-NoF reduction

0.5 0.49 0.79 61.2% ≈ 1 0.98 2%

1 0.91 0.95 4.4% 0.93 0.91 2.2%

2 ≈ 1 ≈ 1 – ≈ 0.51 ≈ 0.51 –

4 ≈ 1 ≈ 1 – ≈ 0.25 ≈ 0.25 –

Table 2: Mean values of fairness and satisfaction of collaborative peers at the last step ofthe simulations which were ran both in SD-NoF and FD-NoF for F = 0.25

These improvements basically arise from the regulation of the resourcecontention made possible by the capacity controller. This fact can be seen inFigure 2, which shows the evolution of resource contention κ(t) in scenarioswith F = 0.25, for 0 ≤ t ≤ 5000. Since in our model the free riders consumeall surplus resources of the federation, the amount of provided resources isalways equal to the amount of offered resources. Hence, here we calculateresource contention at each time step t as the ratio between the total amountof resources requested by all collaborative peers and the total amount ofoffered resources, both during time step t. We need to calculate this at eachstep because since each collaborative peer offers different amount of resourcesto different peers, it would not be possible to tell in advance the total amountof resources offered by a collaborative peer at some particular step. Also, as

17

there is a wide variation in the measured values at each step, we plot therunning average value over the last 500 steps. Each of the simulated scenariosis represented by a curve in the graph.

Figure 2: Running average of κ(t) over the last 500 steps for each simulation

Due to our simplified simulation model, when E[κ] is set to 2 or to 4 thecollaborative peers cannot reduce the resource contention to a value closeto or slightly higher than 1 — the scenario in which there will be enoughresources for all collaborative peers. This occurs because the expected levelsof resource contention for each scenario depend on the values of P and D,which do not change along the simulation, and also on the value of C, whichis upper bounded by the initial value C = 1. Therefore, we conclude thatthe capacity controller performs well since on the long run it stabilizes theaverage resource contention on values of 1.03, 1.96 and ,3.93 for scenarioswith E[κ] equal to 1, 2 and 4, resp. When the expected resource contentionis 0.5 the capacity controller increases it to 0.78, which is not the best resultsince there will still be free resources available in the federation. However,E[κ] = 0.78 is enough for giving 98.75% of collaborative peers at least 75%fairness, as required when Tmin is set to 0.75. Moreover, the remaining 1.25%

18

collaborative peers achieved a fairness value of ≈ 74%, and we believe thatthe the use of the capacity controller would allow them to increase fairnessafter a few more steps up to a level greater than τmin — maybe a safetymargin of 0.02 or 0.05 above Tmin would be enough for always ensuring alevel of fairness above this threshold.

5.3.2. Heterogeneous peers

Figures 3 and 4 show the fairness and satisfaction levels of collaborativepeers at the last step of the simulation for F = 0 and F = 0.25. Theresults are shown in different scenarios of expected resource contention inwhich each peer is represented by a geometry. Peers are arranged in groupsaccording to their probability of consumption, and each group is plotted witha different color. We ran simulations for SD-NoF and FD-NoF, the latterwith Tmin = 0.75, Tmax = 0.95 and E = 0.05. Recall that in these simulationsthe peers are different, each one having a different probability of being in aconsumer state (P), with values coming from a Normal distribution withmean 0.5 and standard deviation 0.1.

The simplest way to analyze Figure 3 is assessing the performance of eachpeer considering its consumption rate, defined as P · D, which depends onlyon the value of P , since D is a constant according to the level of E[κ] of eachspecific scenario. Regarding SD-NoF, we can see that peers obtain higherlevels of fairness according to their consumption rate P in scenarios of lowand moderate resource contention. However, in scenarios of high and veryhigh resource contention (E[κ] ≥ 2), the value of P alone is not enough toguarantee levels of fairness greater than average. Still in scenarios whereE[κ] ≥ 2, we can also note that high contention in itself is not enough toprovide good levels of fairness at least for a few peers with a very low P .Finally, the graphs also confirm that satisfaction is inversely proportional toP and κ, which gives peers with high P lower levels of satisfaction, speciallywhen E[κ] ≥ 1.

With regard to the FD-NoF, the same peers achieve their primary goal ofhaving levels of fairness higher than Tmin = 0.75, irrespective of the degree ofresource contention. Essentially, this renders the federation attractive evento those peers whose consumption rate is too low. Still in Figure 3a, we alsoobserve that due to the limitations of our simulation model the peers withhigh P may not be able to reduce the level of fairness. Note that, underunchanged consumption rate, in order to reduce fairness a collaborative peermust increase its supply. However, collaborative peers are not able to increase

19

(a) Fairness

(b) Satisfaction

Figure 3: Fairness and satisfaction of collaborative peers, in SD-NoF and FD-NoF, bothwith F = 0. The P of each peer is assigned according to a normal distribution withmean = 0.5 and sd = 0.1

20

(a) Fairness

(b) Satisfaction

Figure 4: Fairness and satisfaction of collaborative peers, in SD-NoF and FD-NoF, bothwith 25% free riders. The probability P for each peer is assigned according to a normaldistribution with mean = 0.5 and sd = 0.1

21

their supply above the value C = 1. Nevertheless, in a real world scenarios, inwhich peers may regulate their consumption rates by adjusting the values ofP or D over time, the capacity controller may be effective in ensuring thosepeers a level of fairness within [Tmin, Tmax]. Figure 4 illustrates this fact.

Specially in scenarios with E[κ] = 0.5 and E[κ] = 1, we can observe that inthe FD-NoF collaborative peers with high P have lower levels of both fairnessand satisfaction. Since we know that this may not have been caused by thecapacity controller, these results may be ascribed to the presence of eager freeriders, i.e. peers with P = 1 and D =∞. Another interesting conclusion wemay draw by comparing these two scenarios is that free riders tend to havea bigger impact over peers whose fairness is higher than Tmax. We believethat in the FD-NoF peers with lower levels of fairness are shielded from theactions of free riders thanks to the capacity controller. This strengthens ourconclusion that the FD-NoF yields levels of fairness that are at least as highas Tmin, regardless the amount of free riders. However, as already shownin the results for homogeneous peers, a high proportion of free riders in thefederation can lead it to total collapse.

6. Related work

Many approaches have already been explored with the goal of promotingcollaboration in peer-to-peer systems. One of them draws upon reputationschemes in which, by recording information about the past behavior of otherpeers, a peer may make decisions concerning collaboration. In P2PRep [5]and EigenRep [4], each peer locally stores information about its interactionswith other peers, besides also gathering global information from other peers,which are then used to determine their reputation or credit. Such strate-gies are enough for promoting collaboration and discriminating free riders.However, none of these methods deals with the problem of simultaneouslyproviding appropriate levels of both satisfaction and fairness.

Satsiou and Tassiulas (2010) [9] also proposed a reputation-based schemethat controls dynamically the availability of resources in file-sharing systemsin which the bandwidth of the peers are shared between download and uploadcapacities. The idea of the controller they propose is similar to ours: if dur-ing a certain period of time the bandwidth that a given peer obtains is lowerthan the capacity dedicated for download, then the peer increases its uploadcapacity by some value E in order to improve its reputation. On the otherhand, if the peer receives the same amount of capacity dedicated for down-

22

loading, it would be able to increase the download capacity to maximize itsutility. This mechanism guarantees the fairness of collaborative participants,ensuring that they receive resources in proportion to their contributions.

Concerning federated clouds, similarly to our strategy to maximize ben-efits, Goiri, Guitart and Torres (2012) [10] try to achieve the same goal byestimating whether it is better to outsource, insource or just turn off idleresources based on a function that includes several parameters like profit,revenue and cost. Mihailescu and Teo (2010) [11] and Gomes et al. (2012)[12] adopt the strategy of dynamic pricing to improve the benefits of the fed-eration. In both works there is no issue of free riding since the approaches aremarket-based. Given that their main goal is the maximization of the benefits,these works share similar ideas to ours, but since the mechanism we proposeis wholly non-monetary, cost are reduced, thereby increasing benefits, byisolating free riders by means of indirect regulation of resource contention.

Rochwerger et al. (2011) [13] uses policy-driven strategies to optimallyfind the best placement of virtual machines to physical machines, consideringeconomic, performance and availability aspects. This work does not addressthe problem of free riding, since past interactions do not leverage futureexchange decisions. Moreover, whereas our approach is P2P, and thereforetwo private clouds only need to autonomously join the federation to be ableto exchange resources, in RESERVOIR the collaboration between two cloudsis established in advance by a framework agreement which specifies capacityin terms of number and size of available VMs, together with other constraintssuch as cost, QoS and security level. These features brings about limitationsto the federation, a significant drawback since the larger the federation, thehighest are the odds that the peak and off-peak patterns of different memberswill match.

7. Concluding remarks

In this work we leverage the Network of Favors (NoF) and propose theinclusion of a capacity controller that implements a feedback control loopmechanism, allowing a collaborative peer to regulate the amount of resourcesprovided and thereby improve its level of fairness. With the aid of a sim-plified model of a federated P2P system we assessed, with the aid of a setof simulations, the results of the novel approach, called the Fairness-DrivenNoF (FD-NoF), and compared it to the results obtained in the first versionof the NoF, called here the Satisfaction-Driven NoF (SD-NoF).

23

Essentially, we show that the FD-NoF fulfills its stated goal. In scenariosof low resource contention (E[κ] = 0.5), the capacity controller increasesthe level of contention to 0.78. In this way, 98.75% of the collaborative peerswere able to reach the desired levels of fairness, whereas the remaining 1.25%could increased it to a value only slightly lower than the desired one. In thesescenarios, the collaborative participants could improve fairness by an averagerate of 61.2%, sacrificing only 2% of the level of satisfaction on average.For moderate and high resource contention scenarios (i.e. E[κ] ∈ {1, 2, 4}),the results of the FD-NoF are quite similar to those of the SD-NoF, whichis expected since the SD-NoF by itself already guarantees good values offairness and satisfaction for collaborative peers, taking into considerationthe scarcity of resources in these scenarios. Finally, in the simulations inwhich peers are in a consumer state with different frequencies (P), the FD-NoF allows collaborative peers with low P to attain levels of fairness thatare above the minimum desired (Tmin). This fact enhances scalability sinceit provides good levels of fairness and satisfaction also to peers with very lowconsumption rates (low P or low D).

As future work, we will implement the FD-NoF as part of the fogbowmiddleware (http://fogbowcloud.org/), and deploy and evaluate the perfor-mance of the FD-NoF within the federated cloud integrated in the computinginfrastructure of the EUBrazilCC project (http://eubrazilcloudconnect.eu/).

References

[1] P. Marshall, K. Keahey, T. Freeman, Elastic site: Using cloudsto elasti-cally extend site resources, in: Conference on Cluster, Cloud, and GridComputing (CCGRID), pp. 43–52.

[2] N. Grozev, R. Buyya, Inter-cloud architectures and application broker-ing: taxonomy and survey, Software: Practice and Experience 44 (2014)369–390.

[3] N. Andrade, F. Brasileiro, W. Cirne, M. Mowbray, Automatic gridassembly by promoting collaboration in peer-to-peer grids, Journal ofParallel and Distributed Computing 67 (2007) 957 – 966.

[4] S. D. Kamvar, M. T. Schlosser, H. Garcia-Molina, The EigenTrust Al-gorithm for Reputation Management in P2P Networks, Working Paper2002-56, Stanford InfoLab, 2002.

24

[5] E. Damiani, S. D. C. di Vimercati, S. Paraboschi, P. Samarati, Managingand sharing servents’ reputations in p2p systems, IEEE Transactionson Data and Knowledge Engineering 15 (2003) 840–854.

[6] N. Andrade, F. Brasileiro, W. Cirne, M. Mowbray, Discouraging free rid-ing in a peer-to-peer cpu-sharing grid, in: High performance DistributedComputing, 2004. Proceedings. 13th IEEE International Symposium on,pp. 129–137.

[7] J. L. Hellerstein, Y. Diao, S. Parekh, D. M. Tilbury, Feedback Controlof Computing Systems, John Wiley & Sons, 2004.

[8] J. M. Hinson, J. E. R. Staddon, Matching, maximizing, and hill-climbing, Journal of the Experimental Analysis of Behavior 40 (1983)321–331.

[9] A. Satsiou, L. Tassiulas, Reputation-based resource allocation in p2psystems of rational users, Parallel and Distributed Systems, IEEE Trans-actions on 21 (2010) 466–479.

[10] I. Goiri, J. Guitart, J. Torres, Economic model of a cloud provideroperating in a federated cloud, Information Systems Frontiers 14 (2012)827–843.

[11] M. Mihailescu, Y. M. Teo, Dynamic resource pricing on federatedclouds, in: Cluster, Cloud and Grid Computing (CCGrid), 2010 10thIEEE/ACM International Conference on, pp. 513–517.

[12] E. R. Gomes, Q. B. Vo, R. Kowalczyk, Pure exchange markets forresource sharing in federated clouds, Concurrency and Computation:Practice and Experience 24 (2012) 977–991.

[13] B. Rochwerger, D. Breitgand, A. Epstein, D. Hadas, I. Loy, K. Nagin,J. Tordsson, C. Ragusa, M. Villari, S. Clayman, E. Levy, A. Maraschini,P. Massonet, H. Munoz, G. Toffetti, Reservoir - when one cloud is notenough, Computer 44 (2011) 44–51.

25