Top Banner
Predictive Elastic Database Systems Rebecca Taft – [email protected] HPTS 2017 1
51

Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Mar 09, 2018

Download

Documents

phamcong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Predictive Elastic Database Systems

RebeccaTaft–[email protected]

1

Page 2: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

ModernOLTPApplications

Large Scale Cloud-Based Performance is Critical

2

Page 3: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Challengestotransactionperformance:skewandworkloadvariation

3

DatabaseElasticityE-Store–manageskewandreacttovariation

P-Store–predictivemodelingfortimevariation

Page 4: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

TransacHon

s

0

3

5

8

10

Part1 Part2 Part3

E-Store: Elastic Scaling to Adapt to Workload

TransactionArrivalRate

4

UniformWorkload,IncreasingLoad

Page 5: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

TransacHon

s

0

3

5

8

10

Part1 Part2 Part3

E-Store: Elastic Scaling to Adapt to Workload

TransactionArrivalRate

4

UniformWorkload,IncreasingLoad

Page 6: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

E-Store: Elastic Scaling to Adapt to Workload

TransactionArrivalRate

TransacHon

s

0

3

5

8

10

Part1 Part2 Part3 Part4 Part54

UniformWorkload,IncreasingLoad

Page 7: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

E-Store: Elastic Scaling to Adapt to Workload

TransactionArrivalRate

TransacHon

s

0

3

5

8

10

Part1 Part2 Part3 Part4 Part54

UniformWorkload,IncreasingLoad

Page 8: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

TransacHon

s

0

2.5

5

7.5

10

Part1 Part2 Part3 Part4 Part5

E-Store: Elastic Scaling to Adapt to Workload

TransactionArrivalRate

4

UniformWorkload,IncreasingLoad

Page 9: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

TransacHon

s

0

2.5

5

7.5

10

Part1 Part2 Part3 Part4 Part5

E-Store: Elastic Scaling to Adapt to Workload

TransactionArrivalRate

TransacHon

s

0

3

5

8

10

Part1 Part2 Part3

TransactionArrivalRate

4

UniformWorkload,IncreasingLoad SkewedWorkload

Page 10: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

TransacHon

s

0

2.5

5

7.5

10

Part1 Part2 Part3 Part4 Part5

E-Store: Elastic Scaling to Adapt to Workload

TransactionArrivalRate

TransacHon

s

0

3

5

8

10

Part1 Part2 Part3

TransactionArrivalRate

4

UniformWorkload,IncreasingLoad SkewedWorkload

Page 11: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

TransacHon

s

0

3

5

8

10

Part1 Part2 Part3

TransacHon

s

0

2.5

5

7.5

10

Part1 Part2 Part3 Part4 Part5

E-Store: Elastic Scaling to Adapt to Workload

TransactionArrivalRate TransactionArrivalRate

4

UniformWorkload,IncreasingLoad SkewedWorkload

Page 12: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

E-Store Elastic DBMS Architecture

5

LiveMigration

ElasticController

PlannerLoadMonitor

SharedNothingDBMS(e.g.H-Store)

Page 13: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

ACaseStudy:B2WDigital

6

Page 14: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

3-Day Online Retail Database Workload

7

Page 15: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

3-Day Online Retail Database Workload

7

Page 16: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

3-Day Online Retail Database Workload

7

Page 17: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

3-Day Online Retail Database Workload

7

Page 18: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

3-Day Online Retail Database Workload

7

Page 19: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Elastic Scaling Adapts to Workload

8

Page 20: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Reactive Scaling Causes Latency Spikes

8

Page 21: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

P-StoreA Predictive Elastic DBMS

9

Page 22: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

P-Store Architecture

10

LiveMigration

PredictiveController

Predictor PlannerLoadMonitor

SharedNothingDBMS(e.g.H-Store)

Page 23: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Ideal Capacity Actual Servers Allocated

DemandMachineCapacity

11

Page 24: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

DemandMachineCapacity

12

Page 25: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

?

DemandMachineCapacity

13

Page 26: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Options1. Addmachine(s)

DemandMachineCapacity

13

Page 27: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Options1. Addmachine(s)

DemandMachineCapacity

13

Page 28: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Options1. Addmachine(s)

DemandMachineCapacity

13

Page 29: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Options1. Addmachine(s)2. Removemachine(s)

DemandMachineCapacity

13

Page 30: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Options1. Addmachine(s)2. Removemachine(s)3. Nochange

DemandMachineCapacity

13

Page 31: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Options1. Addmachine(s)2. Removemachine(s)3. Nochange

DemandMachineCapacity

13

Page 32: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Options1. Addmachine(s)2. Removemachine(s)3. Nochange

DemandMachineCapacity

EffectiveCapacity

13

Page 33: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Options1. Addmachine(s)2. Removemachine(s)3. Nochange

Challenges1. TimetoReconfigure2. EffectiveCapacity3. Cost

DemandMachineCapacity

EffectiveCapacity

13

Page 34: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Time to Reconfigure

• Ratecontrol:smallchunksofdata,spacedapart• ∃sometimeD–minimumtimetomoveentiredatabasew/noperformanceimpact

%ofD

ata

0

50

100

Nodes

1 2 3 4

%ofD

ata

0

50

100

Nodes

1 2 3

Time = ¼ * D 14

Page 35: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Effective Capacity%of

TransacHon

s

0255075100

Nodes

1 2 3 4 5

%of

TransacHon

s

0255075100

Nodes

1 2

=

15

• Whattransactionratecanthesystemsupport?• Maxratepermachine:Q

Page 36: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Cost

Cost = 7

Nod

esAllocated

0

1

3

4

5

Time

1 2 2.1 3 3.1 4 4

Page 37: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

DemandMachineCapacity

EffectiveCapacity

4machines att=9

Goal:findpathwithminimalcostsuchthateff.capacity>demand

Costof{pathtoAmachinesendingattimet}

= Costof{pathtoBmachinesendingattimet–TimeB→A}+

CostB→A 17

Page 38: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Dynamic Programming Algorithm for Planning Reconfigurations• Complexity∝#timestepsandmaxnumberofmachinesneeded• Inpractice:runtime<1second• Greedyalternativesdon’twork

18

Page 39: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

DemandMachineCapacity

EffectiveCapacity

19

Page 40: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

DemandMachineCapacity

EffectiveCapacity

OptimalSolution TotalCost:30

19

Page 41: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Time Series Prediction

• Diurnal,periodicworkload,somevariationdaytoday• Predictionmustcompleteinseconds-to-minutes• WeuseSparsePeriodicAuto-Regression(SPAR)–Chenetal.NSDI‘08

20

Page 42: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Evaluation

• Canwereduceresourceusage?• Canwepreventlatencyspikes?

21

Page 43: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Experiments

• 3DaysofB2WworkloadrunonH-Store• Clusterof10servers,6partitionsperserver• About1GBofshoppingcartandcheckoutdata• Trackmachinesallocated,throughput,latency,reconfigurationtimeperiods

22

Page 44: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Results – Static, Peak Provisioning Machines Used: 10

23

Page 45: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Results – Static, Average Provisioning Machines Used: 4

24

Page 46: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

25

Results – Reactive ScalingAvg. Machines Used: 4.02

Page 47: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Results – P-Store with SPAR Avg. Machines Used: 5.05

26

Page 48: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Results – P-Store with Exact Provisioning Avg. Machines Used: 4.89

27

Page 49: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Results Comparison: CDF of Top 1% of Latency

28

Page 50: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Summary: P-Store Evaluation

• Canwereduceresourceusage?• Saves50%ofcomputingresourcescomparedtostaticallocation

• Canwepreventlatencyspikes?• Superiorperformancecomparedtoreactiveapproach

• Onarealworkload,P-Storereducesresourceusagewhilekeepinglatencywithinapplicationrequirements

29

Page 51: Predictive Elastic Database Systems - · PDF fileE-Store Elastic DBMS Architecture 5 Live Migration ... Machine Capacity Effective Capacity 13. Options 1. ... Dynamic Programming Algorithm

Summary

❖Realdatabaseworkloadsareskewedandvaryovertime❖Elasticityenablesmanagementofskewandadaptationtoloadchanges

❖Predictivescalingimprovesperformanceduringloadchangescomparedtoreactivescaling

[email protected]

30