分散データストアの因果整合性違反度測定手法db-event.jpn.org/deim2016/papers/133.pdf ·...
date post
17-Feb-2018Category
Documents
view
215download
0
Embed Size (px)
Transcript of 分散データストアの因果整合性違反度測定手法db-event.jpn.org/deim2016/papers/133.pdf ·...
DEIM Forum 2016 D5-3
1528552 2121E-mail: takatsuka.y.aa@m.titech.ac.jp
/Causal Consistency
1.
eventual consistency
causal consistency
Apache Cassandra Amazon DynamoDB DynamoDB
Cassandra DynamoDB2
3 4 56
2.
2. 1 linearizabil-
ity[17] sequential consistency[19]causal consistency[10] [21]eventualconsistency[14]
[8] [22]
2. 2
1 A 2 A B 3 B A
2. 3 B
A B A B A A B A B B A A B
A B W (A) A R(A) A
WW W (A) W (B) WRW W (A) A
R(A) W (B) WW WRW W (A) W (A)
R(A) W (B)
3.
3. 1
Chain reaction [11] COPS [13]
Eiger [20]Orbe [18]Bolton CausalConsistency [7] [23]
3. 2
Wada [12]
staleness Bermbach [15]staleness
staleness
Bermbach [6] Amazon S3 [3]
Jepsen [16] iptables
4.
4. 1 4. 24. 34. 44. 5
4. 1
!"#
x=-1 y=1
$=% &=1
W(y=1)
''x=0
y=1#
()#Client *#R(y=1)
Client 2#
+,1# +,2#
1
4. 1. 1
A B A B B A
1 1 x = 0 y = 1 1 2 2 x = 0 x = 0 x = 1 y = 1 2 y = 1 2 y = 1 x = 0
4. 1. 2
1y = 1 2 y = 1 x = 1 x = 1 y = 1 x = 0 2 y = 1 x = 0 x = 0 x 2 y = 1
R(xi)
xi x i R(xi) R(xi) PastReadData
R(xi) is a violation
iff data PastReadData[xj [xi xj xj data]](1)
xj xi R(xi) R(xi) xj V iolationEvidence V E V E
4. 2
1
Read or Write 2 4. 3
V erificationTargetRead Rv
4. 3
2. 3WW WRWWW WRW
Write(x,0)!!!!!!Write(y,0)!!!!!!Read(x,1)!!!!!!Write(x,3) !"
#rite(w,0)!!!!!!Write(x,4)!!!!!!Read(x,3)!!!!!!Write(z,1) !"
Read(x,0)!!!!!!Write(x,1)!!!!!!Write(z,0)!!!!!!Write(y,1) !"Client 1"
Client 2"
Client 3"
2
!"#$%&'()
x1 * x2 * y1 *+*x3 ** y2,
-./01234/%56789":4. ****** R(y2) R(y1) R(x1),
3 V iolationEvidence
WW 1 WRW 2 3
2 2
1 2
4. 3. 1 4. 1. 2
Rv Rv Rv Rv V EV E 3 R(x1) y1 y2 y1 y2 x1 x1y1 x1 x2 V E y2 x1 x2 x3 V E x2
LatestDataLatestData
Read(x,1)!Read(z,0)!Read(z,1)!Read(x,0)"
#$%&'()*%+,-./012*$"
345+
,-./"
Write(x,0)!!!!!!Write(y,0)!!!!!!Read(x,1)!!!!!!Write(x,3) !"
!!!!!!Read(x,3)!!!!!!Write(z,1) !"
Read(x,0)!!!!!!Write(x,1)!!!!!!Write(z,0)!!!!!! !"Client 1"
Client 2"
Client 3"
4
2 x = 1 x = 3y = 1z = 1 y = 1 z = 1 LatestData LatestData
Rv LatestData LatestDataLatestData Rv V E V E LatestData Rv V E
LatestDataLatestWrites 2 x = 1 z = 0z = 1 LatestWrites Write(z, 0)Write(z, 1)4. 1. 2V E Rv
V E Rv V erificationTargetWrite Wv 2 Write(x, 0) Wv Wv Write(x, 1) Write(y, 0)Write(z, 1) V E
LatestWrites Wv 4 Wv Rv
4. 4 4. 3
LatestWrites i LWi Rv Wv
i Wv LWi
Wv LWi Wv LatestWrites V E 4. 3. 1 LatestWrites Wv Wv Wv Rv
Wv LWi Rv i LW LatestWrites LWi Rv Wv Wv LatestWrites Wv LatestWrites Wv = LWi Rv
LatestWrites
1 2 3 Rv Rv Wv 4 Wv i Wv
LWi Wv LWi Wv LatestWrites
Wv Rv
Wv LWi LWi
Wv LatestWrites Wv = LWi
5 Rv Rv Wv
4. 5
4. 5. 1 WWuni WW WWdiffWWuni WW WRWuni WRW WRWdiff WRWuni WRW
OthersWW WRW
4. 5. 2 4. 1. 2 Rv
WPastRead Rv Wv Wv V E4. 4 V E V E WPastRead V E Wv V E WPastRead V E
V E WPastReadV E Wv Wv V E 4. 5. 14. 1. 2 Rv V E Wv
WPastRead Rv V E
Wv V E V E V E Rv V E
4. 5. 1 WWuni WWdiffWRWuniWRWdiff V E Others WW WRW
A B
5.
ApacheCassandra [4] [9] Amazon DynamoDB [1]
5. 1
Yahoo!
Cloud Serving BenchmarkYCSB [5] YCSB NoSQL 1 YCSB
ID YCSB YCSB
1:1 Zipf1 100 byte 1 5 1000
5. 2 Apache CassandraOSS Apache Cassandra
1 OS Linux 3.16.045generic, Ubuntu 14.04.2 LTS
CPU 2.40 GHz Xeon(R) E5620 2 8 GB RAM
Java Java SE 8 Update 45
0
1000
2000
3000
4000
5000
6000
7000
8000
1 10 100 1K 10K 100K 1M 10M
0! 1.3! 138.7!
2930.9!
7019.6!
2133.4!1763.6!1720.2
# o
f vio
latio
ns
# of records
5 Cassandra
5. 2. 1 Cassandra 3 1 2 1 1 1
SSD YCSB 1 3
YCSB YCSB 1000 ops/sec
5. 2. 2
51
CPU Zipf
0
100
200
300
400
500
600
700
1 5 10 100 1K 10K 100K
# o
f vio
latio
ns
# of records
630.7!
308!
240.4!
51.9!
10! 5.4! 3.8!
6 DynamoDB
4. 5. 1 Others WW WRW
5. 3 DynamoDBPaaS Amazon DynamoDB
5. 3. 1 DynamoDB
DynamoDB DynamoDB 1 provisioned throughput1 1000 provisioned throughput
YCSB Amazon EC2 [2] YCSB DynamoDB 3 EC2 YCSB 500 ops/sec
5. 3. 2
61 100 DynamoDBCassandra
Others 7 10 Others > WWdiff > WWuni >WRWuni > WRWdiff 8 WWuni WWdiff 9
0
50
100
150
200
250
300
350
400
WWuni WWdiff WRWuni WRWdiff Others
# o
f vio
latio
ns
110.7!
203.6!
28.1!
3.3!
335.8!
Type of violation!
7 10
!"
#!"
$!!"
$#!"
%!!"
%#!"
&!!"
!"
'!!"
'#!"
#!!"
$" #" $!" $!!" $(" $!(" $!!("
!"""#
!$""#
# of records
# o
f vio
latio
ns
2329.8!
0!
249.2!263.6!
110.7!
203.6!
29.7!
2.1! 7.2!1.1! 1.3!
3.8!0.78!
2.1!
!!"#$% !!&$''%
8 WW
!"
#!"
$!"
%!"
&!"
'!!"
'#!"
'" (" '!" '!!" ')" '!)" '!!)"
!""#
!$"#
%""#
# of records
!"!#$%& !"!'%((&
# o
f vio
latio
ns
262.1!
0!
59.1!
4.3!
28.1!
3.3! 1.8!0.11!
0.22!0!
1.1!0!
0.22!0!
9 WRW
WRWuni WRWdiff 10 Others 6 100 1
WWdiff WRWdiff 0 5. 2. 15. 3. 1
!"
#!!"
$!!"
%!!"
&!!"
'!!"
(!!"
)!!"
*!!"
+!!"
#!!!"
#" '" #!" #!!" #," #!," #!!,"
!"##$
%#$
%"##$
a!
# o
f vio
latio
ns
# of records
2446.2!
492.3!
335.8!
38.9!3.4! 2.7! 2.6!
10 Others
Cassandra DynamoDB
6.
JSPS 2570000826540161
[1] Amazon Web Services. Amazon DynamoDB.
http://aws.amazon.com/dynamodb/.
[2] Amazon Web Services. Amazon EC2.
http://aws.amazon.com/ec2/.
[3] Amazon Web Services. Amazon S3.
http://aws.amazon.com/s3/.
[4] The Apache Software Foundation. Apache Cassandra.
http://cassandra.apache.org/.
[5] Brian F. Cooper, Adam Silberstein, Erwin Tam, Raghu Ra-
makrishnan, and Russell Sears. Benchmarking Cloud Serv-
ing Systems with YCSB, In Proc. SOCC 10, pp. 143154,2010.
[6] David Bermbach, and Stefan Tai. Benchmarking Eventual
Consistency: Lessons Learned from LongTerm Experimen-
tal Studies. In Proceedings of the 2nd IEEE International
Conference on Cloud Engineering, Best Paper Runner Up
Award, 2014
[7] Peter Bailis, Ali Ghodsi, Joseph M Hellerstein, and Ion Sto-
ica. Bolt-on causal consistency. In Proceedings of the 2013
international conference on Management of data, pp. 761
772. ACM, 2013.
[8] Seth Gilbert, and Nancy Lynch. Brewers Conjecture andthe Feasibility of Consistent, Available, Partition-tolerant
Web Services. SIGACT News, Vol. 33, No. 2, pp. 5159,2002.
[9] Avinash Lakshman, and Prashant Malik. Cassandra A
Decentralized Structured Storage System, Proc. LADIS 09, 2009.
[10] Mustaque Ahamad, Gil Neiger, James E. Burns, Prince
Kohli, P.W. Hutto. Causal Memory: Definitions, Implemen-
tation and Programming. Distributed Computing, 9(1):37
49, 1994.
[11] Sergio Almeida, Joao Leitao, and Lus Rodrigues. Chainre-
action: a causal+ consistent datastore based on chain repli-
cation. In Proceedings of the 8th ACM European Confer-
ence on Computer Systems, pp. 8598. ACM, 2013.
[12] Hiroshi Wada, Alan Fekete, Liang Zhao, Kevin Lee, and
Anna Liu. Data Consistency Properties and the Tradeoffs
in Comercial Cloud Storages: the Consumers Perspective.
In Proceedings of the 5th Biennial Conference on Innovative
Data Systems Research, pp. 134143, 2011.
[13] Wyatt Lloyd, Michael J Freedman, Michael Kaminsky, and
David G Andersen. Dont settle for eventual: scalable causalconsistency for wide-area storage with cops. In Proceedings
of the Twenty-Third ACM Symposium on Operating Sys-
tems Principles, pp. 401416. ACM, 2011.
[14] Giuseppe DeCandia, Deniz Hastorun, Madan Jampani, Gu-
navardhan Kakulapati, Avinash Lakshman, Alex Pilchin,
Swaminathan Sivasubramanian, Peter Vosshall, and Werner
Vogels. Dynamo: Amazons Highly Available KeyvalueStore. Proc. SOSP 2007, 2007.
[15] David Bermbach, and Stefan Tai. Eventual Consistency:
How soon is Eventual? An evaluation of Amazon S3s
consistency behavior. In Proceedings of the 6th Workshop
on Middleware forService Oriented Computing, pp. 1:11:6,
2011.
[16] Kyle Kingsbury. Jepsen. http://jepsen.io/.
[17] Maurice P. Herlihy, and Jeannette M. Wing. Linearizabil-
ity: A Correctness Condition for Concurrent Obj