Valkey 8.1 introduces a new hash table design aimed at reducing memory usage and improving performance. The new implementation minimizes memory accesses by storing up to seven elements per bucket, incorporating a metadata section and secondary hash mechanism to quickly eliminate mismatches. Incremental rehashing, scanning, and random element sampling are supported, leading to up to 20-30 bytes less memory used per key-value pair depending on the configuration.

7m read timeFrom valkey.io
Post cover image
Table of contents
The dictMinimize memory accessesRequired featuresDesignResultsHashes, sets and sorted setsAbout the authorsViktor Söderqvist

Sort: