Predictive Elastic Database Systems by Rebecca Taft
On-line transaction processing (OLTP) database management systems (DBMSs) are a critical part of the operation of many large enterprises. These systems often serve time-varying workloads due to daily, weekly or seasonal fluctuations in demand, or because of rapid growth in demand due to a company’s business success. In addition, many OLTP workloads are heavily skewed to “hot” tuples or ranges of tuples. For example, the majority of NYSE volume involves only 40 stocks. To deal with such fluctuations, an OLTP DBMS needs to be elastic; that is, it must be able to expand and contract resources in response to load fluctuations and dynamically balance load as hot tuples vary over time. In this talk, I will present a system we built at MIT called P-Store, which uses predictive modeling to reconfigure the system in advance of predicted load changes. I will show that when running a real database workload, P-Store achieves comparable performance to a traditional static OLTP DBMS while using 50% fewer computing resources.
22. E-Store: Elastic Scaling to Adapt to Workload
Transaction Arrival Rate
TransacRons
0
3
5
8
10
Part 1 Part 2 Part 3 Part 4 Part 5 19
Uniform Workload, Increasing Load
23. E-Store: Elastic Scaling to Adapt to Workload
Transaction Arrival Rate
TransacRons
0
3
5
8
10
Part 1 Part 2 Part 3 Part 4 Part 5 19
Uniform Workload, Increasing Load
25. TransacRons
0
2.5
5
7.5
10
Part 1 Part 2 Part 3 Part 4 Part 5
E-Store: Elastic Scaling to Adapt to Workload
Transaction Arrival Rate
TransacRons
0
3
5
8
10
Part 1 Part 2 Part 3
Transaction Arrival Rate
19
Uniform Workload, Increasing Load Skewed Workload
26. TransacRons
0
2.5
5
7.5
10
Part 1 Part 2 Part 3 Part 4 Part 5
E-Store: Elastic Scaling to Adapt to Workload
Transaction Arrival Rate
TransacRons
0
3
5
8
10
Part 1 Part 2 Part 3
Transaction Arrival Rate
19
Uniform Workload, Increasing Load Skewed Workload
46. Time to Reconfigure
• Rate control: small chunks of data, spaced apart
• ∃ some time D – minimum time to move entire database w/ no
performance impact
% of Data
0
50
100
Nodes
1 2 3 4
% of Data
0
50
100
Nodes
1 2 3
→
29
47. Time to Reconfigure
• Rate control: small chunks of data, spaced apart
• ∃ some time D – minimum time to move entire database w/ no
performance impact
% of Data
0
50
100
Nodes
1 2 3 4
% of Data
0
50
100
Nodes
1 2 3
→
Time = ¼ * D 29
76. Dynamic Programming Algorithm for Planning
Reconfigurations
• Complexity ∝ # time steps and max number of machines needed
• In practice: runtime < 1 second
• Greedy alternatives don’t work
42
77. Time Series Prediction
• Diurnal, periodic workload, some variation day to day
• Prediction must complete in seconds-to-minutes
• We use Sparse Periodic Auto-Regression (SPAR) – Chen et al. NSDI ‘08
43
85. Summary: P-Store Evaluation
• Can we reduce resource usage?
• Saves 50% of computing resources compared to static allocation
• Can we prevent latency spikes?
• Superior performance compared to reactive approach
• On a real workload, P-Store reduces resource usage while keeping
latency within application requirements
51