-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
when redisReaderFeed big buffer, redisReaderGetReply will cause high cpu usage #656
Comments
Perhaps we should make this setting configurable. I am assuming most of our users are using buffers in the size of several K than in the size of several M?
… On Apr 8, 2019, at 5:18 AM, harleyliao ***@***.***> wrote:
when redis reader feed 40m buffer, the get reply will cause many cpu like as follow:
<https://user-images.githubusercontent.com/1174006/55712758-ea219200-5a21-11e9-976d-0c051be35852.png>
Because in redisReaderGetReply method, after a reply parsed, it will use sdsrange to move mem and when the buffer is big, the memmove will cause many time & cpu!
<https://user-images.githubusercontent.com/1174006/55712839-09b8ba80-5a22-11e9-9bd6-4c6a8dc8299e.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#656>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAanUXoSAjaOjXCJR9BupyraZ6dEjbfhks5vewligaJpZM4chsTJ>.
|
Thanks for your reply! I think "this setting configurable" may better. I use redisReaderFeed & redisReaderGetReply to read a big aof file and parse, and then i think when the read buffer is bigger, the performance will better. |
It would be a non-trivial change, but we could look into using a ring buffer. |
Closing in favor of #866 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when redis reader feed 40m buffer, the get reply will cause high cpu usage like as follow:


Because in redisReaderGetReply method, after a reply parsed, it will use "sdsrange" to move mem and when the buffer is big, the memmove() will cost many time & cpu!
The text was updated successfully, but these errors were encountered: