v0.9.4-b - Production-Ready Performance
Pre-releasemmap-io: Production-Ready Performance
This release marks the evolution of mmap-io from a powerful library to a production-grade storage toolkit. With a suite of new features engineered specifically for high-performance systems, this version delivers unparalleled control over memory behavior, I/O latency, and durability.
nternal operations have been heavily optimized and benchmarked to eliminate performance cliffs and ensure predictable, nanosecond-level access for the most demanding workloads.
Engineered for Predictability and Speed
This release moves beyond raw speed to focus on performance consistency—eliminating the guesswork and variability that kill performance in real-world, heavy-load scenarios.
- Page Pre-warming (
touch_pages): Eliminate first-access latency and prevent performance jitter from page faults. The newtouch_pages()method andTouchHint::Eagerbuilder option pre-fault memory pages into RAM, ensuring your critical operations always run at memory speed.
- Intelligent Microflush Optimization: Small, frequent writes—critical for workloads like a Write-Ahead Log (WAL)—are now significantly more efficient. The
flush_range()method automatically detects sub-page-size flushes and expands them to page boundaries, reducing syscall overhead and aligning with how the underlying hardware operates. - Multi-Tier Huge Page Handling: The
hugepagesfeature is now smarter than ever. It uses a multi-tier fallback system on Linux, attempting to secure optimized huge pages first before gracefully falling back to Transparent Huge Pages (THP) and then to standard pages, ensuring you get the best possible performance without sacrificing reliability.
Automated Durability & Developer Experience
- Time-Based Automatic Flushing: The
FlushPolicy::EveryMillispolicy is now fully implemented, spawning a background thread to handle periodic flushes automatically. This provides a simple, "set-it-and-forget-it" mechanism for balancing performance and durability without manual intervention. - Comprehensive Benchmarking Suite: We've added dedicated benchmarks to measure page fault costs, microflush overhead, and the real-world impact of page pre-warming, ensuring all performance claims are validated.
Known Issues Resolved
The previously noted performance dip in small-op (<4KB) cases has been resolved. The new microflush optimization directly targets and fixes this issue, ensuring high throughput across all write sizes.
Ready for Production
The API surface is stable and the internals are robust. mmap-io is ready for your most serious workloads, from database engines like HiveDB to high-frequency trading systems, cache engines, and low-latency data pipelines.
Built for developers who demand nanosecond precision, zero-overhead memory I/O, and full platform correctness.
Feedback Wanted
This is a Beta release — API surface is stable, but we're still tuning the guts for edge-case performance. If you're using this in serious workloads (like HiveDB, cache engines, or low-latency pipelines), drop issues or suggestions and we’ll make it better.
This beta is stable, cross-platform, async-ready, and poised for production-level memory IO workloads.