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

[NEW] set performance with io threads is significantly worse when clients use pipelining #1753

Open
SoftlyRaining opened this issue Feb 19, 2025 · 3 comments

Comments

@SoftlyRaining
Copy link
Contributor

SoftlyRaining commented Feb 19, 2025

The Problem

I was benchmarking get/set performance between different release versions and realized that io-threads performance is significantly worse when I test with pipelining=4. It seems that prefetching is not as effective when clients pipeline commands for some reason.

Desired Improvement

I think we should investigate why this is the case and improve prefetching with pipelining, since we recommend some amount of pipelining to get the best performance from Valkey.

I've tested three different value sizes now. Each test was run for 1 hour:

testing unstable with io-threads=9:
Image

testing unstable with 512B data size and io-threads=9:
Image

@madolson
Copy link
Member

The one exception seems to be in the SADD case, which to me doesn't make a lot of sense to me, but OK.

@uriyage @ranshid Would you mind reviewing this as well. It looks like Valkey 8.1.Rc1 is better in all cases except the SET with 9 threads case. I'm not aware of any place we would expect a large regression, but maybe we should take a look a look to see if something else was introduced that is consuming CPU.

@SoftlyRaining SoftlyRaining changed the title [NEW] io thread performance is significantly worse when clients use pipelining [NEW] set performance with io threads is significantly worse when clients use pipelining Mar 10, 2025
@SoftlyRaining
Copy link
Contributor Author

I've rerun the tests, this time throwing out the first 5 minutes of warmup data then running valkey-benchmark over a 1 hour period. Hardware and key size are the same as before. Currently, it looks like GET performance increases with pipelining, but SET performance still suffers from pipelining, though unstable has a smaller penalty than 8.0.

@SoftlyRaining
Copy link
Contributor Author

I fixed these graphs also after realizing my previous get tests were 0% hit rate

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

2 participants