Download presentation
Presentation is loading. Please wait.
Published byAdam Mitchell Modified over 6 years ago
1
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
2
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!
3
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
4
Read-Only Transactions
Transactions that do not modify data Consistently read data across servers
5
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
6
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
7
The SNOW Properties [S]trict serializability [N]on-blocking operations
[O]ne response per read [W]rite transactions that conflict Highest Power Lowest Latency
8
[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
9
[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
10
[N]on-blocking Operations
Do not wait on external events Locks, timeouts, messages, etc. Lower latency Save the time spent blocking
11
[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.
12
[W]rite Transactions That Conflict
Compatible with write transactions Richer system model Easier to program
13
The SNOW Theorem: Impossible for read-only transaction
algorithms to have all SNOW properties
14
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
15
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
16
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 ✖ ✔ ✔ ✔
17
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] ✖ ✔ ✖ ✔ ✔
18
Study Existing Systems with SNOW Candidates for Improvement
COPS ✖ ✔ ≤ 2 Rococo > 1 Many more
19
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
20
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
21
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
22
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
23
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
24
Significantly Lower Latency for Read-Only Txn
OCC Lock Wait Retries Always 1 round Rococo 2PL High Contention Rococo -SNOW
25
Higher Throughput under High Contention
Rococo -SNOW Rococo -14% throughput (Low Contention) 2X throughput (High Contention) High Contention 2PL OCC
26
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.