Content uploaded by Jinlai Xu
Author content
All content in this area was uploaded by Jinlai Xu on Oct 11, 2017
Content may be subject to copyright.
Cost-aware Resource Management
for Federated Clouds
Using Resource Sharing Contracts
Jinlai Xu, Balaji Palanisamy
School of Information Sciences
University of Pittsburgh
Cloud Computing
Data
analytics
App Media Health
care
CPU Storage Database Network Management
Cloud
2
IoT
Problems of previous “standalone” clouds
•Resources available in a single data center are limited
•One datacenter can cover most but not all the peak workloads
•Under provisioning will cause heavy penalties
Lost revenue
Lost users
Resources
Demand
Capacity
Time (days)
12 3
Resources
Demand
Capacity
Time (days)
12 3
Resources
Demand
Capacity
Time (days)
12 3
Slide Credits: Berkeley RAD Lab 3
Problems of previous “standalone” clouds
•Resources available in a single data center are limited
•Dynamic electricity price has both pros and cons
•The fluctuation is significant during days (from 10s to 100s)
•The fluctuation is significant also in one day (up to 6x in one day)
•High electricity price will cost datacenters a lot
•So there is a need for the datacenters to share resources with each
other to both increase the potential capacity and decrease the cost.
Data from National Grid 4
Resource sharing mechanisms
•Virtual Geo-distributed Cluster
•One Cloud Service Provider(CSP)
manages several geo-distributed
datacenters and makes them work
together
•Federated Cloud
•Several CSPs get together to build
a federation to share resources in
the geo-distributed scenario
5
Previous solutions
Virtual geo-distributed cluster Federated cloud
6
WAN
Seattle
Berkeley Beijing
London
Broker
The weaknesses of previous solutions
•Global controlling
•Either the information of the datacenters are aggregated to a centralized
controller to help allocate the resource
•Or all the requests from the users are submitted to a centralized broker to
respond.
•Global optimization
•Global optimization does not mean individual optimized.
•The profit of each datacenter is not guaranteed which loses fairness
7
Contracts-based federated cloud
•Resource sharing contract
•Stipulate the rights and duties
between the buyer and seller
•Effect time
•Price
•Resource amount
•…
•Problem 1: How to build the
resource sharing contracts?
•Problem 2: How to appropriately
schedule the jobs based on the
contracts?
8
Contract
Contract
Contract
Contract
CSP 1 CSP 2
CSP 3 CSP 4
Problem1: Contracts establishment
•The auction mechanisms fit the properties of the problem well
•Both competing and cooperating need to be considered
•The essence behind the auction is to match the demands and supplies to
allocate some resources.
•Properties we desire in the auction mechanism:
•Double auction: both buyers and sellers bid in the auction
•Truthfulness: bidders tend to bid with their true valuation
•Budget balance: auctioneer will not subsidize in the auction
•McAfee mechanism satisfies the above criteria
9
Existing double
auction designs Truthfulness Ex-post Budget
Balance
Individual
Rationality
Average X√ √
VCG √X √
McAfee √√√
Proposed bidding strategies
•The utility function of each CSP basically contains two parts:
•The charges from the customers by running the tasks
•The operating cost of the infrastructure
•Mixed strategies for the potential buyer:
•Lack of resource: bid by the charge value
•Otherwise: bid by the operating cost
•One strategy for the potential seller:
•Idle resource: bid by the operating cost
•Other strategies can be considered by adding into the utility function
10
Winning bids decision
•CSPs bid by the strategies
•Order the sell bids with ascending
order and buy bids with descending
order
•Find the break even index
•Calculate the intermediate price
•If or
•Choose the winning bids (first 1bids
win)
•Calculate the clear prices (buy price and
sell price respectively)
•If
•Choose the winning bids (first bids win)
•Calculate the clear prices (buy price and
sell price are equal to )
11
$10
$20
$40
$20
$10
$40
Sell Bids Buy Bids
CSP 1 CSP 2 CSP 3
Break
Even
Index
1
2
3
= 2
Calculate:
Intermediate price:
= +
2=25
=20 20 =
Sell price ==$20
Buy price ==$20
Winning
Bids
Contracts Establishment Process
•Two layers of loop
For each time slot
For each type-resource
CSPs bid;
Winning bids decision;
Continue to next type of resource;
Continue to next time slot;
•So for each time slot and each type
of resource, there is an auction and
an array of auction result.
•The contract is built by the array of
the auction results one by one.
12
$10
$20
$40
$20
$10
$40
Sell Bids Buy Bids
CSP 1 CSP 2 CSP 3
Winning
Bids
Effective time: in
Resource type:
Sell price =$20
Buy price =$20
Problem2: Scheduling
•Cost-aware mechanism
•Sort the contracts by their unit buy price (price per unit resource)
•Separate the contracts to two sets:
•Lower-cost contracts (price less than the local operation cost)
•Higher-cost contracts (price higher than the local operation cost)
•Schedule the jobs:
•Fill the lower-cost contract
•Fill the local resource
•Use the higher-cost contract only when the above two kinds of resource are
exhausted
13
Scheduling
Illustration
•First in First out (FIFO)
•Cost-aware
14
Time →
Servers
Job Queue
Scheduler
11:00 12:00
Two
Sides
CSP1
->CSP2
Time
11:00~12:00
Type
2 (2 servers)
Price
$20
Head
Tail
Jobs
$10
Contract
Cost-aware:
Unit Price > Local Operation Cost
Place the job to local servers first
Cost: $5/server
Contract
Unit Price Local Resource
Simulation setup –CSPs and datacenters
Locations from AWS EC2’s data 15
# CSP (each with
one datacenter) 25
# servers per DC 600
PUE 1.2
Max response
time (s) 600
Default setting
Simulation setup –server
•IBM server x3550
•CPU: 2 x [Xeon X5675 3067 MHz, 6 cores],
•Memory: 16GB
Load 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Power
(Watt) 58.4 98 109 118 128 140 153 170 189 205 222
Picture and spec from IBM 16
Simulation setup -dataset
•Real workload trace from Google
•Replay the trace for every task
•Start time
•Length
•Resource requirement(CPU, memory)
•Dynamic electricity price dataset
from National Grid
•Randomly choose one day’s
electricity price array for each
datacenter
17
Simulation setup –compared mechanisms
•NF: each datacenter runs alone without federation
•ConBLF: Local resource First Contracts-Based
•ConBCA: Cost-Aware Contracts-Based
•RT: real-time complete cooperation by a broker
18
Experiment Result –impact of # of servers
•The electricity cost is optimized with using the contracts-based
mechanisms.
•The success rate of contracts-based mechanisms are between RT and
NF
19
0
0.2
0.4
0.6
0.8
1
1.2
200 400 600 800 1000
NORMALIZED ELECTRICITY COST
/ SUCCESS TASK
# SERVERS / DATACENTER
NF ConBLF ConBCA RT
0
0.2
0.4
0.6
0.8
1
1.2
200 400 600 800 1000
SUCCESS RATE
# SERVERS / DATACENTER
NF ConBLF ConBCA RT
Experiment Result –impact of # of CSPs
•The result is similar to the scenario of impact of number of servers
per datacenter
20
0
0.2
0.4
0.6
0.8
1
1.2
10 20 30 40 50
NORMALIZED ELECTRICITY COST
/ SUCCESS TASK
# OF CSP
NF ConBLF ConBCA RT
0
0.2
0.4
0.6
0.8
1
1.2
10 20 30 40 50
AVERAGE UTILIZATION
# OF CSP
NF ConBLF ConBCA RT
Experiment Result –impact of prediction error
•Prediction errors do not significantly influence the electricity cost and
success rate
•Performance of the contracts-based mechanisms is not significantly
influenced by the prediction error
21
0
0.2
0.4
0.6
0.8
1
1.2
12345
NORMALIZED ELECTRICITY COST
/ SUCCESS TASK
PREDICTION ERROR (%)
NF LFConB CAConB RT
0
0.2
0.4
0.6
0.8
1
1.2
12345
SUCCESS RATE
PREDICTION ERROR (%)
NF LFConB CAConB RT
Experiment result -fairness
22
•RT represents large variance
•All the contracts-based mechanisms represent low variance
•7/25 CSPs lose profits after participating into the federated cloud
when using RT mechanism
•Contracts-based mechanisms perform better
-5
0
5
10
12345678910 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
NORMALIZED PROFIT
CSP #
NF LFConB CAConB ConAConB ConACAConB RT
Conclusion
•Propose a contracts-based mechanism for resource sharing between CSPs
(cloud service providers) in a federated cloud.
•Develop an auction-based mechanism for contract establishment and a suit
of contracts-aware and cost-aware scheduling techniques that maximize
the local profits of the CSPs while servicing the individual job requirements.
•Evaluate the performance of the proposed approach using a trace-driven
simulation study with realistic workload traces and electricity pricing.
•The contracts-based solution achieves good performance and performs
significantly better than the traditional model especially in fairness
measurement.
23
Thanks
24
Backup slides
Jinlai Xu, Balaji Palanisamy
School of Information Sciences
University of Pittsburgh
System model
•Cloud Service Provider
•Resource management
•Provisioning and scheduling
•Contracts managing
•Manage the contracts
•Observe the statuses
•Workload estimating
•Predict the workload and help in
establishing the contracts
26
Tasks and provision requests
Servers
User layer
Physical layer
Virtual layer
Routers & Switches
Infrastructure
Cloud OS
Provision &
Scheduler
subnet
subnet
Service
Delivery Service layer
Contracts
Effective Time
Resource amount
Price
Contracts
manager
Cloud OS
subnet
contractor
Resource
manager
Workload
Estimator
System model
•Federation Coordinator
•Consulting
•Match the demands and supplies of
the CSPs
•Contract building
•Establish the resource sharing
contracts based on the consulting
result
27
Coordinator
Consult Contract
Builder
CSP 1 CSP 2 …
Demand &
Supply
Contracts
Resource type: dedicated cloud
•Emerging IaaS service
•IBM Bluemix dedicated
•AWS EC2 dedicated instances
•Physically isolated hardware
•Firm performance Guarantee
•More configurable
•More security
28
Proof of truthfulness for McAfee mechanism
•If or
•The first 1buyers and sellers have no incentive to change their
declaration since this will have no effect on their price;
•The buyer and seller have no incentive to change since they don't trade
anyway, and if they do enter the trading (e.g. increases his declaration
above ), their profit from trading will be negative.
•If
•The first buyers and sellers have no incentive to change their declaration
since this will have no effect on their price;
•The (+ 1) buyer and seller have no incentive to change since they don't
trade anyway, and if they do enter the trading (e.g. increases his
declaration above ), their profit from trading will be negative.
29
Algorithms pseudocode
30
Simulator
•Implement in JAVA
•5000+ lines of code
•80+ classes
31
Experiment Result –impact of # of servers
•The average utilization of the servers are better than RT and NF
32
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
200 400 600 800 1000
AVERAGE SERVER UTILIZATION
# SERVERS / DATACENTER
NF ConBLF ConBCA RT
Experiment Result –impact of # of CSPs
•The result is similar to the scenario of impact of number of servers
per datacenter
33
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
10 20 30 40 50
SUCCESS RATE
# OF CSP
NF LFConB CAConB RT
Experiment Result –impact of prediction error
•Prediction errors do not significantly influence the server utilization
34
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
12345
AVERAGE SERVER UTILIZATION
PREDICTION ERROR (%)
NF LFConB CAConB RT
Experiment result –impact of contract interval
•The electricity cost is increased a little(2% to 5%) with increasing the
interval of the contracts (the length for one time slot)
35
0
0.2
0.4
0.6
0.8
1
1.2
1200 2400 3600 4800 6000 7200
NORMALIZED ELECTRICITY COST
/ SUCCESS TASK
CONTRACT INTERVAL (S)
NF LFConB CAConB RT
0
0.2
0.4
0.6
0.8
1
1.2
1200 2400 3600 4800 6000 7200
SUCCESS RATE
CONTRACT INTERVAL (S)
NF LFConB CAConB RT
Experiment result –impact of contract interval
•The contract interval length does not significantly influence the server
utilization
36
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1200 2400 3600 4800 6000 7200
AVERAGE SERVER UTILIZATION
CONTRACT INTERVAL (S)
NF LFConB CAConB RT