UMap: Enabling Application-driven Optimizations for Page Management

Ivy Peng, Marty McFadden, Eric Green, Keita Iwabuchi, Kai Wu, Dong Li, Roger Pearce, Maya Gokhale · DOI

Abstract

Leadership supercomputers feature a diversity of storage, from node-local persistent memory and NVMe SSDs to network-interconnected flash memory and HDD. Memory mapping files on different tiers of storage provides a uniform interface in applications. However, system-wide services like mmap are optimized for generality and lack flexibility for enabling application-specific optimizations. In this work, we present UMap to enable user-space page management that can be easily adapted to access patterns in applications and storage characteristics. UMap uses the userfaultfd mechanism to handle page faults in multi-threaded applications efficiently. By providing a data object abstraction layer, UMap is extensible to support various backing stores. The design of UMap supports dynamic load balancing and I/O decoupling for scalable performance. UMap also uses application hints to improve the selection of caching, prefetching, and eviction policies. We evaluate UMap in five benchmarks and real applications on two systems. Our results show that leveraging application knowledge for page management could substantially improve performance. On average, UMap achieved 1.25 to 2.5 times improvement using the adapted configurations compared to the system service.

Introduction: The Limitations of Generic Memory Management

In modern high-performance computing (HPC), storage is no longer a simple hierarchy. Supercomputers now feature a complex mix of node-local NVMe SSDs, persistent memory (PM), and network-attached HDDs. Traditionally, developers use the mmap system call to treat these files as if they were part of the system's RAM.

However, mmap is a kernel-level service designed for generality. It uses fixed page sizes (typically 4KB) and rigid eviction policies (like Least Recently Used) that don't account for the specific access patterns of a particular program. For "out-of-core" applications—those processing datasets far larger than available RAM—the overhead of the kernel's generic page fault handling becomes a massive bottleneck. The authors argue that the application itself knows its data access patterns best and should be the one managing its memory.

UMap Architecture

UMap is an open-source library that moves page management from the kernel into user space. Its architecture relies on several novel components designed for high-concurrency and low-latency I/O.

The UMap architecture showing the flow from application page faults to user-space management and backend storage.

Key Components:

  • userfaultfd Integration: Instead of relying on standard kernel signals (like SIGSEGV), UMap uses the Linux userfaultfd mechanism. This allows a user-space thread to catch page faults asynchronously, preventing the faulting process from idling while the data is fetched.
  • I/O Decoupling: UMap separates the work into three groups of threads: Managers (which poll for system events), Fillers (which fetch data from storage to RAM), and Evictors (which write dirty pages back to storage). This decoupling allows the system to handle long-latency I/O tasks without blocking the application.
  • Dynamic Load Balancing: To handle "hot" and "cold" memory regions (common in graph analytics), UMap uses a "work-stealing" strategy to distribute page-filling tasks across available threads.
  • Extensible Backing Store: UMap provides an abstraction layer (Store Objects), making it easy to support different storage types, from local SSDs to remote databases, without changing the application logic.
  • Configurable Knobs: Developers can tune the internal page size (from 4KB to 64MB), prefetching windows, and eviction thresholds via a simple API or environment variables.

Evaluation and Results

The researchers evaluated UMap using five distinct workloads on two different testbeds (AMD with local NVMe and Intel with network-attached Lustre storage). The workloads included out-of-core sorting, graph processing (BFS), file compression, asteroid detection, and a persistent memory database (N-Store).

The 4KB Bottleneck and Page Size Optimization

One of the most significant findings is the impact of page size. Standard OS pages (4KB) are often too small for high-bandwidth NVMe storage. UMap showed that increasing the page size for sorting tasks reduced the total number of page faults and allowed for "bulky" transfers that better exploited hardware bandwidth.

Performance comparison of UMap vs. mmap for an out-of-core sort, showing the impact of increasing page size on speedup.

As shown in the figure above, while UMap's overhead at the default 4KB page size is higher than mmap, it scales significantly better. By increasing the page size to 8MB, UMap achieved a 2.5x speedup over the standard system service. Similar trends were observed in graph processing, where UMap outperformed mmap by 1.8x using a 512KB page size.

Application-Awareness and Database Scaling

For the Asteroid Detection app, UMap integrated a custom FITS (Flexible Image Transport System) handler. This allowed the library to resolve page faults by understanding the underlying file format, a level of optimization impossible for a generic kernel service. In the N-Store database test, UMap improved throughput by 34% and showed better scalability as the number of application threads increased. Notably, porting N-Store to UMap required changing only about ten lines of code.

Conclusion

UMap demonstrates that giving applications control over memory management can lead to substantial performance gains in data-intensive HPC environments. By bypassing generic kernel policies and leveraging application-specific knowledge—such as optimal page sizes and custom prefetching—UMap achieves up to 2.5x speedup over standard mmap. Future work includes automating the tuning of these parameters and exploring support for disaggregated memory architectures using RDMA.

Summary updated

BibTeX
@misc{peng2019umap,
  author = {Ivy Peng and Marty McFadden and Eric Green and Keita Iwabuchi and Kai Wu and Dong Li and Roger Pearce and Maya Gokhale},
  title = {{UMap: Enabling Application-driven Optimizations for Page Management}},
  year = {2019},
  eprint = {1910.07566},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.07566},
}
Figure