[CORRUPTED] Synthetic Benchmark PR #14595 - Hash - Unify Field-Value into a single struct along with dict no_value=1#18
Open
bar-qodo wants to merge 5 commits into
Conversation
This was referenced Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmark PR redis#14595
Type: Corrupted (contains bugs)
Original PR Title: Hash - Unify Field-Value into a single struct along with dict no_value=1
Original PR Description: Introducing a new entry.c/h module that unifies field–value pairs with optional expiration into a single allocation. This effectively removes the need for the mstr structure. While mstr was highly generic and intended to support both data-type entries and key–value objects, its abstraction added complexity and incurred runtime overhead. This PR replaces it with a streamlined Entry layout defined by Valkey.
The new Entry struct supports two formats:
Expiration metadata is integrated directly into Entry to enable per-field expiration for hashes. Additionally, the hash data type’s dictionary is updated to operate with no_value=1. Few optimizations were introduced to prevent performance regressions. Overall, this is a substantial change to the hash data type, resulting in significantly reduced memory usage.
This implementation is based on Valkey PR (valkey-io/valkey#2089)
I adapted portions of the code related to entry structure.
Benchmark: c7i.4xlarge
The unified Entry design significantly reduces memory usage (30–50% savings) while maintaining stable performance. Minor throughput regressions in some write operations are outweighed by the substantial memory efficiency gains. This change represents a major improvement in memory efficiency with minimal performance tradeoffs.
SINGLE_HT_x: Hash operations (HSET/HGET/HDEL) with x-byte field values
HT_EX_x: Hash field expiration operations (HSETEX/HEXPIRE/HGETEX/HDEL) with x-second TTL
[numitems = 1000000, clients=2, threads=5]
[numitems = 2000000, clients=1, threads=1]
[numitems = 5000000, clients=1, threads=1]
Original PR URL: redis#14595