Skip to content

Make dynamic batch pump more aggressively #757

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
May 12, 2025
Merged

Conversation

acogoluegnes
Copy link
Contributor

Low value for maxUnconfirmedMessages combined with unfortunate timing can make the dynamic batch flush only on timeout.

This commit makes the dynamic batch class "pump" for new items (messages) more aggressively, which mitigates the problem.

References #750

Low value for maxUnconfirmedMessages combined with unfortunate timing
can make the dynamic batch flush only on timeout.

This commit makes the dynamic batch class "pump" for new items
(messages) more aggressively, which mitigates the problem.

References #750
@acogoluegnes acogoluegnes added this to the 1.1.0 milestone May 12, 2025
@acogoluegnes acogoluegnes added the bug Something isn't working label May 12, 2025
@acogoluegnes acogoluegnes merged commit 893536a into main May 12, 2025
3 checks passed
@acogoluegnes acogoluegnes deleted the dynamic-batch-pumping branch May 12, 2025 14:11
github-actions bot pushed a commit that referenced this pull request May 12, 2025
Make dynamic batch pump more aggressively
@pvaiko
Copy link

pvaiko commented May 12, 2025

Thank you for the quick fix!

@acogoluegnes
Copy link
Contributor Author

@pvaiko You can use the 1.1.0 snapshot for your tests. There is also the stream performance tool, the latest snapshot has the fix.

@pvaiko
Copy link

pvaiko commented May 14, 2025

Sorry for the late reply, I finally had some time to test this. The 1.1.0-SNAPSHOT and the latest perf tool now work as expected, except now maxUnconfirmedMessages = 9 (or --confirms 9) seems to have a significant throughput drop, 10 and all other numbers I tried work fine. It is no big deal, we can live with it.

With --confirms 10 everything is now normal with 1.1.0:

$ /c/Program\ Files/Zulu/zulu-21/bin/java.exe -jar stream-perf-test-latest.jar --confirms 10
Starting producer
1, published 6526 msg/s, confirmed 6516 msg/s, consumed 6506 msg/s, latency median/75th/95th/99th 3/3/4/5 ms, chunk size 10
2, published 7366 msg/s, confirmed 7366 msg/s, consumed 7366 msg/s, latency median/75th/95th/99th 2/3/4/5 ms, chunk size 10
3, published 8313 msg/s, confirmed 8313 msg/s, consumed 8313 msg/s, latency median/75th/95th/99th 2/3/4/5 ms, chunk size 10
4, published 8457 msg/s, confirmed 8457 msg/s, consumed 8467 msg/s, latency median/75th/95th/99th 2/2/3/4 ms, chunk size 10
5, published 8121 msg/s, confirmed 8121 msg/s, consumed 8121 msg/s, latency median/75th/95th/99th 2/3/4/5 ms, chunk size 10
6, published 8897 msg/s, confirmed 8897 msg/s, consumed 8887 msg/s, latency median/75th/95th/99th 2/3/3/4 ms, chunk size 10
7, published 9395 msg/s, confirmed 9395 msg/s, consumed 9395 msg/s, latency median/75th/95th/99th 2/3/3/4 ms, chunk size 10

Summary: published 8172 msg/s, confirmed 8171 msg/s, consumed 8169 msg/s, latency 95th 4 ms, chunk size 10

With --confirms 9 a significant drop with 1.1.0:

$ /c/Program\ Files/Zulu/zulu-21/bin/java.exe -jar stream-perf-test-latest.jar --confirms 9
Starting producer
1, published 312 msg/s, confirmed 312 msg/s, consumed 312 msg/s, latency median/75th/95th/99th 3/109/117/122 ms, chunk size 7
2, published 125 msg/s, confirmed 125 msg/s, consumed 125 msg/s, latency median/75th/95th/99th 109/109/218/218 ms, chunk size 7
3, published 127 msg/s, confirmed 127 msg/s, consumed 127 msg/s, latency median/75th/95th/99th 105/109/113/218 ms, chunk size 8
4, published 116 msg/s, confirmed 116 msg/s, consumed 116 msg/s, latency median/75th/95th/99th 109/113/218/226 ms, chunk size 8
5, published 81 msg/s, confirmed 81 msg/s, consumed 81 msg/s, latency median/75th/95th/99th 109/109/222/222 ms, chunk size 8
6, published 80 msg/s, confirmed 80 msg/s, consumed 80 msg/s, latency median/75th/95th/99th 109/109/214/222 ms, chunk size 8
7, published 81 msg/s, confirmed 81 msg/s, consumed 81 msg/s, latency median/75th/95th/99th 105/109/214/222 ms, chunk size 8

Summary: published 129 msg/s, confirmed 129 msg/s, consumed 129 msg/s, latency 95th 214 ms, chunk size 8

@acogoluegnes
Copy link
Contributor Author

OK, thanks for the follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants