Skip to content
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

Performance bottleneck of Redis #3974

Closed
Kcser opened this issue May 2, 2017 · 4 comments
Closed

Performance bottleneck of Redis #3974

Kcser opened this issue May 2, 2017 · 4 comments

Comments

@Kcser
Copy link

Kcser commented May 2, 2017

I am very interested in the bottleneck of Redis. It seems that the hash function or others are not the bottle neck as we can achieve better performance if we do use the -P parameters with pipeline. Furthermore, if we run both the server and the benchmark on the same physical machine, there will be less influence of the network. So what is the bottleneck for Redis at present? Is it the epoll/kqueue used?

@charsyam
Copy link
Contributor

charsyam commented May 2, 2017

@Kcser Redis just can handle one command at a time.(It's single threaded)

@Kcser
Copy link
Author

Kcser commented May 2, 2017

@charsyam The answer is true. However, if the bottleneck is the single thread, with a pipleline parameter -P, more than one commands are sent to the server at the same time. On the sever side, they are still executed one by one, while the performance with -P is much better than the commands without it (through redis-benchmark). So how can we explain the growth of performance with -P?

@badboy
Copy link
Contributor

badboy commented May 2, 2017

Pipelining avoids the round-trip to the client for every single command. This round-trip can be quite significant as you have seen in benchmarks.

There's no single answer to your question. Different use cases exhibit different bottlenecks, ranging from network bandwidth over CPU usage to memory usage. If you are experiencing a bottleneck in your own usage, it might be worthwhile to discuss it and look into how to improve it (by improving Redis or by improving your usage).

Keep in mind that this issue tracker should be used for bugs or improvements to the Redis server. For questions like yours please other mediums are better suited, such as the subreddit /r/redis, the mailing list or the irc channel #redis on freenode.

@Kcser
Copy link
Author

Kcser commented May 3, 2017

@badboy Sorry,sir. I will post my question somewhere else. Thank you

@badboy badboy closed this as completed Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants