New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changing addReplySds and sdscat to addReplyStatusLength() within luaReplyToRedisReply() #11556
Merged
oranagra
merged 5 commits into
redis:unstable
from
filipecosta90:perf.luaReplyToRedisReply
Nov 30, 2022
Merged
changing addReplySds and sdscat to addReplyStatusLength() within luaReplyToRedisReply() #11556
oranagra
merged 5 commits into
redis:unstable
from
filipecosta90:perf.luaReplyToRedisReply
Nov 30, 2022
Conversation
This file contains 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
filipecosta90
added
the
action:run-benchmark
Triggers the benchmark suite for this Pull Request
label
Nov 29, 2022
oranagra
reviewed
Nov 29, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so specifically, status
replies were inefficient, but other type of replies are ok?
i guess the most common ones are status
, bulk
, and array
.
from all the reply types i see the only one that was composing a protocol rather than calling a helper function was status
.
filipecosta90
changed the title
changing addReplySds and sdscat to addReplyProto within luaReplyToRedisReply()
changing addReplySds and sdscat to addReplySimpleString() within luaReplyToRedisReply()
Nov 29, 2022
sundb
reviewed
Nov 30, 2022
Co-authored-by: sundb <sundbcn@gmail.com>
oranagra
reviewed
Nov 30, 2022
filipecosta90
changed the title
changing addReplySds and sdscat to addReplySimpleString() within luaReplyToRedisReply()
changing addReplySds and sdscat to addReplyStatusLength() within luaReplyToRedisReply()
Nov 30, 2022
oranagra
approved these changes
Nov 30, 2022
This was referenced Dec 4, 2022
oranagra
pushed a commit
to oranagra/redis
that referenced
this pull request
Dec 11, 2022
…eplyToRedisReply() (redis#11556) profiling EVALSHA\ we see that luaReplyToRedisReply takes 8.73% out of the 56.90% of luaCallFunction CPU cycles. Using addReplyStatusLength instead of directly composing the protocol to avoid sdscatprintf and addReplySds ( which imply multiple sdslen calls ). The new approach drops luaReplyToRedisReply CPU cycles to 3.77% (cherry picked from commit 68e87eb)
Merged
oranagra
pushed a commit
that referenced
this pull request
Dec 12, 2022
…eplyToRedisReply() (#11556) profiling EVALSHA\ we see that luaReplyToRedisReply takes 8.73% out of the 56.90% of luaCallFunction CPU cycles. Using addReplyStatusLength instead of directly composing the protocol to avoid sdscatprintf and addReplySds ( which imply multiple sdslen calls ). The new approach drops luaReplyToRedisReply CPU cycles to 3.77% (cherry picked from commit 68e87eb)
Mixficsol
pushed a commit
to Mixficsol/redis
that referenced
this pull request
Apr 12, 2023
…eplyToRedisReply() (redis#11556) profiling EVALSHA\ we see that luaReplyToRedisReply takes 8.73% out of the 56.90% of luaCallFunction CPU cycles. Using addReplyStatusLength instead of directly composing the protocol to avoid sdscatprintf and addReplySds ( which imply multiple sdslen calls ). The new approach drops luaReplyToRedisReply CPU cycles to 3.77%
madolson
pushed a commit
to madolson/redis
that referenced
this pull request
Apr 19, 2023
…eplyToRedisReply() (redis#11556) profiling EVALSHA\ we see that luaReplyToRedisReply takes 8.73% out of the 56.90% of luaCallFunction CPU cycles. Using addReplyStatusLength instead of directly composing the protocol to avoid sdscatprintf and addReplySds ( which imply multiple sdslen calls ). The new approach drops luaReplyToRedisReply CPU cycles to 3.77%
enjoy-binbin
pushed a commit
to enjoy-binbin/redis
that referenced
this pull request
Jul 31, 2023
…eplyToRedisReply() (redis#11556) profiling EVALSHA\ we see that luaReplyToRedisReply takes 8.73% out of the 56.90% of luaCallFunction CPU cycles. Using addReplyStatusLength instead of directly composing the protocol to avoid sdscatprintf and addReplySds ( which imply multiple sdslen calls ). The new approach drops luaReplyToRedisReply CPU cycles to 3.77%
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.
profiling EVALSHA after the merge of #11521 ( commit 7dfd7b9 ) we can see that luaReplyToRedisReply takes 8.73% out of the 56.90% of luaCallFunction CPU cycles. The new approach drops luaReplyToRedisReply CPU cycles to 3.77%
using addReplyStatusLength instead of directly composing the protocol to avoid sdscatprintf and addReplySds ( which imply multiple sdslen calls ) we get the following improvement on the overall ops/sec: