Slide 1

Slide 1 text

Executing requests concurrently in state machine replication Ph.D. defence Tiago Vale Advisors: João Lourenço, Ricardo Dias

Slide 2

Slide 2 text

Motivation Society increasingly dependent on computer systems

Slide 3

Slide 3 text

Motivation Society increasingly dependent on computer systems Systems operate on environments where failures happen

Slide 4

Slide 4 text

Motivation Society increasingly dependent on computer systems Systems operate on environments where failures happen Systems should tolerate faults + =

Slide 5

Slide 5 text

Fault tolerance via redundancy

Slide 6

Slide 6 text

Fault tolerance via redundancy

Slide 7

Slide 7 text

Fault tolerance via redundancy

Slide 8

Slide 8 text

Fault tolerance via redundancy do_stuff(); do_stuff(); do_stuff(); do_stuff();

Slide 9

Slide 9 text

State machine replication Ȑ Ȑ Ȑ

Slide 10

Slide 10 text

State machine replication Ȑ Ȑ Ȑ

Slide 11

Slide 11 text

State machine replication Ȑ Ȑ Ȑ Agreement 2 1 3 4

Slide 12

Slide 12 text

State machine replication Ȑ 2 1 3 4 Ȑ 2 1 3 4 Ȑ 2 1 3 4 Agreement 2 1 3 4

Slide 13

Slide 13 text

Tension 2 1 3 4 Ȑ     vs.

Slide 14

Slide 14 text

Research statement Can we scale state machine replication on multicore servers with minimal impact for application developers?

Slide 15

Slide 15 text

Our approach 2 1 3 4 Ȑ    

Slide 16

Slide 16 text

Our approach 2 1 3 4 Ȑ     Extract concurrency using speculative transactions

Slide 17

Slide 17 text

Contributions 㱻 2 1 3 4 Ȑ     Preordered transactions Extract concurrency using speculative transactions

Slide 18

Slide 18 text

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)

Slide 67

Slide 67 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 Sequential 2PL OCC Pot Pot+LSD