Skip to content

[NEW] Document and provide guidance for listpack thresholds in valkey.conf #3299

@stockholmux

Description

@stockholmux

The problem/use-case that the feature addresses

In valkey.conf there are a number of settings which have thresholds defined for when values goes from listpack to other encodings. For example, hash-max-listpack-value and hash-max-listpack-entries.

The descriptions here only describe really that they can be changed, which is not very helpful. Similarly, on /valkey-doc/blob/main/topics/memory-optimization.md there is a vague description that it can be changed, but not why one would change them.

These descriptions are not helpful if one starts exploring tuning. Likewise, if you search the broader web for tuning of these settings, you get vague or non-conclusive write-ups (and more, and more ... I could go on ).

In short, I do not know if anyone really knows what to do with these settings.

Additionally, looking back in git blame, many of these defaults go back 16 years (albeit in ziplist form). It's unclear if these were numbers chosen because they had good vibes or if there is really some meaning behind the defaults (and if they are relevant defaults in 2026 and beyond).

Description of the feature

In valkey.conf add a few lines that describe how to evaluate the cpu/memory tradeoff of these settings and the reasoning behind the defaults (if known).

Alternatives you've considered

Document the same information in the memory-optimization.md file in valkey-doc.

Additional information

Any additional information that is relevant to the feature request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions