Learning Cloud Dynamics to Optimize Spot Instance Bidding Strategies
Misha Khodak Joint with Liang Zheng, Andrew Lan, Carlee Joe-Wong, and Mung Chiang
Learning Cloud Dynamics to Optimize Spot Instance Bidding - - PowerPoint PPT Presentation
Learning Cloud Dynamics to Optimize Spot Instance Bidding Strategies Misha Khodak Joint with Liang Zheng, Andrew Lan, Carlee Joe-Wong, and Mung Chiang Overview The popularity of cloud computing services has led to the rise of dual-market
Misha Khodak Joint with Liang Zheng, Andrew Lan, Carlee Joe-Wong, and Mung Chiang
dual-market pricing schemes:
via an auction.
spot-price behavior in this environment.
demonstrate its potential to inform strategic bidding between heterogeneous cloud resources.
economic modeling focusing mainly on global behavior:
distribution at equilibrium.
market design as stemming from variable user risk aversion.
strategic bidding.
m3.medium spot price
The spot price πt tends to hover above a constant lower bound price π. Sometimes goes above the on-demand price π. Occurs when on-demand users take up too much capacity.
instances spot-market instances
spot-market profit (π − π) N (d)
t
+ (πt − π) N (s)
t
Need a constraint on the number of instances (N):
t
+ N (s)
t
≤ N
t
+ N (s)
t
= N
Mar. Apr. May Jun. Jul. Aug. 0.10 0.08 0.06 0.04 0.02 0.00
Proposition [KZLJC’18]: If Bt bids are drawn independently from a distri- bution that weakly stochastically dominates the uniform distribution over [π, π], then if the provider uses the profit-maximizing constraint we have P ⇣ πt ≤ π(ρ)⌘ ≤ exp −2 ✓1 2 − 2ρ ◆2 Bt ! for ρ ∈ [0, 1/4] and π(ρ) = ρπ + (1 − ρ)π. So a profit-maximizing provider will not set πt close to π very often, which contradicts the data and motivates the choice of a usage-maximizing constraint:
At time t cloud provider sees Bt bids, which we model as being i.i.d. draws from U[π, π] (Zheng et al., 2015). Then in the limit Bt → ∞ this the spot price is distributed as πt = 8 < : π nt + bt ≤ 1 (not enough users) π − (π − π) 1−nt
bt
+ εt 0 < 1 − nt < bt π nt ≥ 1 (too many on-demand users) where we define: nt = N (d)
t
/N
bt = Bt/N spot usage εt ∼ N ✓ 0, σ2 bt ◆
We model two hidden variables:
At each time step, Λ(d)
t
t
spot jobs arrive, ˜ Λ(d)
t
demand jobs complete, and ˜ Λ(s)
t
spot jobs complete. This yields the dynamical system nt+1 = nt + λ(d)
t
− ˜ λ(d)
t
bt+1 = bt + λ(s)
t
− ˜ λ(s)
t
for all λt = Λt/N modeled as i.i.d. draws from exponential distributions.
Our spot price model is a hidden Markov model (HMM) with hidden state transition governed by the job arrival/departure model: nt+1 = nt + λ(d)
t
− ˜ λ(d)
t
bt+1 = bt + λ(s)
t
− ˜ λ(s)
t
and the spot price distribution: πt = π nt + bt ≤ 1 π − (π − π) 1−nt
bt
+ εt 0 < 1 − nt < bt π nt ≥ 1 Five model parameters: a scale parameter for each exponentially-distributed λt for job arrival/departure and variance σ2 of the Gaussian observation noise εt.
hidden state
hidden states are jointly estimated using Expectation-Maximization (EM).
using a sequential Monte Carlo (“particle filter”) approach:
than Kalman-type filters for non-smooth, singular models.
state constraints.
date dollars dollars
prediction (95% conf.) prediction (95% conf.)
1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 2.5 2.0 1.5 1.0 0.5 0.0 0.10 0.08 0.06 0.04 0.02 0.00 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0
date
date
date
m3.medium, spring 2017 g2.2xlarge, spring 2017
demand price, if one can afford it.
can be easily parallelized.
family of compute-
instances price scales linearly with resources
Given a price π(i)
τ
at time τ for each instance type i in a family I of instances, we wish to minimize the instance cost: P (i)
τ
=
t+Ti
X
t=τ+1
π(i)
t
for Ti the amount of time it takes to finish a job on type i.
τ P (i)
τ .
bidding across geographic regions.
instance cost by simulating multiple trajectories.
using a second-order Taylor expansion.
in both the on-demand and spot market (empirically true).
model - the price at each time step is some noisy linear combination of the price at p previous time steps.
standard Gaussian error assumptions and uncorrelated residuals.
0.00 0.02 0.04 0.04 0.02 0.00
0.00 0.02 0.04 0.04 0.02 0.00
0.000 0.005 600 500 400 300 200 100
0.000 0.005 0.010 600 500 400 300 200 100
AR(1) AR(17)
regret: the difference between the cost of the chosen action and that of the best action in hindsight.
term (e.g. 16-hour) jobs.
Regret (US Cents)
1 2 3 4
Instance Type
m3 c3 r3 i3 g2( /20)
Monte Carlo Approximation Linear Auto-Regression
Regret (US Cents)
2.5 5 7.5 10
Instance Type
m3 c3 r3 i3 g2( /100)
Monte Carlo Approximation Linear Auto-Regression
16 Hours 64 Hours
different instances.
0.3 0.4 0.5 0.6 Probability Density 1.0 1.5 2.0 0.5 Probability Density 0.6 0.8 1.0 1.2 1.4 Probability Density 0.5 1.0 1.5 2.0 Probability Density 10 20 30 40 50 Probability Density
Volatile Instances (g2, i3) Non-Volatile Instances (m3, c3, r3)
Payment Distribution for Different Instances
nonlinear dynamical system.
problem and learn model parameters.
between instances that can make use of the model.
where dynamics can be influenced across instance families or different regions?
depends on the recent job arrival random variables.
requiring lighter assumptions concerning job parallelism.