MY WEAK CONSISTENCY IS
STRONG
WHEN BAD THINGS DO NOT COME IN THREES
ZECHAO SHANG JEFFREY XU YU
STRONG WHEN BAD THINGS DO NOT COME IN THREES ZECHAO SHANG JEFFREY - - PowerPoint PPT Presentation
MY WEAK CONSISTENCY IS STRONG WHEN BAD THINGS DO NOT COME IN THREES ZECHAO SHANG JEFFREY XU YU DISCLAIMER: NOT AN OLTP TALK HOW TO GET ALMOST EVERYTHING FOR NOTHING SHARED-MEMORY SYSTEM IS BACK shared data Fine-grained mini-jobs
ZECHAO SHANG JEFFREY XU YU
DISCLAIMER: NOT AN OLTP TALK
SHARED-MEMORY SYSTEM IS BACK
mini-jobs
in-place update compute shared data time Correct behavior Atomic and isolation Serializability theory
(transaction)
reads
THROUGHPUT
SCALABILITY LATENCY
DATA CONSISTENCY & JOB ISOLATION
DO WE NEED IT?
Correct Behavior Run the transactions like serial Atomic and isolation Serializability theory
THE DATABASE WAY
Correct Behavior Run the transactions like serial Atomic and isolation Serializability theory Run the transactions + anomalies Weak consistency This talk ? Behavior
DATA CONFLICT GRAPH
1 7 5 4 2 6 3 8
GOOD AND BAD
time 1 7 5 4 2 6 3 8 1 2 8 7 6 5 4 3
GOOD AND BAD
time 1 7 5 4 2 6 3 8 1 2 8 7 6 5 4 3 1 2 8 7 6 5 4 3 dependency graph
GOOD AND BAD
1 7 5 4 2 6 3 8 time 1 3 4 8 6 7 5 2
BD=2 BD=1 1 2 8 7 6 5 4 3 1 2 8 7 6 5 4 3 time time BD=0 always
BAD DEGREE AND CORRECTNESSES
MAX BAD DEGREE CONCURRENCY CONTROL TXN SEMANTICS RESULTS ACCURACY NO SERIALIZABILITY CORRECT >0 NO NO DON’T KNOW YES SERIALIZABILITY CORRECT
BAD THINGS DO NOT COME IN 3 (BN3)
MAX BAD DEGREE CONCURRENCY CONTROL TXN SEMANTICS RESULTS ACCURACY NO SERIALIZABILITY CORRECT 1 (BN3) >1 NO NO DON’T KNOW YES SERIALIZABILITY CORRECT
IS BN3 TRUE?
|#| $
GRAPH NAME |V| (in 106) |E| (in 106) DENSITY (in 10-4) Web Graphs uk-2007-05 106 3,739 4.2 uk-2014 787 47,614 4.7 eu-2015 1,070 91,792 5.8 claw-2012 3,563 128,736 1.4 Social Networks wise 59 265 4.0 friendster 66 1,806 0.7 TPC-C New Order >1000 1 7 5 4 2 6 3 8
BAD DEGREE DISTRIBUTION
≦1 BN3 (bad degree ≦ 1) 0BD (bad degree = 0)
0.90 0.92 0.94 0.96 0.98 0.99 1.00 1 2 4 8 1 6 3 2 6 4 1 2 8 2 5 6 5 1 2 1 2 4 Probability Number of Cores
conflict graph density:10-6 conflict graph density:10-5 conflict graph density:10-4
0.90 0.92 0.94 0.96 0.98 0.99 1.00 1 2 4 8 1 6 3 2 6 4 1 2 8 2 5 6 5 1 2 1 2 4 Probability Number of Cores
conflict graph density: 10-6 conflict graph density: 10-5 conflict graph density: 10-4
WHAT GOOD IS BN3?
THE TRANSACTIONS EXECUTED WITHOUT ANY CONSISTENCY MECHANISM IS UNDER SNAPSHOT ISOLATION (SI)
PROOF: A TWO-STEP APPROACH
1 7 4 2 3 8 5 6 bad edge
BAD DEGREE AND CORRECTNESSES
MAX BAD DEGREE CONCURRENCY CONTROL TXN SEMANTICS RESULTS ACCURACY NO SERIALIZABILITY CORRECT 1 (BN3) NO SNAPSHOT ISOLATION WRITE-SKEW ANY NO NO DON’T KNOW YES SERIALIZABILITY CORRECT
10-4 10-3 2*10-3 1*10-4 6*10-5 5*10-5 Residual Conflict graph density No Consistency Read Uncommitted Read Committed Serializability
128 cores
10-4 10-3 2*10-3 1*10-4 6*10-5 5*10-5 Residual Conflict graph density No Consistency Read Uncommitted Read Committed Serializability
0.90 0.92 0.94 0.96 0.98 0.99 1.00 1 2 4 8 1 6 3 2 6 4 1 2 8 2 5 6 5 1 2 1 2 4 Probability Number of Cores
density:2*10-3 density:1*10-4 density:6*10-5 density:5*10-5
256 cores
x: vary the conflict graph density lines: vary isolation levels y: residual after 50 iterations of Page Rank
“BN3-ness”
TAKE HOME MESSAGES
EXPERIMENTAL STUDIES (THROUGHPUT)
40 60 2*10-3 1*10-4 6*10-5 5*10-5 Throughout (* 106) Conflict graph density No Consistency Read Uncommitted Read Committed Serializability 40 60 80 2*10-3 1*10-4 6*10-5 5*10-5 Throughout (* 106) Conflict graph density No Consistency Read Uncommitted Read Committed Serializability