Share
Embed
Executing requests concurrently in state machine replication
Slides of my Ph.D. defence.
Tiago Vale
May 03, 2019
Transcript
67 slides
-
Executing requests concurrently in state machine replication Ph.D. defence Tiago
Vale Advisors: João Lourenço, Ricardo Dias -
Motivation Society increasingly dependent on computer systems Systems operate on
environments where failures happen -
Motivation Society increasingly dependent on computer systems Systems operate on
environments where failures happen Systems should tolerate faults + = -
State machine replication Ȑ 2 1 3 4 Ȑ 2
1 3 4 Ȑ 2 1 3 4 Agreement 2 1 3 4 -
Research statement Can we scale state machine replication on multicore
servers with minimal impact for application developers? -
Our approach 2 1 3 4 Ȑ
Extract concurrency using speculative transactions -
Contributions 㱻 2 1 3 4 Ȑ
Preordered transactions Extract concurrency using speculative transactions -
Contributions 㱻 2 1 3 4 Ȑ
Preordered transactions Lazy state determination API Extract concurrency using speculative transactions -
Contributions 㱻 2 1 3 4 Ȑ
Preordered transactions Lazy state determination API Extract concurrency using speculative transactions -
Pot Active Serialized 2 1 3 4 5 Key observation:
speculative transactions only modify state when they commit. -
Pot Active Serialized 2 1 3 4 5 Force transactions
to commit in the order the replicas agreed upon. -
Pot Active Serialized Active Serialized 2 1 3 4 5
Key observation: now we know which transaction commits next. -
Pot Active Serialized Active Serialized 2 1 3 4 5
Execute it in a fast mode that bypasses speculation. -
Pot Active Serialized Active Serialized 2 1 3 4 5
If consecutive transactions commute, Pot can execute them as fast simultaneously. -
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) -
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) -
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) -
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) -
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 -
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 -
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) -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 ≈ -
Contributions 㱻 2 1 3 4 Ȑ
Preordered transactions Lazy state determination API -
Traditional API begin … [=42] v ← read(stock) if v
> 0: v ← v - 1 [→41] write(stock, v) … commit -
Traditional API begin … [=42] v ← read(stock) if v
> 0: v ← v - 1 [→41] write(stock, v) … commit -
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. -
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. -
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 -
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. -
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 -
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. -
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 -
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. -
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. -
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. -
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 -
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 -
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 -
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 -
Conclusion •Scale state machine replication on multicore servers with minimal
impact for application developers •Pot guarantees correctness •LSD improves efficiency -
Executing requests concurrently in state machine replication Ph.D. defence Tiago
Vale Advisors: João Lourenço, Ricardo Dias -
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) -
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 Sequential 2PL OCC Pot Pot+LSD