Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the...
Transcript of Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the...
![Page 1: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/1.jpg)
Boosting Locality in
Multi-version Partial Data
Replication
João A. Silva, João M. Lourenço, and
Hervé Paulino
![Page 2: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/2.jpg)
Replicate only a subset of the system’s data at
each node
Explored by many transactional systems [Sou+01,
SSP06, Ser+07, SSP10]
Partial Data Replication
SAC'15, April 13-17 2015, Salamanca, Spain 2
Group2Group1
Node1 Node2
A B C D
Node3
A B
Node4
C D
![Page 3: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/3.jpg)
Partial Data Replication
+ High scalability
potential
+ Better resource
utilization
+ (Parameterizable)
Fault tolerance
- Data partitioning
- More complex
coordination
- Remote data access
SAC'15, April 13-17 2015, Salamanca, Spain 3
![Page 4: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/4.jpg)
Remote data cache
Approach
SAC'15, April 13-17 2015, Salamanca, Spain 4
![Page 5: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/5.jpg)
Coming Next...
ConclusionsExperimental
ResultsOur Solution
SystemModel
SAC'15, April 13-17 2015, Salamanca, Spain 5
![Page 6: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/6.jpg)
System Model
SAC'15, April 13-17 2015, Salamanca, Spain 6
Strong consistency
MVCC
Primary owner
T.tsS
T.tsC
Classical
asynchronous
system
mostRecentTSi
![Page 7: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/7.jpg)
Comprised by 2 components:
Consistency algorithm
Ensures data consistency
Extension mechanism
Maximizes cache effectiveness
Our Solution
SAC'15, April 13-17 2015, Salamanca, Spain 8
![Page 8: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/8.jpg)
< 𝑘, 𝑣𝑎𝑙, 𝑣𝑒𝑟𝑠𝑖𝑜𝑛, 𝑣𝑎𝑙𝑖𝑑𝑖𝑡𝑦 >
Ensuring Data Consistency
SAC'15, April 13-17 2015, Salamanca, Spain 9
version: 2 version: 4 version: 9
validity: 4 validity: 9 validity: mostRecentTS
![Page 9: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/9.jpg)
When reading data item D inside transaction T:
Ensuring Data Consistency
SAC'15, April 13-17 2015, Salamanca, Spain 10
Is D a local data item?
Is D in cache?
Do remoteread
Is there anyvisible version
V of D?
Do remoteread
T.tsS < V.validity?
Do remoteread
Return cachedvalue
Read locallyYes
No
Yes
No
Yes
No
Yes
No
![Page 10: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/10.jpg)
Extension mechanism
Modified Set (mSet) – set of ids of all data
items updated since the last time an mSet
was built and sent
Maximizing Cache
Effectiveness
SAC'15, April 13-17 2015, Salamanca, Spain 11
...version: 9validity: 10
...version: 9validity: 10
mostRecentTS = 12...version: 9validity: 12
mostRecentTS = 12
![Page 11: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/11.jpg)
Extension strategies:
Eager – transaction committed
Batch – periodically
Lazy – remote read request
Extension Mechanism
SAC'15, April 13-17 2015, Salamanca, Spain 12
![Page 12: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/12.jpg)
Extension message:
[𝑚𝑆𝑒𝑡,𝑚𝑜𝑠𝑡𝑅𝑒𝑐𝑒𝑛𝑡]
∀𝑥 ∶ 𝑥 ∈ 𝑐𝑎𝑐ℎ𝑒 ∧𝑚𝑜𝑠𝑡𝑅𝑒𝑐𝑒𝑛𝑡𝑉𝑒𝑟𝑠𝑖𝑜𝑛 𝑥 ∧
𝑥 ∉ 𝑚𝑆𝑒𝑡,𝑚𝑜𝑠𝑡𝑅𝑒𝑐𝑒𝑛𝑡𝑉𝑒𝑟𝑠𝑖𝑜𝑛 𝑥 . 𝑣𝑎𝑙𝑖𝑑𝑖𝑡𝑦 = 𝑚𝑜𝑠𝑡𝑅𝑒𝑐𝑒𝑛𝑡
Extension Mechanism
SAC'15, April 13-17 2015, Salamanca, Spain 13
![Page 13: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/13.jpg)
Shared validity:
𝑚𝑜𝑠𝑡𝑅𝑒𝑐𝑒𝑛𝑡𝑉𝑎𝑙𝑖𝑑𝑖𝑡𝑦[𝑛𝑜𝑑𝑒𝐼𝑑]
Associated with all the versions from nodeId
that are known to be the most recent ones
Extension Mechanism
SAC'15, April 13-17 2015, Salamanca, Spain 14
![Page 14: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/14.jpg)
Extension process:
1. ∀𝑥 ∶ 𝑥 ∈ 𝑚𝑆𝑒𝑡, detach 𝑥 from shared validity
2. 𝑚𝑜𝑠𝑡𝑅𝑒𝑐𝑒𝑛𝑡𝑉𝑎𝑙𝑖𝑑𝑖𝑡𝑦 𝑛𝑜𝑑𝑒𝐼𝑑 = 𝑚𝑜𝑠𝑡𝑅𝑒𝑐𝑒𝑛𝑡
Extension Mechanism
SAC'15, April 13-17 2015, Salamanca, Spain 15
![Page 15: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/15.jpg)
Experimental Results
System
8 node cluster
DTM framework
SCORe [PRQ12]
Benchmarks
Red-Black Tree
SAC'15, April 13-17 2015, Salamanca, Spain 16
![Page 16: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/16.jpg)
What is the impact of the cache mechanism in the:
1. System’s overall throughput?
2. Amount of remote read operations?
Experimental Results
SAC'15, April 13-17 2015, Salamanca, Spain 17
![Page 17: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/17.jpg)
0,4
0,6
0,8
1
1,2
1,4
2 4 6 8
Tra
nsactions
x10
5/s
econ
d
Number of nodes
RBT 0% updates
noCache Batch Eager Lazy
Throughput
Experimental Results
SAC'15, April 13-17 2015, Salamanca, Spain 18
![Page 18: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/18.jpg)
0
0,5
1
1,5
2
2,5
3
3,5
4
4,5
5
2 4 6 8
Perc
en
tage
Number of nodes
RBT 0% updates
noCache Batch Eager Lazy
Remote Reads
Experimental Results
SAC'15, April 13-17 2015, Salamanca, Spain 19
![Page 19: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/19.jpg)
0,8
0,9
1
1,1
1,2
1,3
1,4
1,5
1,6
2 4 6 8
Tra
nsactions
x10
4/s
econ
d
Number of nodes
RBT 10% updates
noCache Batch Eager Lazy
Throughput
Experimental Results
SAC'15, April 13-17 2015, Salamanca, Spain 20
![Page 20: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/20.jpg)
0
0,5
1
1,5
2
2,5
3
3,5
4
4,5
5
2 4 6 8
Perc
en
tage
Number of nodes
RBT 10% updates
noCache Batch Eager Lazy
Remote Reads
Experimental Results
SAC'15, April 13-17 2015, Salamanca, Spain 21
![Page 21: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/21.jpg)
Eager – Long read-only transactions, big mSets
Batch – Tradeoff between reduced bandwidth
and delays by batching updates
Lazy – Communication intensive workloads,
small mSets
Experimental Results
SAC'15, April 13-17 2015, Salamanca, Spain 22
![Page 22: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/22.jpg)
Partial replication is severely affected by the
inefficient data placement
Generic caching mechanism
Improvements in the system’s throughput
Reduction of remote read operations
Conclusions
SAC'15, April 13-17 2015, Salamanca, Spain 23
![Page 23: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/23.jpg)
Garbage collection mechanism for old
cached data
Extensive experimental study using several
benchmarks with different workloads and
data access patterns
Future Work
SAC'15, April 13-17 2015, Salamanca, Spain 24
![Page 24: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/24.jpg)
Thank you!Questions?
![Page 25: Boosting Locality in Multi-version Partial Data Replication€¦ · Replicate only a subset of the system’sdata at each node Explored by many transactional systems [Sou+01, SSP06,](https://reader036.fdocuments.net/reader036/viewer/2022070921/5fb9cd69c4aaa3171a1647eb/html5/thumbnails/25.jpg)
References[Sou+01] A. Sousa, R.Oliveira, F . Moura, and F. Pedone. “Partial Replication
in the Database State Machine”. NCA 2001.
[SSP06] N. Schiper, R. Schmidt, and
F. Pedone. “Optimistic Algorithms for Partial Database Replication”. Principles
of Distributed Systems 2006.
[Ser+07] D. Serrano, M. Patiño-Martinez, R. Jimenez-Peris, and
B. Kemme. “Boosting Database Replication Scalability through Partial
Replication and 1-Copy-Snapshot-Isolation”. PRDC 2007.
[SSP10] N. Schiper, P. Sutra, and F. Pedone. “P-Store: Genuine Partial
Replication in Wide Area Networks”. SRDS 2010.
[PRQ12] S. Peluso, P. Romano, and F. Quaglia. “SCORe: A Scalable One-
Copy Serializable Partial Replication Protocol”. Middleware 2012.
SAC'15, April 13-17 2015, Salamanca, Spain 26