Exploiting Distributed Version Concurrency in a Transactional Memory Cluster Kaloian Manassiev, Madalin Mihailescu and Cristiana Amza University of Toronto,

Slides:



Advertisements
Similar presentations
Types of Distributed Database Systems
Advertisements

Concurrency Control III. General Overview Relational model - SQL Formal & commercial query languages Functional Dependencies Normalization Physical Design.
Optimistic Methods for Concurrency Control By : H.T. Kung & John T. Robinson Presenters: Munawer Saeed.
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
School of Information Technologies Hyungsoo Jung (presenter) Hyuck Han* Alan Fekete Uwe Röhm Serializable Snapshot Isolation for Replicated Databases in.
Relaxed Consistency Models. Outline Lazy Release Consistency TreadMarks DSM system.
Concurrency Control II. General Overview Relational model - SQL  Formal & commercial query languages Functional Dependencies Normalization Physical Design.
Helper Threads via Virtual Multithreading on an experimental Itanium 2 processor platform. Perry H Wang et. Al.
1 Cheriton School of Computer Science 2 Department of Computer Science RemusDB: Transparent High Availability for Database Systems Umar Farooq Minhas 1,
Using DSVM to Implement a Distributed File System Ramon Lawrence Dept. of Computer Science
Middleware based Data Replication providing Snapshot Isolation Yi Lin Bettina Kemme Marta Patiño-Martínez Ricardo Jiménez-Peris June 15, 2005.
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
1 Lecture 12: Hardware/Software Trade-Offs Topics: COMA, Software Virtual Memory.
November 1, 2005Sebastian Niezgoda TreadMarks Sebastian Niezgoda.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 16 – Intro. to Transactions.
1 Johannes Schneider Transactional Memory: How to Perform Load Adaption in a Simple And Distributed Manner Johannes Schneider David Hasenfratz Roger Wattenhofer.
Transaction Management and Concurrency Control
Language Support for Lightweight transactions Tim Harris & Keir Fraser Presented by Narayanan Sundaram 04/28/2008.
Unbounded Transactional Memory Paper by Ananian et al. of MIT CSAIL Presented by Daniel.
Overview  Strong consistency  Traditional approach  Proposed approach  Implementation  Experiments 2.
DTHREADS: Efficient Deterministic Multithreading
Recovery Techniques in Distributed Databases Naveen Jones December 5, 2011.
Design and Implementation of a Single System Image Operating System for High Performance Computing on Clusters Christine MORIN PARIS project-team, IRISA/INRIA.
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
Database Replication Policies for Dynamic Content Applications Gokul Soundararajan, Cristiana Amza, Ashvin Goel University of Toronto EuroSys 2006: Leuven,
Distributed Shared Memory: A Survey of Issues and Algorithms B,. Nitzberg and V. Lo University of Oregon.
VLDB2012 Hoang Tam Vo #1, Sheng Wang #2, Divyakant Agrawal †3, Gang Chen §4, Beng Chin Ooi #5 #National University of Singapore, †University of California,
Data Warehousing 1 Lecture-24 Need for Speed: Parallelism Virtual University of Pakistan Ahsan Abdullah Assoc. Prof. & Head Center for Agro-Informatics.
1 Moshe Shadmon ScaleDB Scaling MySQL in the Cloud.
Scaling Dynamic Content Applications through Data Replication - Opportunities for Compiler Optimizations Cristiana Amza UofT.
Evaluating FERMI features for Data Mining Applications Masters Thesis Presentation Sinduja Muralidharan Advised by: Dr. Gagan Agrawal.
Consistent and Efficient Database Replication based on Group Communication Bettina Kemme School of Computer Science McGill University, Montreal.
1 CS 430 Database Theory Winter 2005 Lecture 16: Inside a DBMS.
Towards a Billion Routing Lookups per Second in Software  Author: Marko Zec, Luigi, Rizzo Miljenko Mikuc  Publisher: SIGCOMM Computer Communication Review,
TECHNIQUES FOR REDUCING CONSISTENCY- RELATED COMMUNICATION IN DISTRIBUTED SHARED-MEMORY SYSTEMS J. B. Carter University of Utah J. K. Bennett and W. Zwaenepoel.
Retrospective computation makes past states available inline with current state in a live system What is the language for retrospective computation? What.
An Efficient Lock Protocol for Home-based Lazy Release Consistency Electronics and Telecommunications Research Institute (ETRI) 2001/5/16 HeeChul Yun.
Preventive Replication in Database Cluster Esther Pacitti, Cedric Coulon, Patrick Valduriez, M. Tamer Özsu* LINA / INRIA – Atlas Group University of Nantes.
1 Lecture 12: Hardware/Software Trade-Offs Topics: COMA, Software Virtual Memory.
Database Replication in Tashkent CSEP 545 Transaction Processing Sameh Elnikety.
1 Admission Control and Request Scheduling in E-Commerce Web Sites Sameh Elnikety, EPFL Erich Nahum, IBM Watson John Tracey, IBM Watson Willy Zwaenepoel,
Optimistic Methods for Concurrency Control By: H.T. Kung and John Robinson Presented by: Frederick Ramirez.
1 Multiversion Reconciliation for Mobile Databases Shirish Hemanath Phatak & B.R.Badrinath Presented By Presented By Md. Abdur Rahman Md. Abdur Rahman.
Database Replication in WAN Yi Lin Supervised by: Prof. Kemme April 8, 2005.
DynamicMR: A Dynamic Slot Allocation Optimization Framework for MapReduce Clusters Nanyang Technological University Shanjiang Tang, Bu-Sung Lee, Bingsheng.
1/12 Distributed Transactional Memory for Clusters and Grids EuroTM, Paris, May 20th, 2011 Michael Schöttner.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 16 – Intro. to Transactions.
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.
Hathi: Durable Transactions for Memory using Flash
Lecture 20: Consistency Models, TM
Concurrency Control Techniques
Faster Data Structures in Transactional Memory using Three Paths
Introduction to NewSQL
Chapter Overview Understanding the Database Architecture
Albatross: Lightweight Elasticity in Shared Storage Databases for the Cloud using Live Data Migration Sudipto Das1, Shoji Nishimura2, Divyakant Agrawal1,
Lecture 19: Transactional Memories III
Predictive Performance
Trafodion Distributed Transaction Management
Lecture 6: Transactions
Consistent Data Replication: Is it feasible in WANs?
Lecture 21: Transactional Memory
Admission Control and Request Scheduling in E-Commerce Web Sites
Lecture 22: Consistency Models, TM
Hybrid Transactional Memory
Concurrency Control E0 261 Prasad Deshpande, Jayant Haritsa
Performance And Scalability In Oracle9i And SQL Server 2000
Lecture 23: Transactional Memory
Lecture 21: Transactional Memory
Lecture: Transactional Memory
The Gamma Database Machine Project
Presentation transcript:

Exploiting Distributed Version Concurrency in a Transactional Memory Cluster Kaloian Manassiev, Madalin Mihailescu and Cristiana Amza University of Toronto, Canada

Transactional Memory Programming Paradigm Each thread executing a parallel region:  Announces start of a transaction  Executes operations on shared objects  Attempts to commit the transaction If no data race, commit succeeds, operations take effect Otherwise commit fails, operations discarded, transaction restarted  Simpler than locking!

Transactional Memory  Used in multiprocessor platforms  Our work: the first TM implementation on a cluster Supports both SQL and parallel scientific applications (C++)

TM in a Multiprocessor Node  Multiple physical copies of data  High memory overhead A Copy of A T1: Read(A) T2: Write(A) T1: Active T2: Active

TM on a Cluster Key Idea 1. Distributed Versions  Different versions of data arise naturally in a cluster  Create new version on different node, others read own versions writeread

Exploiting Distributed Page Versions mem0 txn0 mem1 txn1 mem2 txn2 memN txnN network... Distributed Transactional Memory (DTM) v3v2v1v0

Key Idea 2: Concurrent “Snapshots” Inside Each Node read v1 v2 Txn0 (v1) Txn1 (v2)

Key Idea 2: Concurrent “Snapshots” Inside Each Node read v1 v2 Txn0 (v1) Txn1 (v2) v1 v2

Key Idea 2: Concurrent “Snapshots” Inside Each Node read v1 v2 Txn0 (v1) Txn1 (v2) v1 v2

Distributed Transactional Memory A novel fine-grained distributed concurrency control algorithm Low memory overhead Exploits distributed versions Supports multithreading within the node Provides 1-copy serializability

Outline  Programming Interface  Design Data access tracking Data replication Conflict resolution  Experiments  Related work and Conclusions

Programming Interface  init_transactions()  begin_transaction()  allocate_dtmemory()  commit_transaction()  Need to declare TM variables explicitly

Data Access Tracking  DTM traps reads and writes to shared memory by either one of:  Virtual memory protection Classic page-level memory protection technique  Operator overloading in C++ Trapping reads: conversion operator Trapping writes: assignment ops (=, +=, …) & increment/decrement(++/--)

Data Replication …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n

Twin Creation …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n Wr p1 P1 Twin

Twin Creation …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n Wr p2 P1 Twin P2 Twin

Diff Creation …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n

Broadcast of the Modifications at Commit …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n Diff broadcast (vers 8) Latest Version = 7 v2v1

Other Nodes Enqueue Diffs …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n Diff broadcast (vers 8) v2v1v8 v1 Latest Version = 7

Update Latest Version …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n v2v1v8 v1 Latest Version = 7Latest Version = 8

Other Nodes Acknowledge Receipt …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n v2v1 v8v1 Ack (vers 8) v8 Latest Version = 7Latest Version = 8

T1 Commits …… Page 1 Page 2 Page n T1(UPDATE) …… Page 1 Page 2 Page n v2v1 v8v1 v8 Latest Version = 8

Lazy Diff Application... Page 1 V0 Page 2 V0 V8V1 Page N V3 V5V4 T2(V2): Rd(…, P1, P2) Latest Version = 8 V2V1V8

Lazy Diff Application... Page 1 Page 2 V0 Page N V3 V5V4 V8 V2 V8V1 T2(V2): Rd(…, P1, P2) Latest Version = 8

Lazy Diff Application... Page 1 V2 V8 Page 2 V1 V8 Page N V3 V5V4 T2(V2): Rd(…, P1, P2) Latest Version = 8

Lazy Diff Application... Page 1 V2 V8 Page 2 V1 V8 Page N V3 V5V4 T3(V8): Rd(PN) T2(V2): Rd(…, P1, P2) Latest Version = 8

Lazy Diff Application... Page 1 V2 V8 Page 2 V1 V8 Page N V5 T3(V8): Rd(PN) T2(V2): Rd(…, P1, P2) Latest Version = 8

Waiting Due to Conflict T3(V8): Rd(PN, P2)... Page 1 V2 V8 Page 2 V1 V8 Page N V5 T2(V2): Rd(…, P1, P2) Wait until T2 commits Latest Version = 8

Transaction Abort Due to Conflict... Page 1 Page 2 V0 Page N V3 V5V4 V8 V2 V8V1 T3(V8): Rd(P2) T2(V2): Rd(…, P1, P2) Latest Version = 8

Transaction Abort Due to Conflict... Page 1 Page 2 V8 Page N V3 V5V4 V8 V2 T3(V8): Rd(P2) CONFLICT! T2(V2): Rd(…, P1, P2) Latest Version = 8

Write-Write Conflict Resolution  Can be done in two ways Executing all updates on a master node, which enforces serialization order OR Aborting the local update transaction upon receiving a conflicting diff flush  More on this in the paper

Experimental Platform  Cluster of Dual AMD Athlon Computers 512 MB RAM 1.5GHz CPUs RedHat Fedora Linux OS

Benchmarks for Experiments  TPC-W e-commerce benchmark Models an on-line book store Industry-standard workload mixes  Browsing (5% updates)  Shopping (20% updates)  Ordering (50% updates) Database size of ~600MB  Hash-table micro-benchmark (in paper)

Application of DTM for E-Commerce

We use a Transactional Memory Cluster as the DB Tier

Cluster Architecture

Implementation Details  We use MySQL’s in-memory HEAP tables RB-Tree main-memory index No transactional properties  Provided by inserting TM calls  Multiple threads running on each node

Baseline for Comparison  State-of-the-art Conflict-aware protocol for scaling e-commerce on clusters Coarse grained (per-table) concurrency control (USITS’03, Middleware’03)

Throughput Scaling

Fraction of Aborted Transactions # of slavesOrderingShoppingBrowsing 11.15%1.44%0.63% 20.35%2.27%1.34% 40.07%1.70%2.37% 60.02%0.41%2.07% 80.00%0.22%1.59%

Comparison (browsing)

Comparison (shopping)

Comparison (ordering)

Related Work  Distributed concurrency control for database applications Postgres-R(SI), Wu and Kemme (ICDE’05) Ganymed, Plattner and Alonso (Middleware’04)  Distributed object stores Argus (’83), QuickStore (’94), OOPSLA’03  Distributed Shared Memory TreadMarks, Keleher et al. (USENIX’94) Tang et al. (IPDPS’04)

Conclusions  New software-only transactional memory scheme on a cluster Both strong consistency and scaling  Fine-grained distributed concurrency control Exploits distributed versions, low memory overheads  Improved throughput scaling for e- commerce web sites

Questions?

Backup slides

Example Program #include typedef struct Point { dtm_int x; dtm_int y; } Point; init_transactions(); for (int i = 0; i < 10; i++) { begin_transaction(); Point * p = allocate_dtmemory(); p->x = rand(); p->y = rand(); commit_transaction(); }

Query weights

Decreasing the fraction of aborts

Micro benchmark experiments

Micro benchmark experiments (with read-only optimization)

Fraction of aborts # of machines % aborts