The SNOW Theorem and Latency-Optimal Read-Only Transactions

Slides:



Advertisements
Similar presentations
Chen Zhang Hans De Sterck University of Waterloo
Advertisements

Wyatt Lloyd * Michael J. Freedman * Michael Kaminsky David G. Andersen * Princeton, Intel Labs, CMU Dont Settle for Eventual : Scalable Causal Consistency.
Principles of Transaction Management. Outline Transaction concepts & protocols Performance impact of concurrency control Performance tuning.
High throughput chain replication for read-mostly workloads
Concurrency Control Enforcing Serializability by Locks
Failure Detection The ping-ack failure detector in a synchronous system satisfies – A: completeness – B: accuracy – C: neither – D: both.
Lock-Based Concurrency Control
CS 582 / CMPE 481 Distributed Systems
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Rococo: Extract more concurrency from distributed transactions
Distributed Data Stores – Facebook Presented by Ben Gooding University of Arkansas – April 21, 2015.
Eiger: Stronger Semantics for Low-Latency Geo-Replicated Storage Wyatt Lloyd * Michael J. Freedman * Michael Kaminsky † David G. Andersen ‡ * Princeton,
Computer Science Lecture 13, page 1 CS677: Distributed OS Last Class: Canonical Problems Election algorithms –Bully algorithm –Ring algorithm Distributed.
Transactions and Concurrency Control. Concurrent Accesses to an Object Multiple threads Atomic operations Thread communication Fairness.
CAP Theorem Justin DeBrabant CIS Advanced Systems - Fall 2013.
6.894: Distributed Operating System Engineering Lecturers: Frans Kaashoek Robert Morris
Gargamel: A Conflict-Aware Contention Resolution Policy for STM Pierpaolo Cincilla, Marc Shapiro, Sébastien Monnet.
CSCI5570 Large Scale Data Processing Systems
CS 440 Database Management Systems
Shuai Mu, Lamont Nelson, Wyatt Lloyd, Jinyang Li
a journey from the simple to the optimal
Processes and Threads Processes and their scheduling
Transaction Management and Concurrency Control
Dynamo: Amazon’s Highly Available Key-value Store
The SNOW Theorem and Latency-Optimal Read-Only Transactions
Operational & Analytical Database
NOSQL.
CPS 512 midterm exam #1, 10/7/2016 Your name please: ___________________ NetID:___________ /60 /40 /10.
CSCI5570 Large Scale Data Processing Systems
6.4 Data and File Replication
Introduction to NewSQL
Chapter 19: Distributed Databases
NOSQL databases and Big Data Storage Systems
Consistency in Distributed Systems
COS 418: Advanced Computer Systems Lecture 5 Michael Freedman
Transaction Management Overview
EECS 498 Introduction to Distributed Systems Fall 2017
EECS 498 Introduction to Distributed Systems Fall 2017
I Can’t Believe It’s Not Causal
NoSQL Databases An Overview
CS 440 Database Management Systems
Concurrency Control II (OCC, MVCC)
Chapter 10 Transaction Management and Concurrency Control
Lecture 21: Concurrency & Locking
EECS 498 Introduction to Distributed Systems Fall 2017
Assignment 8 - Solution Problem 1 - We replicate database DB1.
Distributed Databases
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Prophecy: Using History for High-Throughput Fault Tolerance
Scalable Causal Consistency
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Distributed Transactions
Lecture 21: Replication Control
Replication and Availability in Distributed Systems
Atomic Commit and Concurrency Control
The SNOW Theorem and Latency-Optimal Read-Only Transactions
Distributed Systems CS
Lecture 22: Intro to Transactions & Logging IV
Transactions and Concurrency
COS 418: Distributed Systems Lecture 16 Wyatt Lloyd
Transaction Management
Temple University – CIS Dept. CIS661 – Principles of Data Management
Transaction Management Overview
Database System Architectures
EEC 688/788 Secure and Dependable Computing
Submitted to Dr. Badie Sartawi Submitted by Nizar Handal Course
Lecture 21: Replication Control
Implementing Consistency -- Paxos
Concurrency control (OCC and MVCC)
Presentation transcript:

The SNOW Theorem and Latency-Optimal Read-Only Transactions Presenter: Tianyi Shan

Organization Motivation and background The “SNOW” theorem COPS-SNOW design and Rococo-SNOW design Evaluation of the results Takeaway and Discussion

Motivation and background Web service may read from its data store thousands of times for a single page. many real-world workloads of web service are dominated by reads.(99.8% of the operations for Facebook’s distributed data are reads store TAO are reads). Reduce Latency Reference: https://www.globaldots.com/knowledge-base/network-load-balancing/

Motivation and background When data is spread across machines, reading to different shards will arrive at different times and see different views of the data store. When two transactions are concurrent there , the transactions may not ensure isolation. Guarantee “Power” Result: I load Photo B (public)

The “SNOW” theorem Reduce Latency Guarantee “Power” Non-blocking operations Reduce Latency One-response from each shard VS Strict serializability Guarantee “Power” Write transactions

The “SNOW” theorem “CAP” theorem(CAP is impossible) “SNOW” theorem(SNOW is impossible) Reference: https://www.developer.com/java/data/getting-started-with-mongodb-as-a-java-nosql-solution.html

The “SNOW” theorem Lemma 1. The default behavior at servers returns values that are used by clients. Lemma 2 Servers initially return old by default. Lemma 3. Servers eventually return new by default. Corollary 4. There exists a transition at each server be- tween defaulting to old and defaulting to new. Ra = new Rb = old “SNOW” is impossible! Reference: The SNOW theorem and latency-optimal read-only transactions, Lu, et.al. Proceeding OSDI'16 Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation Pages 135-150

The “SNOW” theorem SNOW-Optimal: 3 of S,N,O,W LATENCY-Optimal: N + O. Read >> Write Sacrifice Write! Reference: The SNOW theorem and latency-optimal read-only transactions, Lu, et.al. Proceeding OSDI'16 Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation Pages 135-150

r1(public):a0 r1(private):a1 r2(public):b0 r2(private):b1 COPS-SNOW design and Rococo-SNOW design ACL:a Album:b a1->b1 r1(public):a0 r1(private):a1 r2(public):b0 r2(private):b1 causally consistency Strict serializability : Real-time ordering => returns the most recent values. Causally consistency : Process ordering => may not return the most recent values Both Casual and Strict guarantee Isolation. Reference: Don’t Settle for Eventual:Scalable Causal Consistency for Wide-Area Storage with COPS, Wyatt Lloyd

COPS-SNOW design and Rococo-SNOW design The second round is identical, and Rococo considers the read-only transaction successful only if both rounds read the same values. Reference: https://www.usenix.org/sites/default/files/conference/protected-files/osdi16_slides_lu_haonan.pdf

Evaluation of the results(COPS-SNOW) COPS-SNOW achieves low latency at the cost of lower system throughput. COPS-SNOW has a latency advantage that increases as read-only transactions increase Reference: The SNOW theorem and latency-optimal read-only transactions, Lu, et.al. Proceeding OSDI'16 Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation Pages 135-150

Evaluation of the results(COPS-SNOW) SIPF: Describe the data gets distributed more or less evenly COPS-SNOW has an increasing latency advantage as the workload becomes more skewed. throughput disadvantage of COPS-SNOW decreases slightly as the workload becomes more skewed. Reference: The SNOW theorem and latency-optimal read-only transactions, Lu, et.al. Proceeding OSDI'16 Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation Pages 135-150

Evaluation of the results(ROCOCO-SNOW) Rococo-SNOW provides lower peak throughput than Rococo. because with so few requests Rococo-SNOW makes the write algorithm more complex. Rococo-SNOW provides lower latency and higher throughput as the reqs/servers increases. Reference: The SNOW theorem and latency-optimal read-only transactions, Lu, et.al. Proceeding OSDI'16 Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation Pages 135-150

Take Away The “SNOW” is impossible There is a fundamental trade-off between the power and latency of read-only transactions Help understand existing read-only systems. Help avoid trying to improve systems that we cannot(beyond SNOW). Two new systems COPS-SNOW (Latency-optimal) and Rococo-SNOW(SNOW- optimal). Both reduce the read latency at the cost of makes the write algorithm more complex.

Discussion Why COPS-SNOW reduce so much latency (less than half of COPS)? Why the latency increase above the COPS as the number of threads increase? What is the overload? Do you think the prove of ”NO SNOW” is perfect? Why?

An Evaluation of Distributed Concurrency Control Presenter: Xinzhou Zhao

Background & Main purpose Data generation and query volumes are outpacing the capacity of single-server DBMS Organizations are increasingly partitioning data across several servers Quantify the effects of distribution on concurrency control protocols in a distributed environment Evaluated 6 classic and modern protocols In-memory distributed database evaluation framework-- Devena

Deneva

Transaction Protocols Two-phase Locking (2PL) [NO_WAIT, WAIT_DIE] Timestamp Ordering [TIMESTAMP, MVCC] Optimistic [OCC] Deterministic [CALVIN] Two-Phase Commit (2PC)

CALVIN

EVALUATION Table partitions are loaded on each server A load of 10,000 open client connections per server Measure throughput as the number of transactions successfully completed after the warm-up period

Contention

Update Rate

Multi-Partition Transactions

Scalability

Scalability

Scalability

Distributed DBMS Bottlenecks

Potential Solutions Improve the Network Adapt the Data Model Seek Alternative Programming Models

Thoughts & Discussion Points More bottlenecks of distributed DBMS More solutions to the bottlenecks As soon as a transaction acquires all of its locks, a worker thread executes it right away and then releases the locks immediately afterward. This means that locks are not held long enough for the scheduler to process conflicting transactions.

Haoyu Wang CS525 Advanced Distributed System University of Illinois Discussion Haoyu Wang CS525 Advanced Distributed System University of Illinois

Deneva Do you think the experiment is well-designed Matrices chosen Fairness Other

Deneva Fault-tolerance Is this assumption good enough Any influence on concurrency control protocol evaluation

Deneva Problem: Possible Approaches: How to improve the testing system itself (Deneva) Possible Approaches: Execution Engine Storage Engine Modularity Timestamp

Snow Can you be persuaded if the tightness of the theorem only by few examples? If not, how could we use the simple example to illustrate any combinations of three properties can be possible

Snow Write transaction Read-only transaction? Write-heavy transaction? Mixture?

Snow Open Question: The spectrum of SNOW theory i.e. What is the minimum round of read to guarantee SNW What is the strongest consistent model can be reached to guarantee NOW

Thank you!!