More than six months after the previous 8.0 release, the Valkey devs announced the general availability of the brand-new version 8.1 for this open-source, high-performance, in-memory data store, which can also be used as a drop-in replacement for Redis.
One of the key highlights in Valkey 8.1 is its newly implemented hashtable, which now serves as the core key-value store and powers Hash, Set, and Sorted Set data types. This rewrite leverages modern design techniques to reduce memory allocations and access to random memory. Early observations show:
- Memory savings of approximately 20 bytes per key-value pair (no TTL) and up to 30 bytes when TTL is enabled.
- Throughput gains of roughly 10% compared to Valkey 8.0 under pipeline workloads (when I/O threading is disabled).
Another highlight of the release is iterator prefetching. When a Valkey node needs to transmit keys and values to a newly connected replica, the system now proactively loads the relevant buckets and elements into the CPU cache.
According to initial measurements, this speeds up iteration by a factor of 3.5, which can substantially shorten the time needed for commands such as KEYS. Furthermore, I/O threads have been given expanded responsibilities, making it possible to offload more tasks—from handling TLS negotiation to reading and writing replication streams—to the I/O thread pool.
This change boosts new connection acceptance rates, improves throughput for operations like GET and SET, and further speeds up replication traffic.
In addition to performance, Valkey 8.1 includes a handful of replication improvements. Full syncs with TLS enabled are now up to 18% faster, largely thanks to removing redundant CRC checks. Moreover, fork copy-on-write memory overhead has been reduced by roughly 47%.
Active defragmentation is also more predictable: latencies over 1 ms have been effectively eliminated, and the defrag cycle time is reduced to 500 microseconds, with higher frequency to maintain lower tail latencies. An anti-starvation mechanism ensures that defragmentation still meets its CPU usage goals, even with long-running commands.
Observability has also been given careful attention. New logging format and timestamp style options allow administrators to choose between legacy or structured log formats (logfmt) and among different timestamp representations—such as the more modern ISO 8601.
Valkey 8.1 additionally introduces the COMMANDLOG feature, which can record large requests and replies, offering a more detailed view of end-to-end latency. On top of that, the built-in latency monitoring framework now reports not only the latest detected latency events but also the total recorded latencies and the number of spikes, giving a clearer window into both frequency and impact.
Finally, there are a few other improvements. Conditional updates with SET IFEQ allow for streamlined operations, eliminating extra client-side logic and roundtrip overhead. The ZRANK command was made more efficient for Leaderboards, sometimes performing up to 45% faster.
HyperLogLog operations gain a 12x boost in speed for merges and counts through Advanced Vector Extensions on x86, and BITCOUNT sees a potential increase of over 500% thanks to AVX2 optimizations. Floating-point parsing in commands like ZADD is also faster, though opting-in requires a C++ compiler with SIMD instructions.
For more information, see the announcement.