The SNOW Theorem and Latency-Optimal Read-Only Transactions

Slides:



Advertisements
Similar presentations
Wyatt Lloyd * Michael J. Freedman * Michael Kaminsky David G. Andersen * Princeton, Intel Labs, CMU Dont Settle for Eventual : Scalable Causal Consistency.
Advertisements

Transactional storage for geo-replicated systems Yair Sovran, Russell Power, Marcos K. Aguilera, Jinyang Li NYU and MSR SVC.
Impossibilities for Disjoint-Access Parallel Transactional Memory : Alessia Milani [Guerraoui & Kapalka, SPAA 08] [Attiya, Hillel & Milani, SPAA 09]
Transaction chains: achieving serializability with low-latency in geo-distributed storage systems Yang Zhang Russell Power Siyuan Zhou Yair Sovran *Marcos.
Principles of Transaction Management. Outline Transaction concepts & protocols Performance impact of concurrency control Performance tuning.
High throughput chain replication for read-mostly workloads
Author: Yang Zhang[SOSP’ 13] Presentator: Jianxiong Gao.
1 Database Replication Using Generalized Snapshot Isolation Sameh Elnikety, EPFL Fernando Pedone, USI Willy Zwaenepoel, EPFL.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
Sinfonia: A New Paradigm for Building Scalable Distributed Systems Marcos K. Aguilera, Arif Merchant, Mehul Shah, Alistair Veitch, Christonos Karamanolis.
Persistent State Service 1 Distributed Object Transactions  Transaction principles  Concurrency control  The two-phase commit protocol  Services for.
Signature Based Concurrency Control Thomas Schwarz, S.J. JoAnne Holliday Santa Clara University Santa Clara, CA 95053
Client-Server Caching James Wann April 4, Client-Server Architecture A client requests data or locks from a particular server The server in turn.
GentleRain: Cheap and Scalable Causal Consistency with Physical Clocks Jiaqing Du | Calin Iorgulescu | Amitabha Roy | Willy Zwaenepoel École polytechnique.
Rococo: Extract more concurrency from distributed transactions
Low-Latency Multi-Datacenter Databases using Replicated Commit
TRANSACTIONS AND CONCURRENCY CONTROL Sadhna Kumari.
AN OPTIMISTIC CONCURRENCY CONTROL ALGORITHM FOR MOBILE AD-HOC NETWORK DATABASES Brendan Walker.
CS162 Section Lecture 10 Slides based from Lecture and
Transaction Communications Yi Sun. Outline Transaction ACID Property Distributed transaction Two phase commit protocol Nested transaction.
PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R.
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
Concurrency Control. Objectives Management of Databases Concurrency Control Database Recovery Database Security Database Administration.
Eiger: Stronger Semantics for Low-Latency Geo-Replicated Storage Wyatt Lloyd * Michael J. Freedman * Michael Kaminsky † David G. Andersen ‡ * Princeton,
Improving Disk Throughput in Data-Intensive Servers Enrique V. Carrera and Ricardo Bianchini Department of Computer Science Rutgers University.
Haonan Lu*†, Kaushik Veeraraghavan†, Philippe Ajoux†, Jim Hunt†,
Oracle Database Architecture By Ayesha Manzer. Automatic Storage Management Spreads database data across all disks Creates and maintains a storage grid.
An Architecture for Mobile Databases By Vishal Desai.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Minimizing Commit Latency of Transactions in Geo-Replicated Data Stores Paper Authors: Faisal Nawab, Vaibhav Arora, Divyakant Argrawal, Amr El Abbadi University.
1 Concurrency Control. 2 Why Have Concurrent Processes? v Better transaction throughput, response time v Done via better utilization of resources: –While.
CPS 512/590 final exam, 12/8/2015 /60 Your name please: /50 /50 /60
MDCC: Multi-data Center Consistency
Shuai Mu, Lamont Nelson, Wyatt Lloyd, Jinyang Li
The CAT Theorem Shegufta Ahsan, Indranil Gupta
a journey from the simple to the optimal
Alternative system models
Operational & Analytical Database
CPS 512 midterm exam #1, 10/7/2016 Your name please: ___________________ NetID:___________ /60 /40 /10.
Database Systems (資料庫系統)
Spanner: Google’s Globally-Distributed Database
Distributed Transactions and Spanner
The SNOW Theorem and Latency-Optimal Read-Only Transactions
Consistency in Distributed Systems
MVCC and Distributed Txns (Spanner)
EECS 498 Introduction to Distributed Systems Fall 2017
EECS 498 Introduction to Distributed Systems Fall 2017
I Can’t Believe It’s Not Causal
EECS 498 Introduction to Distributed Systems Fall 2017
Concurrency Control II (OCC, MVCC)
March 9th – Transactions
EECS 498 Introduction to Distributed Systems Fall 2017
Lecture 21: Concurrency & Locking
EECS 498 Introduction to Distributed Systems Fall 2017
Fast Conflict Detection for
Scalable Causal Consistency
Lecture 21: Replication Control
Atomic Commit and Concurrency Control
Concurrency Control II and Distributed Transactions
Lecture 20: Intro to Transactions & Logging II
Decoupled Storage: “Free the Replicas!”
The SNOW Theorem and Latency-Optimal Read-Only Transactions
Lecture 22: Intro to Transactions & Logging IV
COS 418: Distributed Systems Lecture 16 Wyatt Lloyd
Transaction Management
Lecture 21: Replication Control
Concurrency Control.
Concurrency control (OCC and MVCC)
Database Systems (資料庫系統)
Database Systems (資料庫系統)
Presentation transcript:

The SNOW Theorem and Latency-Optimal Read-Only Transactions Haonan Lu❄, Christopher Hodsdon❄, Khiem Ngo❄, Shuai Mu†, Wyatt Lloyd❄ ❄University of Southern California, †New York University

Huge Web Services Shard Data Massive amount of data  must be distributed across servers Reads dominate the workloads – need to be as fast as possible!

Simple Reads Are Insufficient Datacenter Web Storage Tier Load Page Clients Servers Read Public ACL=private ACL=public Read Photo B Set “Private” Photo B Done Not Acceptable! Private Photo B Done Photo B Done Photo=A Photo=B

Read-Only Transactions Transactions that do not modify data Consistently read data across servers

The Power of Read-Only Txn Consistency restricts what can be read Eliminates unacceptable combinations Compatibility enables write transactions Write transactions atomically update data Higher power  more useful Stronger consistency  higher power Compatibility  higher power

highest power + lowest latency is impossible Intuitive Tension Fundamental Tradeoff High Power Low Latency Reduces anomalies (the ACL – Photo example) Better user experience Easier to reason about Higher revenue Our study proves: highest power + lowest latency is impossible

The SNOW Properties [S]trict serializability [N]on-blocking operations [O]ne response per read [W]rite transactions that conflict Highest Power Lowest Latency

[S]trict Serializability Strongest model: real-time + total order CR SACL SPhoto CW ACL := Private Upload Photo B W starts Private “Photo B is private!” Photo B W finishes R starts R finishes

[S]trict Serializability Strongest model: real-time + total order CR SACL SPhoto CW W starts R starts Photo B ACL := Private Upload Photo B “Public + Photo A” “Photo B is private!” Private “Public + Photo B” “Photo A is private!” W finishes R finishes

[N]on-blocking Operations Do not wait on external events Locks, timeouts, messages, etc. Lower latency Save the time spent blocking

[O]ne Response One round-trip One value per response No message redirection Centralized components: coordinator, etc. No retries Save the time for extra round-trips One value per response Less time for transmitting, marshaling, etc.

[W]rite Transactions That Conflict Compatible with write transactions Richer system model Easier to program

The SNOW Theorem: Impossible for read-only transaction algorithms to have all SNOW properties

Why SNOW Is Impossible CW SA SB CR W starts A := new B := new R Assume SNOW  R W invisible Violates property S T W visible RA = new RB = old W finishes

A Deeper Look at SNOW Complete proof in the paper SNOW is tight Any combination of 3 properties is possible Optimality SNOW-optimal: have any 3 properties Latency-optimal: have property N and O Spectrums of property S and O Show what is possible to achieve

Study Existing Systems with SNOW SNOW-optimal and latency-optimal Spanner-Snap [OSDI’12] ✖ ✔ Yesquel [SOSP’15] MySQL Cluster Spanner-Snap [OSDI ’12] ✖ ✔ ✔ ✔ Yesquel [SOSP ’15] ✖ ✔ ✔ ✔ MySQL Cluster ✖ ✔ ✔ ✔

Study Existing Systems with SNOW SNOW-optimal Eiger [NSDI ’13] ✔ ≤ 3 DrTM [SOSP ’15] ≥ 1 RIFL [SOSP ’15] ≥ 2 Sinfonia [SOSP ’07] Spanner-RO [OSDI ’12] ✖ ✔ ✖ ✔ ✔

Study Existing Systems with SNOW Candidates for Improvement COPS ✖ ✔ ≤ 2 Rococo > 1 Many more

Improve Existing Systems with the SNOW Theorem COPS [SOSP ’11] Geo-replicated Causally consistent Read-only txn Rococo [OSDI ’14] Supports general transactions Strictly serializable : S N O W : S N O W

New Algorithm Designs COPS-SNOW Rococo-SNOW Latency-optimal (N + O) Rococo-SNOW SNOW-optimal (S + O + W) Design insight for optimizing reads: shift the overhead to writes

Rococo’s Read-Only Txn (S + W) CR SA SB CW W starts A := “new” B := “new” R: 1st round Gather conflict info A=“old” EQUAL ? Blocks W commits B=“new” R: 2nd round W finishes R: Nth round

Strictly Serializable Rococo-SNOW (S+O+W) CR SA SB CW W starts R TS A := “new” B := “new” TS A=“old” Strictly Serializable Forward TS Blocks W commits TS B=“old” A=old B=old W finishes

Evaluation of Rococo-SNOW To understand Latency of read-only transactions Throughput of other types of transactions Experiment configuration Identical to Rococo’s TPC-C workloads https://github.com/USC-NSL/Rococo-SNOW

Significantly Lower Latency for Read-Only Txn OCC Lock Wait Retries Always 1 round Rococo 2PL High Contention Rococo -SNOW

Higher Throughput under High Contention Rococo -SNOW Rococo -14% throughput (Low Contention) 2X throughput (High Contention) High Contention 2PL OCC

Conclusion The SNOW Theorem for read-only txns Impossible to have all of the SNOW properties SNOW helps understand existing systems Many are not yet optimal Rococo-SNOW SNOW Theorem guided SNOW-optimal design Significantly higher throughput and lower latency under high contention