We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published bySydnie Caples
Modified over 2 years ago
Improving OLTP scalability using speculative lock inheritance Ryan Johnson, Ippokratis Pandis, Anastasia Ailamaki
© 2009 Ryan Johnson 2 OLTP scalability limitations Application: scalable Hardware: scalable Storage manager? –Good at interleaving threads –True concurrency is harder => Increased latch contention Contention within storage manager limits scalability
© 2009 Ryan Johnson 3 Contention in the lock manager Centralized service –Locks managed globally Fine-grained parallelism –Each lock has its own latch Skewed access –Some hotter than others Culprit: shared high-level locks %11%48%67%86%98% System load LM Contention Other Contention LM Overhead Computation Per-thread work breakdown
© 2009 Ryan Johnson 4 Contributions Identify lock manager bottleneck –Latch contention during lock state updates Eliminate most requests for hot locks –Pass hot locks directly between transactions –No changes at application level Improve throughput by 20-50%
© 2009 Ryan Johnson 5 In this talk… Introduction Inside the lock manager –Locking vs. latching –Lock acquire and release –Approaches for reducing overheads Speculative lock inheritance Conclusions
© 2009 Ryan Johnson 6 Overview of latching vs. locking Latches outnumber lock operations 5:1 or more LatchLock SerializesCode segmentsTransactions ProtectsData structuresDatabase records DurationShortLong # Held at once0-2Unbounded ImplementationStraightforwardComplex
© 2009 Ryan Johnson 7 Inside the lock manager - acquire Lock Manager L2 Lock Request Lock Head L1 L3 Lock ID Hash Table T1 Transaction Head Requirements Find/create many locks in parallel Each lock tracks many requests Each transaction tracks many locks
© 2009 Ryan Johnson 8 Inside the lock manager - release Intent locks => long request chains IS S IXIS release() upgrade(IX) … … B Process upgrades C Grant new requests A Compute new lock mode (supremum) Lock strengths IS < IX < S
© 2009 Ryan Johnson 9 In this talk… Introduction Inside the lock manager Speculative lock inheritance –Approach and implementation –Experimental results Conclusions
© 2009 Ryan Johnson 10 Speculative lock inheritance Lock Manager trx 1 trx 2 trx 3 Agent thread execution Hot locks bounce between agents and LM Hot lock Cold lock
© 2009 Ryan Johnson 11 Speculative lock inheritance Lock Manager trx 1 trx 2 trx 3 Agent thread keeps hot locks, bypasses lock manager Agent thread execution Hot lock Cold lock
© 2009 Ryan Johnson 12 Criteria for lock inheritance Hot (latch contention) Held in shared mode No other trx waiting (fairness) Not row-level (too many of those) Parent (if any) also eligible
© 2009 Ryan Johnson 13 Avoiding starvation Held Inactive Invalid eligible && !waiting waiter arrives inherit discard Speculation is lightweight, non-intrusive Update lock requests using atomic ops sidestep the lock manager clean up invalid requests lazily
© 2009 Ryan Johnson 14 Breakdown of lock behavior row-level 34% cold 27% unused 15% missed 10% invalidated 6% exclusive 3% used 4% A few locks cause 97% of contention
© 2009 Ryan Johnson 15 Experimental setup Hardware –Sun T5220 “Niagara II” (sparcv9-solaris10) –16 pipelines, 64 contexts, 64GB RAM Software –Shore-MT –Extended to include lock inheritance Benchmarks (mem-resident) –Telecom: Nokia Benchmark (NDBB) –Banking: TPC-B –Online Sales: TPC-C
© 2009 Ryan Johnson 16 Scalability comparison Eliminate contention with low overhead Hardware Contexts Utilized Throughput (ktps) NDBB NDBB (SLI) TPC-B (SLI) TPC-B 234% (53%) 73% (19%)
© 2009 Ryan Johnson 17 Impact of lock inheritance Lock bottleneck gone (but others may arise) 0% 20% 40% 60% 80% 100% Benchmark (Baseline vs. SLI) NDBBTPC-BTPC-C SLI Overhead LM Contention Other Contention LM Overhead Computation CPU time breakdown
© 2009 Ryan Johnson 18 Reducing overheads of locking Rdb/VMS –Distributed DBMS –Lock “carry-over” reduces network traffic DB2 “keep table lock” setting –Connection holds all table locks until close –Leads to “poor concurrency” H-Store –Single-threaded, non-interleaved execution model –No locking or latching at all
© 2009 Ryan Johnson 19 Conclusions All latches are potential bottlenecks –Even “fine-grained” ones if there’s skew Best solutions may be indirect –Sidestep hard problems –Look to distributed databases Lock inheritance eliminates one bottleneck –Distribute accesses to hot locks –Improve throughput 20-50% today –Benefit increases with more cores
© 2009 Ryan Johnson 20 Thank you!
@ Carnegie Mellon Databases Data-oriented Transaction Execution VLDB 2010 Ippokratis Pandis Ryan Johnson Nikos Hardavellas Anastasia Ailamaki Carnegie.
© 2010 Ippokratis Pandis Aether: A Scalable Approach to Logging VLDB 2010 Ryan Johnson Ippokratis Pandis Radu Stoica Manos Athanassoulis Anastasia Ailamaki.
From A to E: Analyzing TPCs OLTP Benchmarks Pınar Tözün Ippokratis Pandis* Cansu Kaynak Djordje Jevdjic Anastasia Ailamaki École Polytechnique Fédérale.
Critical Sections: Re-emerging Concerns for DBMS Ryan JohnsonIppokratis Pandis Anastasia Ailamaki Carnegie Mellon University École Polytechnique Féderale.
Addition 1’s to
Addition Facts = = =
1 Copyright © 2012, Elsevier Inc. All rights reserved. Chapter 5 Multiprocessors and Thread-Level Parallelism Computer Architecture A Quantitative Approach,
Year 6 mental test 10 second questions Numbers and number system Numbers and the number system, fractions, decimals, proportion & probability.
The Impact of Soft Resource Allocation on n-tier Application Scalability Qingyang Wang, Simon Malkowski, Yasuhiko Kanemasa, Deepal Jayasinghe, Pengcheng.
WEEK 1 You have 10 seconds to name…
Test B, 100 Subtraction Facts
$100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400.
Inferring Locks for Atomic Sections Cornell University (summer intern at Microsoft Research) Microsoft Research Sigmund CheremTrishul ChilimbiSumit Gulwani.
RTR: 1 Byte/Kilo-Instruction Race Recording Min Xu Rastislav BodikMark D. Hill.
Number bonds to 10, = = = = = = = = 10 Making 10, 20 and 100 Adding can be a lot easier.
OLTP on Hardware Islands Danica Porobic, Ippokratis Pandis*, Miguel Branco, Pınar Tözün, Anastasia Ailamaki Data-Intensive Application and Systems Lab,
Benjamin Banneker Charter Academy of Technology Making AYP Benjamin Banneker Charter Academy of Technology Making AYP.
CS252/Patterson Lec /28/01 CS162 Computer Architecture Lecture 15: Symmetric Multiprocessor: Cache Protocols L.N. Bhuyan Adapted from Pattersons.
To Share or Not to Share? Ryan Johnson Nikos Hardavellas, Ippokratis Pandis, Naju Mancheril, Stavros Harizopoulos**, Kivanc Sabirli, Anastasia Ailamaki,
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
1 Lecture 20: Synchronization & Consistency Topics: synchronization, consistency models (Sections )
ULC: An Unified Placement and Replacement Protocol in Multi-level Storage Systems Song Jiang and Xiaodong Zhang College of William and Mary.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
1 Term 2, 2004, Lecture 9, Distributed DatabasesMarian Ursu, Department of Computing, Goldsmiths College Distributed databases 3.
1 Concurrency: Deadlock and Starvation Chapter 6.
1 First EMRAS II Technical Meeting IAEA Headquarters, Vienna, 19–23 January 2009.
Making Time-stepped Applications Tick in the Cloud Tao Zou, Guozhang Wang, Marcos Vaz Salles*, David Bindel, Alan Demers, Johannes Gehrke, Walker White.
Greening Backbone Networks Shutting Off Cables in Bundled Links Will Fisher, Martin Suchara, and Jennifer Rexford Princeton University.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION 2. TAKE THE INVERSE OF THE SECOND NUMBER 3. FOLLOW THE RULES FOR ADDITION 4. ADD THE OPPOSITE.
MULTIPLICATION EQUATIONS 1. SOLVE FOR X 3. WHAT EVER YOU DO TO ONE SIDE YOU HAVE TO DO TO THE OTHER 2. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE.
Storage Manager Scalability on CMPs Ippokratis Pandis CIDR Gong Show.
Database System Concepts 5 th Ed. © Silberschatz, Korth and Sudarshan, 2005 See for conditions on re-usewww.db-book.com Chapter 16 : Concurrency.
TWO STEP EQUATIONS 1. SOLVE FOR X 3. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE 2. DO THE ADDITION STEP FIRST.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
Fast Crash Recovery in RAMCloud Diego Ongaro, Stephen M. Rumble, Ryan Stutsman, John Ousterhout, and Mendel Rosenblum Stanford University 1.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
25 seconds left….. 24 seconds left….. 23 seconds left…..
Fill in missing numbers or operations 1)10 X = 70 1)40 - = 30 1) + 10 = 30 1)20 ÷ = 2 1)2 X = 10 1) - 10 = 70 1)30 ÷ = 3 1)20 + = 60 1) + = 10 1) - = 50.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Performance, Area and Bandwidth Implications on Large-Scale CMP Cache Design Li Zhao, Ravi Iyer, Srihari Makineni, Jaideep Moses, Ramesh Illikkal, Don.
A Fractional Order (Proportional and Derivative) Motion Controller Design for A Class of Second-order Systems Center for Self-Organizing Intelligent Systems.
© 2009 EMC Corporation. All rights reserved. Data Protection: RAID Module 1.3.
KAIST Computer Architecture Lab. The Effect of Multi-core on HPC Applications in Virtualized Systems Jaeung Han¹, Jeongseob Ahn¹, Changdae Kim¹, Youngjin.
1 PART 1 ILLUSTRATION OF DOCUMENTS Brief introduction to the documents contained in the envelope Detailed clarification of the documents content.
×1= 9 4 1×1= 1 5 8×1= 8 6 7×1= 7 7 8×3= 24.
Lock Tuning. Overview Data definition language (DDL) statements are considered harmful DDL is the language used to access and manipulate catalog or metadata.
1 Senn, Information Technology, 3 rd Edition © 2004 Pearson Prentice Hall James A. Senns Information Technology, 3 rd Edition Chapter 7 Enterprise Databases.
Read-Write Lock Allocation in Software Transactional Memory Amir Ghanbari Bavarsad and Ehsan Atoofian Lakehead University.
Performance Tuning ECEN5043 Software Engineering of Multi-Program Systems University of Colorado.
© 2017 SlidePlayer.com Inc. All rights reserved.