PAIO: General, Portable I/O Optimizations With Minor Application Modifications

Ricardo Macedo, Yusuke Tanimura, Jason Haga, Vijay Chidambaram, José Pereira, João PauloFAST 2022

TL;DR

This paper introduces PAIO, a user-level framework that allows for portable and adaptable I/O optimizations across different applications with minimal code changes. PAIO decouples storage policies from system implementations, enabling fine-grained control and improved performance, particularly in reducing tail latency and guaranteeing per-application bandwidth in shared storage environments.

What Problem Does This Paper Address?

Modern data-centric systems like databases and machine learning frameworks rely heavily on efficient I/O operations. However, existing storage optimizations are often tightly coupled to specific system implementations, making them difficult to port, maintain, and adapt. This leads to several issues:

  • Lack of Portability: Optimizations for one system (e.g., RocksDB) require significant refactoring to be applied to another, even if they share similar high-level designs.
  • Interference in Shared Environments: When multiple applications or tenants share storage resources, their independently implemented optimizations can conflict, leading to unpredictable performance and I/O contention.
  • Rigid Interfaces: Traditional I/O stacks have rigid interfaces that limit the propagation of crucial context information (like the origin of a request) from higher layers to lower ones. This prevents optimizations from making informed decisions.
  • Kernel-Level Complexity: While kernel-level optimizations offer system-wide visibility, they are complex to develop, error-prone, and can break compatibility with newer kernel versions or kernel-bypass architectures.

The authors aim to bridge this gap by providing a flexible, user-level framework that decouples I/O optimizations, allowing them to be applied broadly and dynamically across various applications and storage layers.

Methods

PAIO is built upon five core principles: general applicability, programmable building blocks, fine-grained I/O control, stage coordination, and low intrusiveness. Its architecture consists of two main parts:

  • Data Plane Stages: These are user-level components embedded within existing I/O layers (e.g., applications, file systems). They intercept I/O requests and apply user-defined policies. PAIO uses four key abstractions for this:
  • Enforcement Objects: Self-contained modules that implement specific I/O mechanisms (e.g., rate limiting, caching).
  • Channels: Streams that route requests to specific enforcement objects.
  • Context Objects: Metadata associated with each request, carrying classifiers like workflow ID, request type, and custom context information.
  • Rules: Actions that control the stage's behavior, managed by the control plane.
  • Control Plane: A logically centralized manager that provides global visibility and orchestrates the data plane stages. It dynamically tunes enforcement objects based on workload variations and policies.

A key innovation is context propagation, inspired by techniques used in distributed systems. PAIO allows application-level information (e.g., whether a request is from a foreground or background task) to be propagated down the I/O stack and included in the Context object. This enables much finer-grained differentiation and policy enforcement than previously possible without modifying core system code.

PAIO is implemented as a user-level library, minimizing code changes required for integration. For scenarios where context propagation isn't needed, it can even be integrated transparently using LD_PRELOAD.

Datasets

The paper does not explicitly mention the use of specific named datasets for training. However, the evaluation uses:

  • Synthetic Workloads: For performance and scalability testing, simulating applications submitting requests in a closed loop with varying client numbers and request sizes.
  • Real-World Scenarios:
    • RocksDB: Tested with industry-standard benchmarks and workloads simulating production environments (e.g., YCSB workload A, read-heavy, write-heavy).
  • TensorFlow: Evaluated on the ImageNet dataset (approximately 150GiB) for model training in a shared storage scenario.

The authors also mention using the /proc file system for collecting system-level I/O metrics.

Key Insights and Ideas

  • Decoupling is Key: The fundamental insight is that storage optimizations can be effectively decoupled from the underlying applications and file systems, leading to greater portability and maintainability.
  • Context is King: Propagating application-specific context information down the I/O stack is crucial for enabling sophisticated, fine-grained I/O policies that were previously impossible without deep system integration.
  • User-Level Power: Demonstrating that complex I/O optimizations can be achieved effectively at the user-level, avoiding the complexities and compatibility issues of kernel-level development.
  • Policy vs. Mechanism Separation: The clear separation between the control plane (policy) and data plane stages (mechanism) makes the system highly adaptable and programmable.

Key Results

  • Tail Latency Reduction: In RocksDB, PAIO-enabled optimizations improved 99th percentile latency by up to 4x compared to baseline RocksDB, achieving performance comparable to SILK (a system requiring extensive code modification).
  • Per-Application Bandwidth Guarantees: In a shared storage scenario with TensorFlow, PAIO dynamically enforced per-application bandwidth guarantees, ensuring that instances met their policies and completed execution significantly faster than baseline or blkio-based approaches. For example, PAIO finished executions 39, 15, and 3 minutes faster for specific instances compared to blkio.
  • Low Overhead and Scalability: PAIO itself has low overhead, and its performance scales well with the number of channels, achieving high throughput and low latency in benchmark tests.
  • Minimal Code Changes: Integrating PAIO into RocksDB required adding only 85 lines of code, while TensorFlow integration required no code changes (using LD_PRELOAD).

Limitations and Future Work

  • I/O Cost Determination: The paper notes that determining the exact I/O cost (e.g., cost per byte) can be complex and is complementary to their work. Policies sensitive to I/O cost might benefit from further integration with such cost-aware mechanisms.
  • Asynchronous Enforcement: While PAIO supports synchronous enforcement by default, developing asynchronous enforcement objects requires careful consideration to preserve correctness and fault tolerance guarantees.
  • Broader Interface Support: The current implementation primarily supports POSIX read/write calls. Future work could extend support to other interfaces like KVS or object store APIs.
  • Control Plane Complexity: The paper acknowledges that the dependability of data plane stages and the resolution of conflicting policies are the responsibility of the control plane, which is considered orthogonal to this work. Developing more sophisticated control plane logic is a potential area for future research.

Summary updated

BibTeX
@inproceedings{macedo2022paio,
  author = {Ricardo Macedo and Yusuke Tanimura and Jason Haga and Vijay Chidambaram and José Pereira and João Paulo},
  title = {{PAIO: General, Portable I/O Optimizations With Minor Application Modifications}},
  booktitle = {FAST},
  year = {2022},
  url = {https://openreview.net/forum?id=Da5jGXo2Yn},
}
Figure