csc2 458 parallel and distributed systems checkpointing
play

CSC2/458 Parallel and Distributed Systems Checkpointing and Recovery - PowerPoint PPT Presentation

CSC2/458 Parallel and Distributed Systems Checkpointing and Recovery Sreepathi Pai April 17, 2018 URCS Outline Checkpointing and Recovery Independent Checkpointing Coordinated Checkpointing Message Logging Outline Checkpointing and


  1. CSC2/458 Parallel and Distributed Systems Checkpointing and Recovery Sreepathi Pai April 17, 2018 URCS

  2. Outline Checkpointing and Recovery Independent Checkpointing Coordinated Checkpointing Message Logging

  3. Outline Checkpointing and Recovery Independent Checkpointing Coordinated Checkpointing Message Logging

  4. Errors happen • Errors happen • How do we recover from them (say, for message loss)? • (before information theory): ? • (after information theory): ?

  5. Checkpointing and Recovery To checkpoint is to save the state of a computation so that you can “rollback” to it • Examples: • Save games • Virtual machine snapshots Recovery is then “simply” restoring the checkpoint

  6. Distributed Checkpointing: The Challenge • Processes only know: • which messages they have received • which messages they have sent • what their local state is • Checkpointing ideally should not require everybody to “pause” • Must run concurrently with computation

  7. The Recovery Line Recovery line Checkpoint Initial state P1 Failure P2 Time Message sent Inconsistent collection from P2 to P1 of checkpoints

  8. Outline Checkpointing and Recovery Independent Checkpointing Coordinated Checkpointing Message Logging

  9. Algorithm • A process records its local state independently • messages sent/received included • A recovery for a process entails going back to its most recent checkpoint • Unfortunately, this can’t be done independently

  10. Rollbacks Checkpoint Initial state P1 Failure m* m P2 Time Assume P 2 fails. How far we do need to rollback to achieve a consistent worldview?

  11. Detecting dependencies • For a process P i , let INT i ( m ) be the interval between the m − 1 and m checkpoints. • All messages sent in INT i ( m ) contain ( i , m ) • When process P j receives this message, it may be in INT j ( n ) • records dependency INT i ( m ) → INT j ( n ) • saves dependency with checkpoint

  12. Rolling back: Consistency • If P i rolls back to checkpoint m − 1, no messages from INT i ( m ) were ever sent • All checkpoints dependent on INT i ( m ) are invalid • Rollbacks need to continue until consistency is reached

  13. Outline Checkpointing and Recovery Independent Checkpointing Coordinated Checkpointing Message Logging

  14. Algorithm • Coordinator broadcasts CHECKPOINT-REQUEST message to all processes • When this request is received, • Process checkpoints local state • Acknowledges to coordinator that it has taken checkpoint and waits • When coordinator receives acknowledgements from all processes, it sends CHECKPOINT-DONE • Processes resume computation • What about messages?

  15. Message handling • All incoming messages received after CHECKPOINT-REQUEST are not considered part of the checkpoint • All outgoing messages are held back until CHECKPOINT-DONE is received • This results in a “globally consistent state” • How?

  16. Outline Checkpointing and Recovery Independent Checkpointing Coordinated Checkpointing Message Logging

  17. Basic idea • Computations are deterministic and rely only on messages transmitted • Save messages from a checkpoint and replay them during recovery

  18. Piecewise deterministic execution • A piecewise deterministic computation interval: • starts with a non-deterministic event (e.g. receipt of a message) • continues in a completely deterministic fashion • ends just before another non-deterministic event This implies that only non-deterministic events need to be logged.

  19. Who should save the messages? Q crashes and recovers P m2 is never replayed, m1 m1 so neither will m3 Q m3 m2 m3 m2 R Unlogged message Time Logged message

  20. Orphan processes • Let DEP ( m ) represent processes that depend on message m • Let COPY ( m ) represent processes that contain a copy of m • but may not have logged it • Note, m contains all details necessary to retransmit it A process Q is orphaned if and only if: • Q depends on m (i.e. Q ∈ DEP ( m )) • All processes in COPY ( m ) have failed • So m cannot be played back

  21. Pessimistically avoiding orphan processes • Orphan processes can be avoided by ensuring that • A non-deterministic message is sent only to one process • That process cannot send another message without logging m

  22. Further reading Chandy and Lamport, “Distributed Snapshots: Determining Global States of Distributed Systems”, ACM TOCS 1985

  23. Acknowledgments All figures from Van Steen and Tanenbaum, Distributed Systems, 3rd Edition, Chapter 8.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend