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

Executing requests concurrently in state machine replication

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. Executing requests concurrently in state machine replication Ph.D. defence Tiago

    Vale Advisors: João Lourenço, Ricardo Dias
  2. Motivation Society increasingly dependent on computer systems

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

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

    environments where failures happen Systems should tolerate faults + =
  5. Fault tolerance via redundancy

  6. Fault tolerance via redundancy

  7. Fault tolerance via redundancy

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

  9. State machine replication Ȑ Ȑ Ȑ

  10. State machine replication Ȑ Ȑ Ȑ

  11. State machine replication Ȑ Ȑ Ȑ Agreement 2 1 3

    4
  12. State machine replication Ȑ 2 1 3 4 Ȑ 2

    1 3 4 Ȑ 2 1 3 4 Agreement 2 1 3 4
  13. Tension 2 1 3 4 Ȑ    

    vs.
  14. Research statement Can we scale state machine replication on multicore

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

  16. Our approach 2 1 3 4 Ȑ   

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

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

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

     Preordered transactions Lazy state determination API Extract concurrency using speculative transactions
  20. Traditional transactions 2 1 3 4 5

  21. Traditional transactions Active Serialized 2 1 3 4 5

  22. Traditional transactions Active Serialized 2 1 3 4 5

  23. Traditional transactions Active Serialized 2 1 3 4 5

  24. Pot Active Serialized 2 1 3 4 5 Key observation:

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

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

  27. Pot Active Serialized Active Serialized 2 1 3 4 5

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

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

    2 1 3 4 5
  30. Pot Active Serialized Active Serialized 2 1 3 4 5

    If consecutive transactions commute, Pot can execute them as fast simultaneously.
  31. 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)
  32. 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)
  33. 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)
  34. 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)
  35. 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
  36. 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
  37. 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)
  38. 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
  39. 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
  40. 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
  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
  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
  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
  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 ~4x
  45. 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 ≈
  46. Contributions 㱻 2 1 3 4 Ȑ   

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

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

    > 0: v ← v - 1 [→41] write(stock, v) … commit
  49. 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.
  50. 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.
  51. 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
  52. 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.
  53. 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
  54. 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.
  55. 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
  56. 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.
  57. 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.
  58. 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.
  59. 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
  60. 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
  61. 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
  62. 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
  63. Conclusion •Scale state machine replication on multicore servers with minimal

    impact for application developers •Pot guarantees correctness •LSD improves efficiency
  64. Thank you for your time.

  65. Executing requests concurrently in state machine replication Ph.D. defence Tiago

    Vale Advisors: João Lourenço, Ricardo Dias
  66. 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)
  67. 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