Replication for Multi-Core Servers Authors: Manos Kapritsos, Yang - - PowerPoint PPT Presentation

replication for multi core servers
SMART_READER_LITE
LIVE PREVIEW

Replication for Multi-Core Servers Authors: Manos Kapritsos, Yang - - PowerPoint PPT Presentation

All about Eve: Execute-Verify Replication for Multi-Core Servers Authors: Manos Kapritsos, Yang Wang, Vivien Quema, Allen Clement, Lorenzo Alvisi, Mike Dahlin Presented by: Shivang Soni, Sai Kopparthi Outline Motivation Insights


slide-1
SLIDE 1

All about Eve: Execute-Verify Replication for Multi-Core Servers

Authors: Manos Kapritsos, Yang Wang, Vivien Quema, Allen Clement, Lorenzo Alvisi, Mike Dahlin Presented by: Shivang Soni, Sai Kopparthi

slide-2
SLIDE 2

Outline

  • Motivation
  • Insights
  • Mechanisms.
  • Architecture
  • Evaluation
slide-3
SLIDE 3

Dependable Services:( system's availability, reliability, maintainability and robust to failures)

Databases Key-value store Coordinating and Locking File Servers

Motivation:

slide-4
SLIDE 4

But just having dependability enough for system design perspective??

slide-5
SLIDE 5

Multicore Systems:

slide-6
SLIDE 6

How to build a Dependable Multithreaded Services?

slide-7
SLIDE 7

How to build a Dependable Application or Services? Answer: State Machine Replication (SMR)

slide-8
SLIDE 8

State Machine Replications (SMR)

SMR Algorithm:

  • 1. Implement a service as a

deterministic state machine.

SERVER

slide-9
SLIDE 9

State Machine Replications (SMR)

SMR Algorithm:

  • 1. Implement a service as a

deterministic state machine.

  • 2. Replicate the service.

SERVER SERVER SERVER

slide-10
SLIDE 10

State Machine Replications (SMR)

SMR Algorithm:

  • 1. Implement a service as a

deterministic state machine.

  • 2. Replicate the service.
  • 3. Provide all the replica with the

same input.

SERVER SERVER SERVER

slide-11
SLIDE 11

SMR Implementation

SERVER SERVER SERVER

slide-12
SLIDE 12

SMR Implementation (Single Threaded Execution)

SERVER SERVER SERVER Agreement module

slide-13
SLIDE 13

SMR Implementation (Single Threaded Execution)

SERVER SERVER SERVER Agreement module Output Output Output

slide-14
SLIDE 14

What if the client requests are processed in multithreaded execution? Does it still work??

slide-15
SLIDE 15

SMR Implementation (Multi-Threaded Execution)

SERVER SERVER SERVER Agreement module Output 1 Output 2 Output 3

slide-16
SLIDE 16

Then how can we achieve both dependability and high performance at a same time ??

slide-17
SLIDE 17

Insights: What do we want?

Output 1 Output 2 Output 3

Output 1 = Output 2 = Output 3

Execution Module

slide-18
SLIDE 18

Prior proposed Architecture design:

SERVER SERVER SERVER Agreement module Output 1 Output 2 Output 3 Execute Step Agree Step

slide-19
SLIDE 19

Execute Verify

Execute - Verify Architecture

slide-20
SLIDE 20

SERVER SERVER SERVER token1 token2 token3 Verify Does the tokens match?

slide-21
SLIDE 21

Two scenarios:

  • 1. Token match (good case scenario)
  • 1. Token does not match.
slide-22
SLIDE 22

SERVER SERVER SERVER YES YES YES Verify Token Matched

  • 1. Token Matched: On Convergence
slide-23
SLIDE 23

SERVER SERVER SERVER Verify Token Matched

  • 2. Token Matched: On Convergence conti

..

Commit Commit Commit = Response about transaction send to clients

slide-24
SLIDE 24

SERVER SERVER SERVER Verify Token Not Matched

2.Token does not match: On Divergence

Token 1 Token 2 Token 3 Token 1 Token 2 Token 3 NO

slide-25
SLIDE 25

SERVER SERVER SERVER Verify Token Not Matched

2.Token does not match: On Divergence cont ..

Repair Repair Repair Repair

= Rollback and execute client requests sequentially

slide-26
SLIDE 26

Mechanism:

Eve’s main code.

slide-27
SLIDE 27

Efficiently logic implementations steps.

  • 1. Make the divergence in replicas uncommon to occur.
  • 2. Effectively detect the divergence of all the replicas. (whole application

state and response produced by the replicas are compared.)

  • 3. Efficient way to repair this divergence.
slide-28
SLIDE 28
  • 1. Making Divergence Uncommon

SERVER SERVER SERVER Idea:

  • Find the requests such that even if the requests

are executed in parallel the replica state does not diverges. (example: two request read from same part of the state or two request that modify different part of the state)

slide-29
SLIDE 29
  • 1. Making Divergence Uncommon Conti..

SERVER SERVER SERVER

Mixer:

  • Group together commutative

requests

  • Execute requests within a group in

//el.

slide-30
SLIDE 30

Transaction Read tables Write tables

  • 1. Making Divergence Uncommon Conti..
slide-31
SLIDE 31
  • 2. Efficient way to detect the replicas divergence

Efficiently compare the applications state and responses of the replicas to find if there occurred any divergence.

Token Application Objects (database rows or tables) Merkle Tree

slide-32
SLIDE 32
  • 2. Efficient way to detect the replicas divergence

Efficiently compare the applications state and responses of the replicas to find if there occurred any divergence.

Token Application Objects modification based on client requests. Any modification or update made to the application object, changes only a portion of hash in the token.

slide-33
SLIDE 33

Growing Deterministic Merkle tree

Idea: postpone adding objects until token generation:

  • Ensure that all replicas add objects in the

same order requests are ordered: requestID

  • Single thread per request: object-Seq-

Number

  • (requestID,objectSeqNumber): unique

and sortable pair based on which objects are added in order to generate deterministic tokens. Client requests batch

Request ID: 1 Request ID: 2 Request ID: 3

  • bject-Seq-Number: All applications objects are

assigned with the object-Seq number.

slide-34
SLIDE 34
  • 3. Efficient Divergence Repair

Need to roll back to the application state if divergence occurred.

Rollback Modified object Previous object state Application state

  • rganised using copy-on-

write

slide-35
SLIDE 35

Architecture:

slide-36
SLIDE 36

Dependability Performance Independent execution Non-deterministic Order of requests Replication of Multithreaded services Bonus : Mask Concurrency bugs

slide-37
SLIDE 37

Masking Concurrency bugs

Verify

Server Server Server

Token Token Token

Token Token Token

slide-38
SLIDE 38

Execute-verify: An Architectural change

slide-39
SLIDE 39
slide-40
SLIDE 40

Evaluation

What is the performance benefit of Eve compared to traditional SMR systems? How does the quality of the mixer affect Eve’s performance?

slide-41
SLIDE 41

Experimental Setup

Emulab testbed deployment

  • Execution replicas: 16 cores

Applications

  • H2 Database Engine (TPC-W benchmark)
  • Key-value store (Microbenchmarks)
slide-42
SLIDE 42

Application: H2 Database Engine Workload: TPC-W (browsing)

slide-43
SLIDE 43

Impact of the Mixer

Application: Key-value store

Number of key-value pairs

  • Determines available parallelism

Mixer Quality False conflicts: misclassify non-conflicting requests as conflicting

  • Reduces parallelism

Undetected conflicts: misclassify conflicting requests as non-conflicting

  • Can introduce divergence
slide-44
SLIDE 44

FALSE CONFLICTS REDUCE THE AVAILABLE PARALLELISM

slide-45
SLIDE 45

UNDETECTED CONFLICTS CAUSE DIVERGENCE AND ROLLBACKS

slide-46
SLIDE 46

TPC-W EXPERIMENTS: NO ROLLBACKS OBSERVED

slide-47
SLIDE 47

Conclusion

Replication and multithreading are not mutually exclusive. Redesign replication: from agree-execute to execute -verify . Execute Verify

slide-48
SLIDE 48

Thank You