@andy_pavlo On Predictive Modeling for D istributed D atabases VLDB - August 28 th, 2012
Databases?Evan Jones?
Romney has a Swiss bank account! Muammar Gaddafi is in trouble! Putin is going to get re- elected!
Transact ion Processi ng ?z, High- Volume
Main Memory Parallel Shared-Nothing H-Store: A High-Performance, Distributed Main Memory Transaction Processing System Proc. VLDB Endow., vol. 1, iss. 2, pp , 2008.
FastRepetitiveSmall
Client Database Cluster Proc. Name Input Params Proc. Name Input Params Transac tion Executi on Transac tion Executi on Database Cluster Transac tion Result Transac tion Result
Client Database Cluster P1 P2 P3 P4
(txn/s) Magic Mode Assume Single-Part. Assume Distributed TPC-C NewOrder
This transactio n will execute 4 queries on partitions 1,3, and 6!
Pro Tip: Canadians do not like unnecessar y surgeries.
Main Idea: On Predictive Modeling for Optimizing Transaction Execution in Parallel OLTP Systems Proc. VLDB Endow., vol. 5, iss. 2, pp , Use models to predict transactio n behavior before execution.
Client Database Cluster
Step #1: Estimate the path that the transactio n will take.
Current State SELECT * FROM WAREHOUSE WHERE W_ID = ? w_id=0 i_w_ids=[0,0] i_ids=[1001,1002] w_id=0 i_w_ids=[0,0] i_ids=[1001,1002] GetWarehouse: Input Parameters:
Step #2: Determine which optimizati ons to enable in the DBMS.
Optimizations: +1 w_id=0 i_w_ids=[0,0] i_ids=[1001,1002] w_id=0 i_w_ids=[0,0] i_ids=[1001,1002] Best Partition? Touched Partitions? Finished Partitions? Input Parameters:
SELECT S_QTY FROM STOCK WHERE S_W_ID = ? AND S_I_ID = ?; Current State X w_id=0 i_w_ids=[0,1] i_ids=[1001,1002] w_id=0 i_w_ids=[0,1] i_ids=[1001,1002] CheckStock: Input Parameters: INSERT INTO ORDERS (o_id, o_w_id) VALUES (?, ?); INSERT INTO ORDERS (o_id, o_w_id) VALUES (?, ?); InsertOrder:
November 9, 2011
=2 w_id=0 i_w_ids=[0,1] i_ids=[1001,1002] w_id=0 i_w_ids=[0,1] i_ids=[1001,1002] =1 =2 ArrayLength(i_ w_ids) =1 =0 HashValue(w_id )
SELECT S_QTY FROM STOCK WHERE S_W_ID = ? AND S_I_ID = ?; w_id=0 i_w_ids=[0,1] i_ids=[1001,1002] w_id=0 i_w_ids=[0,1] i_ids=[1001,1002] CheckStock: Input Parameters:
Evaluat ion Experimen tal
AccuracyOverhead TATP TPC-C AuctionM 94.9% 95.0% 90.2% +1.86% +1.17% +8.15%
TATPTPC-CAuctionM (txn/s) +57%+126%+117% HoudiniAssume Single-Partitioned
Scaling your OLTP DBMS must come from within. Conclusio n:
November 9, 2011