Skip to content

CQv2: Consolidate index writes when possible #4400

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

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

lhoguin
Copy link
Contributor

@lhoguin lhoguin commented Mar 31, 2022

This is done as an extra pass before giving the data
to file:pwrite. This should boost performance in most
cases, especially with large multi-acks.

While it provides a boost in the tested scenarios, I want a more thorough comparison before removing Draft status.

@mkuratczyk
Copy link
Contributor

Great stuff! This PR improves the performance in all the tests I've run. 20-30% throughput improvement in most cases, and basically twice as good after turning off the consumers - on the Messages Ready & Unacked graph, you can see how much faster it reached the max length and how much faster the queues were emptied after turning consumers back on but publishers off.

Not directly related to this change but worth nothing how much more predictable lazy queues are - lower memory usage AND in most cases - the same (or even higher!) and more stable throughput.

pr4400

@michaelklishin
Copy link
Collaborator

I assume you mean lazy CQv2s are more predictable in terms of throughput stability compared to non-lazy CQv2s, not other queue types :)

This is done as an extra pass before giving the data
to file:pwrite. This should boost performance in most
cases, especially with large multi-acks.
@lhoguin lhoguin force-pushed the loic-cqv2-consolidate-writes branch from 33a8a03 to 4033d42 Compare April 1, 2022 12:29
@lhoguin
Copy link
Contributor Author

lhoguin commented Apr 1, 2022

I have force pushed to add the GPG key that was missing. The code didn't change.

I have tested the commit for about 4 hours without an issue. I think we can review/merge.

@lhoguin lhoguin marked this pull request as ready for review April 1, 2022 12:31
@mkuratczyk
Copy link
Contributor

@michaelklishin I'd say it applies more broadly. For example this is CQv1 lazy (yellow) and non-lazy (green). There are moment when non-lazy has a bit higher throughput but I'd take lazy any day (for this workload at least).

cqv1

@michaelklishin
Copy link
Collaborator

@mkuratczyk yes, we have seen this with CQv1. I thought you were comparing CQv2 with quorum queues.

@lhoguin lhoguin merged commit 06c9ef0 into master Apr 4, 2022
lhoguin pushed a commit that referenced this pull request Apr 4, 2022
CQv2: Consolidate index writes when possible (backport #4400)
@lhoguin lhoguin deleted the loic-cqv2-consolidate-writes branch April 4, 2022 08:51
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

Successfully merging this pull request may close these issues.

3 participants