Tianzheng Wang Ryan Johnson Alan Fekete Ippokratis Pandis The Serial Safety Net: Efficient concurrency control on modern hardware 1.

Slides:



Advertisements
Similar presentations
@ Carnegie Mellon Databases Data-oriented Transaction Execution VLDB 2010 Ippokratis Pandis Ryan Johnson Nikos Hardavellas Anastasia Ailamaki Carnegie.
Advertisements

Serializability in Multidatabases Ramon Lawrence Dept. of Computer Science
Database Systems (資料庫系統)
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 16.
1 Concurrency Control Chapter Conflict Serializable Schedules  Two actions are in conflict if  they operate on the same DB item,  they belong.
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos – A. Pavlo Lecture#23: Concurrency Control – Part 3 (R&G.
Principles of Transaction Management. Outline Transaction concepts & protocols Performance impact of concurrency control Performance tuning.
Concurrency Control II
School of Information Technologies Hyungsoo Jung (presenter) Hyuck Han* Alan Fekete Uwe Röhm Serializable Snapshot Isolation for Replicated Databases in.
Concurrency Control Amol Deshpande CMSC424. Approach, Assumptions etc.. Approach  Guarantee conflict-serializability by allowing certain types of concurrency.
Presented by Dr. Greg Speegle.  Concurrency Control  Multiple Versions  Version number timestamp of writing transaction  Read last committed value.
Concurrency Control II. General Overview Relational model - SQL  Formal & commercial query languages Functional Dependencies Normalization Physical Design.
1 CS216 Advanced Database Systems Shivnath Babu Notes 11: Concurrency Control.
Presented by, MySQL & O’Reilly Media, Inc. Falcon from the Beginning Jim Starkey
1 ICS 214B: Transaction Processing and Distributed Data Management Lecture 6: Cascading Rollbacks, Deadlocks, and Long Transactions Professor Chen Li.
Concurrency Control and Recovery In real life: users access the database concurrently, and systems crash. Concurrent access to the database also improves.
Concurrency Control R &G - Chapter 19 Smile, it is the key that fits the lock of everybody's heart. Anthony J. D'Angelo, The College Blue Book.
1 Johannes Schneider Transactional Memory: How to Perform Load Adaption in a Simple And Distributed Manner Johannes Schneider David Hasenfratz Roger Wattenhofer.
1 Anna Östlin Pagh and Rasmus Pagh IT University of Copenhagen Advanced Database Technology April 1, 2004 CONCURRENCY CONTROL Lecture based on [GUW, ,
1 Transaction Management Overview Yanlei Diao UMass Amherst March 15, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Concurrency Control John Ortiz.
CS4432transaction management1 CS4432: Database Systems II Lecture #23 Transaction Management Professor Elke A. Rundensteiner.
Concurrency Control R &G - Chapter 19 Smile, it is the key that fits the lock of everybody's heart. Anthony J. D'Angelo, The College Blue Book.
1 Concurrency Control. 2 Transactions A transaction is a list of actions. The actions are reads (written R T (O)) and writes (written W T (O)) of database.
Alternative Concurrency Control Methods R&G - Chapter 17.
CS 603 Data Replication February 25, Data Replication: Why? Fault Tolerance –Hot backup –Catastrophic failure Performance –Parallelism –Decreased.
1 Concurrency Control. 2 Transactions A transaction is a list of actions. The actions are reads (written R T (O)) and writes (written W T (O)) of database.
Concurrency Control In Dynamic Database Systems Laurel Jones.
Academic Year 2014 Spring Academic Year 2014 Spring.
CMU SCS Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications C. Faloutsos – A. Pavlo Lecture#23: Concurrency Control – Part 3 (R&G.
Simple Wait-Free Snapshots for Real-Time Systems with Sporadic Tasks Håkan Sundell Philippas Tsigas.
1 Transaction Management Overview Chapter Transactions  Concurrent execution of user programs is essential for good DBMS performance.  Because.
Task Scheduling for Highly Concurrent Analytical and Transactional Main-Memory Workloads Iraklis Psaroudakis (EPFL), Tobias Scheuer (SAP AG), Norman May.
Silo: Speedy Transactions in Multicore In-Memory Databases
Concurrency control in transactional systems Jinyang Li Some slides adapted from Stonebraker and Madden.
School of Information Technologies Michael Cahill 1, Uwe Röhm and Alan Fekete School of IT, University of Sydney {mjc, roehm, Serializable.
CS 245Notes 101 CS 245: Database System Principles Notes 10: More TP Hector Garcia-Molina.
WG5: Applications & Performance Evaluation Pascal Felber
Towards Dynamic Green-Sizing for Database Servers Mustafa Korkmaz, Alexey Karyakin, Martin Karsten, Kenneth Salem University of Waterloo.
Transaction Management for XML Taro L. Saito Department of Information Science University of Tokyo
1 Concurrency Control Chapter Conflict Serializable Schedules  Two schedules are conflict equivalent if:  Involve the same actions of the same.
Transactions and Concurrency Control. Concurrent Accesses to an Object Multiple threads Atomic operations Thread communication Fairness.
Transaction Management Overview. Transactions Concurrent execution of user programs is essential for good DBMS performance. – Because disk accesses are.
1 CSE 480: Database Systems Lecture 24: Concurrency Control.
1 Database Systems ( 資料庫系統 ) December 27/28, 2006 Lecture 13 Merry Christmas & New Year.
Database Isolation Levels. Reading Database Isolation Levels, lecture notes by Dr. A. Fekete, resentation/AustralianComputer.
On Transactional Memory, Spinlocks and Database Transactions Khai Q. Tran Spyros Blanas Jeffrey F. Naughton (University of Wisconsin Madison)
Jinze Liu. ACID Atomicity: TX’s are either completely done or not done at all Consistency: TX’s should leave the database in a consistent state Isolation:
Don’t be lazy, be consistent: Postgres-R, A new way to implement Database Replication Paper by Bettina Kemme and Gustavo Alonso, VLDB 2000 Presentation.
Relaxed Currency Serializability for Middle-Tier Caching and Replication Philip A. Bernstein, Alan Fekete, Hongfei Guo, Raghu Ramakrishnan, Pradeep Tamma.
Algorithmic Improvements for Fast Concurrent Cuckoo Hashing
Combining HTM and RCU to Implement Highly Efficient Balanced Binary Search Trees Dimitrios Siakavaras, Konstantinos Nikas, Georgios Goumas and Nectarios.
Concurrency Control Techniques
LogSI-HTM: Log Based Snapshot Isolation in
T. Ragunathan and P. Krishna Reddy
Concurrency control in transactional systems
Transaction Properties
4. Concurrency control techniques
Concurrency Control Chapter 17
Lecture 21: Concurrency & Locking
Arash Tavakkol, Mohammad Sadrosadati, Saugata Ghose,
Hassium: Hardware Assisted Database Synchronization
Concurrency Control Chapter 17
Lecture 21: Intro to Transactions & Logging III
Lecture 22: Intro to Transactions & Logging IV
Transaction Management
A Masters view on Locking and blocking
Database Systems (資料庫系統)
Presentation transcript:

Tianzheng Wang Ryan Johnson Alan Fekete Ippokratis Pandis The Serial Safety Net: Efficient concurrency control on modern hardware 1

Modern HW: CPU on critical path 2  Low parallelism  Focus: hide I/O stalls Classic DBMS Modern DBMS  High parallelism  Focus: minimize cycles Main-memory OLTP: more pressure on CC LocksDisksThreadsMemoryDiskThreads

CC: current state of the art OCC (fast) SI (non-serializable) SSI (slow) OCC looks good. What’s the problem? Contentious TPC-C variant

CC: Robustness matters! 4 OCC (unfair) SI (non-serializable) SSI (slow) Need all three: fast, fair, serializable Contentious TPC-C variant with retries

The Serial Safety Net (SSN) 5 Some CC >= RC SSN Serializable execution Might admit anomalies Cheap certifier Works even if CC is buggy Aborts offenders Dictates access pattern

SSN: fast, fair, serializable 6 OCC SI SSI SSN

Database model 7 R1 R2 R3 R4... R3 Uncommitted write Invisible to other readers Multi-version database R1 CC decides which version to read Captures most CC schemes, incl. 2PL

Serialization graphs and cycles T1 r:y:w T2 w:x:r T3 r:x:w T1 T1 T2 T3 x y x T2 T1 (T3) commit time dependency order T1r(x,0)r(y,0)w(x,-11)C!! T2r(y,0)w(y,10)C!! T3r(x,0)r(y,10)C!! 8 SI read-only anomaly

T3 T2 T1 (T3) commit time dependency order Serialization graphs and cycles T1 commits last & “closes” the cycle “Hard” to detect T1  T3 “Easy” to detect T3  T1 SSN: efficiently detect T1  T3 9

“exclusion window” of T SSN in a nutshell 10 Define π(T) = min { c(S) : T  S } Define c(T) = “commit time of T” Forbid  P  T : π(T) ≤ c(P) ≤ c(T) Track T’s earliest successor P might be a successor of T T might close a cycle

Visualizing SSN 11 Exclusion window satisfied T4 T1 π(T4) T2 T3 commit time dependency order π(T2) T5 T1 T4 T3 T2 (T1) T3 T4 T1 T2 π(T2) T2 T1 ?? π(T2) Exclusion window violation

Evaluation System – 4 x 6-core 1.8GHz, 64GB DRAM – A variant of Silo* that supports SI and RC – TPC-C w/ random warehouse selection – RC, SI, OCC (Silo), SSI, {SI, RC} + SSN – What to test – General performance/scalability – Fairness for updates vs. reads – Robustness under retries 12 * Tu et al, “Speedy transactions in multicore in-memory databases”, SOSP`13

SSN performs well 13 Higher is better SSI OCC Low implementation overhead

SSN has low abort rate 14 Lower is better OCC SI (higher) and RC/SI+SSN SSI SSN allows more valid schedules than SSI or OCC

SSN provides “safe retry” 15 OCC SI (highest) and RC/SI+SSN SSI Higher is better

SSN is fair 16 SSI starves writers OCC starves readers SSN fair to both R & W Ideal OCC SSI SI SI+SSN RC+SSN

Conclusion Modern HW puts more pressure on CC – No tolerance for CC with “heavy touch” – Serializability becomes even harder Serial safety net – a cheap certifier – Serializable – Compatible with various CC schemes – Lightweight and balanced 17 Formal proofs (+ more details) in our paper Thank you!