Valkey 8.1: Redis fork features performance, memory improvements, and new modules

Valkey

It has been announced release of the new version of «Valkey 8.1», a fork of Redis that was born after its transition to a proprietary license, and which seeks to maintain the open philosophy of the original project.

Valkey 8.1 It features a large number of improvements and changes, whose main focus is on performance optimizations that reduce latency, increase memory efficiency and new modular capabilities.

Key new features in Valkey 8.1

Uno of the most significant changes in this version is the complete rewrite of the hash table, used both in key-value data storage and in structured data types such as Hash, Set, and Sorted Set. Thanks to this redesign, A reduction in memory usage has been achieved: 20 bytes less per key without TTL, and up to 30 bytes if the key has a defined lifetime. Furthermore, the reduction in random memory access has improved performance by 10% in single-threaded I/O environments.

Another new feature in Valkey 8.1 is that iteration over keys in operations such as the KEYS command or Key transfer between nodes in a cluster now features a cache preloading system, This allows the next key to be available before it is processed. This approach has increased key lookup speed by 3,5 times by making better use of the processor's cache.

Multi-threaded I/O and TLS improvements

Valkey continues its transition to a multi-threaded I/O model. Now, the TLS connection processing is performed in separate streams, which has tripled the capacity to accept new connections. Functions such as SSL_pending() and ERR_clear_error() have also been isolated into separate threads, resulting in a 10% performance increase for SET operations and a 22% increase for GET operations.

Replication has been improved, especially in environments with active TLS, by eliminating redundant operations such as unnecessary checksums. This has resulted in an 18% improvement in full synchronization during diskless replication and a 47% reduction in the cost of copy and write operations.

Optimizations on ordered sets and probabilistic types

El ZRANK command for ordered sets has been optimized and It is now 45% faster, while ZADD has adopted SIMD instructions for greater efficiency. For probabilistic data types, HyperLogLog has been improved to use only 12 KB of fixed memory, and the use of AVX2 instructions has increased the performance of PFMERGE and PFCOUNT operations by up to 12 times, and BITCOUNT operations by up to 5 times.

Uninterrupted active defragmentation and more control over registries

El active defragmentation system has also been improved to avoid blockages or delays. Now, each defragmentation cycle lasts only 500 microseconds, and an anti-starvation strategy has been implemented to prevent these tasks from being postponed due to long-term operations.

Have been introduced New configuration options for record formatting, including custom time formats and a new COMMANDLOG mode that logs long requests and responses. Additionally, the LATENCY LATEST command has been expanded with new metrics, providing greater visibility into peak and volume latencies recorded.

New features, modules and support

Valkey now allows you to execute the SET IFEQ operation, which conditions the writing of a key to the current value. Also Modular support for script engines is introduced, opening the possibility of using alternative languages ​​to Lua through custom modules.

In this version also several modules debut:

  • Search Module (Google): Vector similarity search engine, ideal for machine learning cases that demand low latency and high throughput.
  • JSON Module (AWS): allows direct manipulation of JSON document fragments, avoiding complete processing of the content on the client.
  • Bloom Filter Module (AWS): Implementation of Bloom filters, useful for determining the possible membership of an element in a set, with probabilistic efficiency

Finally, if you are interested in being able to know more about it, you can consult the details in the following link