Skip to content

Conversation

@ShooterIT
Copy link
Member

@ShooterIT ShooterIT commented Apr 15, 2022

From #9166, we call several times of prepareReplicasToWrite when propagating
one write command to replication stream (once per argument, same as we do for
normal clients), that is not necessary. Now we only call it one time per command
at the begin of feeding replication stream.

This results in reducing CPU consumption and slightly better performance,
specifically when there are many replicas.

Resolves #10428

From redis#9166, we need to call several times of prepareReplicasToWrite when propagating
one write command to replication stream, that is not necessary. Now we only call it
one time at the begin of feeding replication stream.
@oranagra
Copy link
Member

testing with 5 replicas.
memtier_benchmark --pipeline 10 --ratio=1:0 --test-time=10
before: 468880 ops / sec
after: 551226 ops / sec

@oranagra oranagra merged commit a9d5cfa into redis:unstable Apr 17, 2022
@ShooterIT ShooterIT deleted the prepare-once branch April 17, 2022 14:22
@oranagra oranagra mentioned this pull request Apr 27, 2022
enjoy-binbin pushed a commit to enjoy-binbin/redis that referenced this pull request Jul 31, 2023
From redis#9166, we call several times of prepareReplicasToWrite when propagating
one write command to replication stream (once per argument, same as we do for
normal clients), that is not necessary. Now we only call it one time per command
at the begin of feeding replication stream.

This results in reducing CPU consumption and slightly better performance,
specifically when there are many replicas.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[BUG]replicationFeedSlaves still high CPU utilization in redis7.0 when it Replication backlog and replicas use one global shared replication buffer

3 participants