motivation
play

Motivation Non-Monotonic Snapshot Isolation: Geo-replication for x - PowerPoint PPT Presentation

Motivation Non-Monotonic Snapshot Isolation: Geo-replication for x scalable and strong consistency Low latency y for geo-replicated transactional systems Availability x Disaster tolerance y Requirements Masoud Saeida


  1. Motivation Non-Monotonic Snapshot Isolation: • Geo-replication for x scalable and strong consistency • Low latency y for geo-replicated transactional systems • Availability x • Disaster tolerance y Requirements Masoud Saeida Ardekani, Université Pierre-et-Marie-Curie Pierre Sutra, Université de Neuchâtel • Transaction Marc Shapiro, INRIA & Université Pierre-et-Marie-Curie • Strong consistency: No concurrent writes to the same object • Progress: if no conflict then commit Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 1 01/10/13 2 Masoud Saeida Ardekani Masoud Saeida Ardekani Desired Scalability Properties Consistency Hierarchy Strict Serializability (SSER) Scalability & Performance 1. Wait-Free Queries Easy Coding and Reasoning • Queries do not wait or abort Snapshot Isolation (SI) Serializability (SER) 2. Minimal Commitment Synchronization • Synchronize only if necessary • Transaction T i waits for T j only if they write-write conflict Update Serializability (US) Parallel Snapshot Isolation (PSI) 3. Genuine Partial Replication (next slides) Non-Monotonic Snapshot Isolation 4. Forward Freshness (next slides) Read Committed Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 3 01/10/13 4 Masoud Saeida Ardekani Masoud Saeida Ardekani

  2. Desired Scalability Properties Base Freshness Snapshots 3. Genuine Partial Replication [Schiper’10] Alice • Only replicas of objects read or written inside the transaction communicate R(x) R(y) 1 5 • Non-conflicting transactions do not interfere with each other • Intrinsic parallelism of workloads can be exploited x W(1) U.S. u,v y W(5) W(6) W(7) x,y Begin Europe Begin x,y Read (u) x++; • Stale Data Reads v++; u,v y++; Snapshot Isolation End • Increased Abort Ratio End Parallel Snapshot Isolation • More Global Communication [Saeida’13] Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 5 01/10/13 6 Masoud Saeida Ardekani Masoud Saeida Ardekani Objective: Desired Scalability Properties ensuring all four properties 4. Forward Freshness Snapshots • try to read as recent as possible Strict Serializability Update Snapshot Parallel Serializability Serializability Isolation Snapshot Isolation Wait-free Queries ✔ ✔ ✔ ✔ ✔ Alice R(x) Genuine Partial R(y) ✔ 1 7 Rep. Forw. Freshness ✔ ✔ ✔ x W(1) Snap. U.S. Minimum Comm. ✔ ✔ Sync. y W(5) W(6) W(7) Europe Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 7 01/10/13 8 Masoud Saeida Ardekani Masoud Saeida Ardekani

  3. Our solution: Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation (NMSI) Strict Serializability Update Snapshot Parallel NMSI • Read committed values Serializability Serializability Isolation Snapshot Isolation Wait-free Queries ✔ ✔ ✔ ✔ ✔ ✔ • Take consistent snapshots Genuine Partial ✔ ✔ Rep. T 1 T 2 Forw. Freshness ✔ ✔ ✔ ✔ Snap. x x Minimum Comm. W(1) W(1) R(1) ✔ ✔ ✔ Sync. W(1) W(2) y y T 1 Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 9 01/10/13 10 Masoud Saeida Ardekani Masoud Saeida Ardekani Consistency Hierarchy Non-Monotonic Snapshot Isolation Strict Serializability (SSER) Scalability & Performance • Read committed values Easy Coding and Reasoning • Take consistent snapshots • Forward Freshness Snapshot Isolation (SI) Serializability (SER) • During commit time Update Serializability (US) Parallel Snapshot Isolation (PSI) • Always commit queries • Wait-Free Queries • Commit update transaction • Minimal Commitment Sync & if no concurrent write- Non-Monotonic Snapshot Isolation Genuine Partial Replication conflicting transaction Read Committed Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 11 01/10/13 12 Masoud Saeida Ardekani Masoud Saeida Ardekani

  4. Anomalies Anomalies • Write Skew • Real-time Violation • Two concurrent transactions do not observe update of each other • Observe the effect of a transaction, but not all transactions preceding • Easy to solve [Cahill’08] it in real time • Pack each invariant into an object • Observable in Parallel Snapshot Isolation and Serializability T 1 W(1) Read (x) x Read (y) If (x+y) > 0 x=10 x=-5 Write (x,-15) Invariant: x+y > 0 y Read (x) y=10 y=10 y=-5 W(2) Read (y) If (x+y) > 0 T 2 Write (y,-15) Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 13 01/10/13 14 Masoud Saeida Ardekani Masoud Saeida Ardekani Anomalies Anomalies • Non-Monotonic Snapshots • Avoidable in case of one client • Observable in Parallel Snapshot Isolation Strict Serializability Update Snapshot Parallel NMSI Serializability Serializability Isolation Snapshot Isolation T 1 Write Skew Observable Observable Observable W(1) x Real-Time Violation Observable Observable Observable Observable Non-Monotonic Observable Observable Observable Snapshots y W(2) T 2 Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 15 01/10/13 16 Masoud Saeida Ardekani Masoud Saeida Ardekani

  5. Our Protocol Our Protocol Ensure Wait-free Queries Ensure Forward Freshness x+=1 Commit Commit y+=1 R(x) R(y) Bob • Execution Phase in U.S. • Execute reads using Dependence Vector Deliver 7 1 • Compute updates & Certify • Termination Phase x W(1) • Propagate update transactions using Atomic Multicast • Certify update transactions U.S. Atomic Multicast y W(5) W(6) W(7) Europe Ensure Propagate Certify Genuineness & W(2) z Min. Comm. Sync. Execution Termination Asia Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 17 01/10/13 18 Masoud Saeida Ardekani Masoud Saeida Ardekani Forward Freshness & Min. Comm. Sync. Evaluation Setup Update Transaction • 5 Sites in Grid’5000 Abort Ratio • A group of 3 replicas in each site Commitment Synchronization Cost • Clients distributed uniformly among sites • Modified YCSB benchmark [Cooper’10] • 4 Sites • Queries: 4 Reads • Updates: 2 Reads, 2 Updates Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 19 01/10/13 20 Masoud Saeida Ardekani Masoud Saeida Ardekani

  6. Wait-free Queries & Genuine Partial Rep. Forward Freshness & Min. Comm. Sync. Update • 90% Queries Transaction • 10% Updates Abort Ratio • Queries: 4 Reads 91% • Update: 4 Reads, 1 71% Update Commitment 33% Synchronization Cost 20% • 4 Sites Termination latency in Commitment • Queries: 4 Reads the experiment Synchronization = • Updates: 2 Reads, 2 Updates Termination latency in Cost solo execution Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 21 01/10/13 22 Masoud Saeida Ardekani Masoud Saeida Ardekani Conclusion Throughput vs. Latency • 4 Sites • Four scalability properties: • Lower: 90% Queries, 10% • Wait-free queries Updates • Forward freshness • Upper: 70% Queries, 30% • Genuine partial replication Updates • Minimal commitment synchronization • Queries: 2 Reads • Update: 1 Reads, 1 Update • Non-Monotonic Snapshot Isolation • Satisfying four properties • Between 2 to 14 times faster than other strong consistencies • No new anomaly compared to Parallel Snapshot Isolation Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 23 01/10/13 24 Masoud Saeida Ardekani Masoud Saeida Ardekani

  7. Genuine Partial Replication (GPR) [Schiper’10] • Full Replication • Every replica must perform all updates • Not scalable • Partial Replication • Addresses full replication issue • Protocols still rely on system-wide consensus/communication R(x) R(y) W(-15) T 1 10 10 • Genuine Partial Replication x=10 • Only replicas of objects accessed or modified inside the transaction communicate with each other • Non-conflicting transactions do not interfere with each other y=10 10 10 • Intrinsic parallelism of workloads can be exploited T 2 Non-Monotonic Snapshot Isolation Non-Monotonic Snapshot Isolation 01/10/13 25 01/10/13 R(y) 26 R(x) Masoud Saeida Ardekani Masoud Saeida Ardekani W(-15)

Recommend


More recommend