CprFS

Ruini Xue, Wenguang Chen, Weimin Zheng2008

TL;DR

This paper introduces CprFS, a novel user-level file system designed to provide transparent and consistent file checkpointing for parallel applications. By acting as a file system layer, CprFS ensures that file states are correctly saved and restored during checkpoint and restart operations, addressing a critical gap in existing fault tolerance mechanisms.

What Problem Does This Paper Address?

Large-scale parallel computing systems are increasingly susceptible to failures due to their sheer number of components. Checkpoint and Restart (CPR) is a crucial technique to recover from these failures by periodically saving the application's state. However, most existing CPR tools focus on memory and communication states, neglecting file states. This oversight can lead to data inconsistencies and application errors upon restart, especially when files are modified between checkpoints. While some solutions exist, they often require intrusive application modifications, are limited in the file operations they support, or introduce significant overhead. CprFS aims to solve this by providing a transparent, user-level file system that handles file checkpointing effectively without requiring application code changes.

Methods

CprFS is implemented as a user-level file system using FUSE (Filesystem in Userspace). It operates by intercepting file operations directed to a special mount point (Agent Data Path - ADP). CprFS then translates these requests to the actual underlying file system (Real Data Path - RDP).

Key techniques include:

  • Buffer Mode: CprFS captures all file operations between checkpoints, buffering changes locally. These changes are then committed to stable storage only when a checkpoint is successfully performed. This approach avoids modifying the underlying file system directly.
  • File State Machine: A sophisticated model is developed to track the state of each file (e.g., normal, deleted, renamed, reborn). This state machine handles complex scenarios like rename operations, ensuring consistency across different file states.
  • Transaction Support: CprFS provides APIs (cprfs_begin_tran, cprfs_commit_tran, cprfs_abort_tran) to manage transactions, allowing applications to explicitly control checkpointing boundaries.
  • Parallel File Sharing Conflict Resolution: For parallel applications sharing files across nodes, CprFS implements a conflict detection mechanism. It logs file access information (reads, writes, and their locations) and tests for conflicts before committing data. If conflicts are detected, the transaction can be aborted, and the application can be restarted in a "shadow mode" where changes are applied directly to the original files.

Datasets

The paper does not introduce new datasets. Instead, it evaluates CprFS using:

  • Micro-benchmarks: IOzone is used to measure raw file system performance.
  • Synthetic MPI Application: A custom application is designed to specifically test the conflict detection mechanism for parallel file sharing.
  • Real-world Applications: Four applications are used for evaluation:
  • NPB BTIO (NAS Parallel Benchmarks)
    • ClustalW-MPI
    • mpiBLAST
    • PAPSM (Parallel Power System Simulator)

Key Insights and Ideas

  • User-level File System for CPR: The core innovation is using a user-level file system as the primary mechanism for file checkpointing. This decouples file checkpointing from memory checkpointing and offers transparency and flexibility.
  • Comprehensive File State Management: The detailed file state machine is crucial for handling complex file operations like renames and deletions consistently, which is often overlooked by other CPR tools.
  • Conflict Resolution for Shared Files: The approach to handling conflicts in shared file systems, inspired by transactional memory, is a significant contribution for parallel applications. It allows for potential conflicts to be detected and managed, preventing data corruption.
  • Performance Trade-offs: CprFS demonstrates that while there's an overhead for certain operations (like reads), it can offer significant speedups for write-intensive workloads due to buffering and aggregation.

Key Results

  • Performance:
    • Sequential write operations saw a speedup of 11.62% due to data aggregation.
  • Sequential read operations were 7.30% slower.
  • Random read and write operations incurred overheads of 15.60% and 11.87%, respectively.
  • For real-world applications, CprFS achieved an average speedup of 3.58% when running without checkpointing.
  • When checkpointing was enabled, CprFS introduced an acceptable overhead, with applications like BTIO and PAPSM even showing speedups due to CprFS's write aggregation.
  • Conflict Test Overhead: The overhead for conflict testing increased with the number of processes and the overlap ratio of file access, but remained manageable.
  • Checkpointing Overhead: The contribution of CprFS to the overall checkpointing time was generally small, with synchronization and memory dumping being the dominant factors.

Limitations and Future Work

  • Directory Operations: The current file access pattern model does not perfectly support complex directory operations. A more elegant scheme is needed for this.
  • Memory-Mapped Files: CprFS does not currently support memory-mapped files, as these operations are translated into memory operations and bypass standard file I/O APIs. This is a key area for future work.
  • Integration with Parallel File Systems: The authors plan to integrate CprFS more tightly with well-known parallel file systems like PVFS and Lustre to leverage their functionalities (e.g., client cache, file locking).
  • Support for Other File Types: The current focus is on regular files, with special files (like device files) not being fully addressed.

Summary updated

Abstract

Checkpoint and Restart (CPR) is becoming critical to large scale parallel computers, whose Mean Time Between Failures (MTBF) may be much shorter than the execution times of the applications. The CPR mechanism should be able to store and recover the states of virtual memory, communication and files for the applications in a consistent way.
BibTeX
@misc{xue2008cprfs,
  author = {Ruini Xue and Wenguang Chen and Weimin Zheng},
  title = {{CprFS}},
  year = {2008},
  doi = {10.1145/1375527.1375547},
}
Figure