Contributions
㱻
2
1 3 4
Ȑ
Preordered transactions
Lazy state determination API
Extract concurrency
using speculative
transactions
Slide 19
Slide 19 text
Contributions
㱻
2
1 3 4
Ȑ
Preordered transactions
Lazy state determination API
Extract concurrency
using speculative
transactions
Slide 20
Slide 20 text
Traditional transactions
2
1 3 4 5
Slide 21
Slide 21 text
Traditional transactions
Active
Serialized
2
1 3 4 5
Slide 22
Slide 22 text
Traditional transactions
Active
Serialized
2
1 3 4 5
Slide 23
Slide 23 text
Traditional transactions
Active
Serialized
2
1 3 4 5
Slide 24
Slide 24 text
Pot
Active
Serialized
2
1 3 4 5
Key observation: speculative
transactions only modify state
when they commit.
Slide 25
Slide 25 text
Pot
Active
Serialized
2
1 3 4 5
Force transactions to commit
in the order the replicas
agreed upon.
Slide 26
Slide 26 text
Pot
Active
Serialized
Active
Serialized
2
1 3 4 5
Slide 27
Slide 27 text
Pot
Active
Serialized
Active
Serialized
2
1 3 4 5
Key observation: now we
know which transaction
commits next.
Slide 28
Slide 28 text
Pot
Active
Serialized
Active
Serialized
2
1 3 4 5
Execute it in a fast mode that
bypasses speculation.
Slide 29
Slide 29 text
Pot
Active
Serialized
2
1 3 4 5
Active
Serialized
2
1 3 4 5
Slide 30
Slide 30 text
Pot
Active
Serialized
Active
Serialized
2
1 3 4 5
If consecutive transactions
commute, Pot can execute
them as fast simultaneously.
Slide 31
Slide 31 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
Slide 32
Slide 32 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
Slide 33
Slide 33 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
Slide 34
Slide 34 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
Slide 35
Slide 35 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
~2x
Slide 36
Slide 36 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
~4x
Slide 37
Slide 37 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
Slide 38
Slide 38 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
~1.3x
Slide 39
Slide 39 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot (multiple fast)
~1.5x
Slide 40
Slide 40 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot
Slide 41
Slide 41 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot
Slide 42
Slide 42 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot
Slide 43
Slide 43 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot
Slide 44
Slide 44 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot
~4x
Slide 45
Slide 45 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot
≈
Slide 46
Slide 46 text
Contributions
㱻
2
1 3 4
Ȑ
Preordered transactions
Lazy state determination API
Slide 47
Slide 47 text
Traditional API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
Slide 48
Slide 48 text
Traditional API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
Slide 49
Slide 49 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Key observation: transaction
does not need to observe a
concrete state to execute its
logic.
Slide 50
Slide 50 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Obtain a future that
represents the stock value
instead of the concrete stock
value as of right now.
Slide 51
Slide 51 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Slide 52
Slide 52 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Key observation: transaction
can know whether the
predicate is true without
observing a concrete value.
Slide 53
Slide 53 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Slide 54
Slide 54 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
New operation to execute
predicates over futures.
Slide 55
Slide 55 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Slide 56
Slide 56 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Key observation: transaction
can specify how to compute
the new value.
Slide 57
Slide 57 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Function that computes the
new value based on futures.
Slide 58
Slide 58 text
LSD API
begin
…
[=42] v ← read(stock)
if v > 0:
v ← v - 1
[→41] write(stock, v)
…
commit
begin
…
? ← read(stock)
[>0] if is-true({? > 0}):
f ← {? - 1}
[→?-1] write(stock, f)
…
commit
Execute f when transaction
commits and ? is resolved to a
concrete value.
Slide 59
Slide 59 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot+LSD
Slide 60
Slide 60 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot+LSD
Slide 61
Slide 61 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot+LSD
~1.3x
Slide 62
Slide 62 text
TPC-C w/ 1 warehouse (high contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Traditional SMR Fault-prone Pot Pot+LSD
~3x
Slide 63
Slide 63 text
Conclusion
•Scale state machine replication on multicore
servers with minimal impact for application
developers
•Pot guarantees correctness
•LSD improves efficiency
Slide 64
Slide 64 text
Thank you for your time.
Slide 65
Slide 65 text
Executing requests concurrently in
state machine replication
Ph.D. defence
Tiago Vale
Advisors: João Lourenço, Ricardo Dias
Slide 66
Slide 66 text
TPC-C w/ 32 warehouse (low contention)
Successful transactions/second
0K
2,5K
5K
7,5K
10K
12,5K
15K
17,5K
20K
22,5K
Number of clients
1 2 4 8 16 32 48 64 80
Sequential 2PL OCC Pot Pot (multiple fast)