Large Objects Ruin the Party – Valkey 9 Tames Them
Blog post from Momento
Valkey 9.0 introduces a significant performance improvement over its predecessor by implementing a feature called reply copy avoidance, which addresses the adverse impact of handling large objects on system performance. In Valkey 8.1, fetching large objects such as 10MB blobs led to increased latency and degraded the performance of systems serving smaller objects due to the main thread being blocked on memory copy operations. By contrast, Valkey 9.0 minimizes this issue by using pointer references instead of copying large data, allowing the I/O threads to handle data transfer more efficiently without blocking the main thread. This change ensures that large object traffic has minimal impact on small object workloads, maintaining low latency even in mixed environments. The optimization is controlled by configurations that are not included in the default settings, yet their default values are suitable for most scenarios. This feature is part of a series of community-driven enhancements aimed at optimizing cache performance, with future updates expected to further improve system efficiency.