Conviva's query engine, built with Rust, DataFusion, and Arrow, initially used `mmap` for reading large Arrow IPC files. This approach was chosen for its convenience and zero-copy random access capabilities, which aligned well with the Arrow IPC format. However, under heavy concurrent query loads in production, `mmap` exhibited significant performance problems. The system experienced OS page cache shrinkage, numerous page faults, and p95 latencies spiking from approximately 30 seconds to over 150 seconds. Adding more pods exacerbated the issue, suggesting `mmap` page-cache thrashing under memory pressure.
To isolate the problem, Conviva conducted a controlled benchmark comparing one pod against four pods on the same host with identical concurrent query loads. The expectation was that four pods would offer better parallelism and isolation. However, the results showed the opposite: a single pod using `mmap` performed significantly better, being up to 41% faster at maximum and over 20% faster at p95 for 14-day queries. This outcome challenged the initial assumption that `mmap` was the direct cause of the performance bottleneck, as the shared `mmap` page cache across pods did not lead to CPU contention.
Despite the benchmark results, the team proceeded with replacing `mmap` with `io_uring`, anticipating an improvement in performance. However, this change unexpectedly led to a slower query engine. This indicates that the initial diagnosis of `mmap` being the primary cause of performance degradation under heavy load was incorrect, and the underlying issues were not resolved by switching to `io_uring`.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
A Rust-based query engine at Conviva experienced performance degradation after replacing `mmap` with `io_uring` for reading Arrow IPC files. The change, intended to improve concurrent query loads, instead led to increased latency and reduced throughput, indicating that `mmap` was not the primary bottleneck as initially suspected.