15
Decision Support for Amazon EC2 Spot Instances Fei Dong 20111128 11/27/11 1

Decision support for Amazon Spot Instance

Embed Size (px)

Citation preview

Page 1: Decision support for Amazon Spot Instance

Decision  Support  for  Amazon  EC2  Spot  Instances  

Fei  Dong  2011-­‐11-­‐28  

11/27/11   1  

Page 2: Decision support for Amazon Spot Instance

A  Glimpse  of  Amazon  EC2  

EC2  Node  Type

CPU  (#EC2  units)

Memory I/O  Performance

Per-­‐hour  Cost

m1.small 1 1.7  GB moderate $0.085

m1.large 4 7.5  GB high $0.34

m1.xlarge 8 15  GB high $0.68

c1.medium 5 1.7  GB moderate $0.17

c1.xlarge 20 7  GB high $0.68

cc1.4xlarge 33.5 23  GB very  high $1.60

•  Reserved  Instance,  On-­‐demand  Instance,  and  SI  •  Different  scenarios:  Cluster  ×  Workload  

11/27/11   2  

Page 3: Decision support for Amazon Spot Instance

11/27/11   3  

MulU-­‐objecUve  Cluster  Provisioning  

0 200 400 600 800

1,000 1,200

m1.small m1.large m1.xlarge c1.medium c1.xlarge

Run

ning

Tim

e (m

in)

Actual

0.00 2.00 4.00 6.00 8.00

10.00

m1.small m1.large m1.xlarge c1.medium c1.xlarge

Cos

t ($)

EC2 Instance Type for Target Cluster

Actual

3  

Page 4: Decision support for Amazon Spot Instance

Spot  Instance  

•  Spot  instances  enable  you  to  bid  for  unused  Amazon  EC2  capacity.  Instances  are  charged  the  Spot  Price  which  is  set  by  Amazon  EC2  and  fluctuates  periodically  depending  on  the  supply  of  and  demand  for  Spot  Instance  capacity.  

11/27/11   4  

Page 5: Decision support for Amazon Spot Instance

Challenges  &  AssumpUons  

•  Challenges:  – Minimize  monetary  costs  for  a  user  while  meeUng  Service  constrains.  

–  Know  nothing  about  Amazon  pricing  strategy  and  other  bid  strategy.  

•  AssumpUons:  –  Bid  price  is  fixed.  –  Instance  Type  is  fixed  (no  mix  strategy)  – Not  consider  the  overhead  to  recover  spot  instances.  

11/27/11   5  

Page 6: Decision support for Amazon Spot Instance

Pricing  PredicUon  Model  

•  Linear  Regression  •  Normal  DistribuUon  •  ExponenUal  DistribuUon    

11/27/11   6  

p (1− p )i −1i =1

n

∑ H (i )

Page 7: Decision support for Amazon Spot Instance

Predict  Price  Algorithm  

1.  Collect  the  prices  over  a  period  of  Ume,  in  order  to  esUmate  mean  and  variance.  

2.  Use  the  exponenUal  approximaUon  fidng,  calculate  x  given  the  CDF(X<x)  =  Prob.    

3.  Compare  other  models  and  pick  a  maximum  value  as  a  bid  price.  

4.  If  the  bid  price  is  smaller  than  the  spot  price,  thus  increase  the  bid  by  33%  for  the  next  interval.  

11/27/11   7  

Page 8: Decision support for Amazon Spot Instance

Price  PredicUon  

11/27/11   8  

0  

0.05  

0.1  

0.15  

0.2  

0.25  

0.3  

0.35  

1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24  

Price  ($)  

Time  (Hours)  

eu  linux.m1.small  spot  price  on  11/18/2011  

Actual  

Predict  Adjust  

Predict  

Var(Predict  Adj)  =  0.000769  Var(Predict)                =  0.001786  

Page 9: Decision support for Amazon Spot Instance

Bid  Strategy  

11/27/11   9  

copt = argmaxc∈S

F(d,b,e, t,n)Utility = F(d,b,e, t,n) Deadline d, budget b,

Estimated Time e, Cluster Type t,

Number n

Min  Time  Mode:  Can  the  job  be  execute  as  soon  as  possible  under  specified  budget  and  deadline  constrains?  

Min  Money  Mode:    What  is  the  bid  price  and  instance  type  that  minimize  the  total  monetary  cost?  

ExhausUve  Search  

Page 10: Decision support for Amazon Spot Instance

Experimental  EvaluaUon  

•  Choose  5  Spot  Instance  Types  – M1.small,  m1.large,  m1.xlarge,  c1.medium,  c1.xlarge  

•  Run  5  Instances  compared  with  on  demand  instances.  

11/27/11   10  

Page 11: Decision support for Amazon Spot Instance

Experimental  EvaluaUon  (Ctd.)    

11/27/11   11  

0  

2  

4  

6  

8  

10  

12  

14  

m1.small   m1.large   m1.xlarge   c1.medium   c1.xlarge  

Cost  ($

)  

EC2    Instance  Type  

on-­‐demand  

SI  budget  intensive  

SI  Ume  intensive  

0  

200  

400  

600  

800  

1000  

1200  

1400  

1600  

m1.small   m1.large   m1.xlarge   c1.medium   c1.xlarge  

Runn

ing  Time  (M

in)  

EC2  Instance  Type  

on-­‐demand  

SI  budget  intensive  

SI  Ume  intensive  

Page 12: Decision support for Amazon Spot Instance

Case  Analysis  

11/27/11   12  M1.small  spot  instance,  bid  strategy  

M1.small  Linux  on  11/18/2011  

Page 13: Decision support for Amazon Spot Instance

Conclusions  &  Future  Work  

•  Conclusions –  More cost-efficient than fixed-size instance choice –  Spot Instances not always provide inexpensive resources

for transient workloads

•  Future works –  Consider to mix other instance types (e.g. spot

instances & reserved instances) –  Disaster Recovery, checking point.

11/27/11   13  

Page 14: Decision support for Amazon Spot Instance

Reference  •  hjp://aws.amazon.com/ec2/instance-­‐types  •  H.  Herodotou,  F.  Dong,  and  S.  Babu.  No  One  (Cluster)  Size  Fits  All:  

AutomaUc  Cluster  Sizing  for  Data-­‐intensive  AnalyUcs.  (Slides)In  Proc.  of  the  ACM  Symposium  on  Cloud  CompuUng  2011  (SOCC  '11),  October  2011.  

•  D.  Ardagna,  B.  Panicucci  and  M.Passacantando.  A  Game  TheoreUc  FormulaUon  of  the  Service  Provisioning  Problem  in  Cloud  Systems.  WWW2011  Proceedings,  2011  

•  N.  Jain,  I.  Menache,  and  O.  Shamir.  On-­‐demand  or  Spot?  Learning-­‐based  Resource  AllocaUon  for  Delay-­‐Tolerant  Batch  CompuUng.    

 

11/27/11   14  

Page 15: Decision support for Amazon Spot Instance

 Thank  youJ  

11/27/11   15