Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Executing requests concurrently in state machin...

Executing requests concurrently in state machine replication

Slides of my Ph.D. defence.

Tiago Vale

May 03, 2019
Tweet

More Decks by Tiago Vale

Other Decks in Research

Transcript

  1. Motivation Society increasingly dependent on computer systems Systems operate on

    environments where failures happen Systems should tolerate faults + =
  2. State machine replication Ȑ 2 1 3 4 Ȑ 2

    1 3 4 Ȑ 2 1 3 4 Agreement 2 1 3 4
  3. Research statement Can we scale state machine replication on multicore

    servers with minimal impact for application developers?
  4. Our approach 2 1 3 4 Ȑ   

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

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

     Preordered transactions Lazy state determination API Extract concurrency using speculative transactions
  7. Contributions 㱻 2 1 3 4 Ȑ   

     Preordered transactions Lazy state determination API Extract concurrency using speculative transactions
  8. Pot Active Serialized 2 1 3 4 5 Key observation:

    speculative transactions only modify state when they commit.
  9. Pot Active Serialized 2 1 3 4 5 Force transactions

    to commit in the order the replicas agreed upon.
  10. Pot Active Serialized Active Serialized 2 1 3 4 5

    Key observation: now we know which transaction commits next.
  11. Pot Active Serialized Active Serialized 2 1 3 4 5

    Execute it in a fast mode that bypasses speculation.
  12. Pot Active Serialized Active Serialized 2 1 3 4 5

    If consecutive transactions commute, Pot can execute them as fast simultaneously.
  13. 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)
  14. 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)
  15. 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)
  16. 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)
  17. 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
  18. 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
  19. 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)
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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 ≈
  28. Contributions 㱻 2 1 3 4 Ȑ   

     Preordered transactions Lazy state determination API
  29. Traditional API begin … [=42] v ← read(stock) if v

    > 0: v ← v - 1 [→41] write(stock, v) … commit
  30. Traditional API begin … [=42] v ← read(stock) if v

    > 0: v ← v - 1 [→41] write(stock, v) … commit
  31. 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.
  32. 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.
  33. 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
  34. 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.
  35. 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
  36. 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.
  37. 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
  38. 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.
  39. 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.
  40. 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.
  41. 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
  42. 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
  43. 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
  44. 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
  45. Conclusion •Scale state machine replication on multicore servers with minimal

    impact for application developers •Pot guarantees correctness •LSD improves efficiency
  46. 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)
  47. 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