Skip to content

Revise config defaults for Valkey 8 #653

@zuiderkwast

Description

@zuiderkwast

@madolson wrote in redis/redis#12191:

The immediate ones that come to mind:

  • replica-lazy-flush no -> yes
  • lazyfree-lazy-user-flush no -> yes

There are many problems with running flush synchronously. Even in single CPU environments, the thread managers should balance between the freeing and serving incoming requests. (handle in #913)

We should probably also revisit all of the datastructure limits (set-max-listpack-entries for example), which were probably tuned in a world with CPUs from a decade ago.

The set-max-listpack-entries was discussed here, where it was first added: redis/redis#11290 (comment)

Ideally we should tune this in some smart way, but I assume nobody will do this, I suggest the following (pseudo-random 🤣) new defaults:

  • hash-max-listpack-entries 512 (Keep this default? An entry has key and value so the listpack's size is 1024 elements)
  • list-max-listpack-size -2 (No suggestion. Any ideas?)
  • set-max-intset-entries 512 -> 1024
  • set-max-listpack-entries 128 -> 1024
  • zset-max-listpack-entries 128 -> 512 (Each entry is element and score, so listpack size is 1024)
  • hll-sparse-max-bytes 3000 (Keep this?)
  • stream-node-max-bytes 4096 (Keep this?)

@eduardobr wrote in redis/redis#12747:

repl-backlog-size 1mb is too small in most cases, but at the same time I think the real fix would be to make it dynamic (rough example: set min and max instead, and let redis choose a value in this range over time)

@xuliang0317 wrote in redis/redis#12747:

Now,repl-backlog-size is still 1mb,For most scenarios, this value is too small.Network transmission and bandwidth performance have improved rapidly in more than ten years,Memory is getting cheaper and cheaper.
Although the impact is noted in the documentation, most Redis users will directly use the default configuration.In many scenarios, the traffic per second of a single node exceeds 1mb.Especially for businesses facing individual users.
I recommend at least updating the configuration to 10mb to improve the rationality of the current repl-backlog-size.

So I suggest repl-backlog-size 1m -> 10m. Handle in #911

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions