TL;DR
This paper introduces MigrOS, an OS-level architecture that enables transparent live migration of containerized applications using RDMA (Remote Direct Memory Access) networks. By making minimal modifications to the RDMA protocol and the container migration tool (CRIU), MigrOS allows applications to maintain their RDMA connections seamlessly during migration, a feat previously impossible without application-level support.
What Problem Does This Paper Address?
RDMA networks offer significant performance advantages for high-performance computing and cloud environments by bypassing the OS for direct memory access between applications and network interface controllers (NICs). This OS-bypass, while boosting speed, removes the OS from the communication path, making it difficult to manage and migrate active RDMA connections transparently. Containers, on the other hand, are designed for easy deployment and migration, but their isolation principles clash with RDMA's "closer to hardware" approach. Existing container migration tools like CRIU can handle traditional network connections (like TCP/IP) but struggle with the state managed by RDMA NICs, leading to broken connections and application failures during migration. This paper addresses the challenge of enabling transparent live migration for containerized RDMA applications without requiring modifications to the applications themselves or sacrificing RDMA's performance benefits.
Methods
MigrOS introduces a novel OS-level architecture that integrates with modern container runtimes and CRIU. The core of MigrOS involves:
- Modified RDMA Protocol (RoCEv2): Minimal changes are made to the RoCEv2 protocol, primarily by introducing two new Queue Pair (QP) states: "Stopped" (for checkpointing) and "Paused" (to handle partner QPs during migration). Additionally, two new message types, "PAUSE" and "RESUME," are added to manage the connection state during migration. These changes are designed to be implemented within the NIC's firmware or hardware.
- Extended CRIU: The checkpoint/restore utility (CRIU) is extended to understand and save/restore RDMA-specific objects like Queue Pairs (QPs) and Memory Regions (MRs). This involves new API calls (
ibv_dump_contextandibv_restore_object) that allow CRIU to interact with the RDMA verbs API and the underlying driver. - Modified IB Verbs Library: The user-level IB verbs library is modified to support the serialization and deserialization of RDMA objects, enabling CRIU to capture and restore their state.
- SoftRoCE Driver Modification: The SoftRoCE driver, a software implementation of RoCEv2, is modified to incorporate the new protocol states and message types, acting as a proof-of-concept for the hardware-level changes.
Crucially, MigrOS requires no modifications to the user applications themselves, maintaining transparency and backward compatibility.
Datasets
Not discussed in the paper. The paper focuses on microbenchmarks and real-world MPI applications for evaluation.
Key Insights and Ideas
- RDMA NICs as "White Boxes": MigrOS treats RDMA NICs not as opaque black boxes but as components whose internal state can be exposed and managed for migration. This is a significant departure from previous approaches that often required application-level awareness.
- Minimal Protocol Changes for Maximum Impact: The paper demonstrates that only a few subtle changes to the RDMA protocol (new states and message types) are sufficient to enable transparent live migration, highlighting the efficiency of the proposed approach.
- Decoupling Migration from Application Logic: By handling migration at the OS and driver level, MigrOS ensures that applications remain unaware of the migration process, preserving their performance and simplifying deployment.
- The Challenge of Unreliable Datagram (UD) Communication: The paper acknowledges that MigrOS currently only supports reliable connections (RC) and not unreliable datagram (UD) communication due to the inherent nature of UD where sender addresses are exposed and can change during migration.
Key Results
- Performance: MigrOS achieves up to 33% lower network latency compared to software-only techniques. Crucially, the overhead of migratability outside the migration phase is negligible, meaning applications that never migrate still benefit from RDMA performance.
- Migration Cost: The time to migrate RDMA connections is proportional to the number of QPs and the total memory registered in MRs. For MPI applications, migration latency was measured in seconds, influenced by checkpointing, transfer, and restore times.
- Implementation Effort: The changes to the RoCEv2 protocol are minimal, accounting for only about 10% of the SoftRoCE driver's codebase.
Limitations and Future Work
- Unreliable Datagram (UD) Support: MigrOS currently does not support live migration for UD communication. Future work aims to address this by potentially introducing a mechanism for the NIC to manage dynamic sender addresses.
- Security: The paper notes that RDMA networks generally lack robust authentication and integrity control. While MigrOS doesn't degrade existing security, it relies on the host OS to ensure authorized pause/resume messages. Future work could explore integrating stronger security protocols.
- Namespace-based RDMA Object Identification: The paper identifies a potential conflict when restoring RDMA objects (MRs and QPs) if their IDs are already in use. A namespace-based mechanism, similar to Linux's process ID namespaces, is suggested for future work.
- Hardware Implementation: While the paper presents a software proof-of-concept, the full benefits would be realized with hardware implementations in NICs. The authors believe their proposed changes are amenable to firmware implementation.
- Broader Applications: The pause/resume protocol could be extended for other uses like efficient fail-over and congestion control.
Summary updated