[improve][broker] Change bookkeeperClientSeparatedIoThreadsEnabled to True by default - #25812
Closed
zhanglistar wants to merge 1 commit into
Closed
zhanglistar wants to merge 1 commit into
zhanglistar wants to merge 1 commit into
Conversation
Author
|
#19061 Not related flaky test. |
hangc0276
approved these changes
May 21, 2026
lhotari
requested changes
Sep 18, 2026
Member
There was a problem hiding this comment.
This shouldn't be required after #26599 and #26620 since they resolve the problems caused by contention (thread or lock contention itself won't disappear). Performance increases 26x when there's a constant load in a test case included in #26620. This change will ship in Pulsar 5.0.0.
PR 26620 improvements in scenario of 500 isolated V4 producer clients/connections, 20 isolated consumer clients on one Key_Shared subscription, shared client resources, random keys, unbatched 128-byte messages.
25x consume improvement for the time that all producers are producing
99.84% lower maximum backlog (11,3M -> 17,6k)
| Metric | Master baseline | PR | Improvement |
|---|---|---|---|
| Steady ingress (produce) | 139,464 msg/s | 152,971 msg/s | +9.7% |
| Steady egress (consume) | 5,738 msg/s | 153,002 msg/s | +2566.6% |
| Whole-run producer throughput | 132,828 msg/s | 132,798 msg/s | -0.02% |
| Whole-run consumer throughput | 76,983 msg/s | 143,732 msg/s | +86.7% |
| Sampled maximum backlog | 11,366,885 messages | 17,693 messages | 99.84% lower |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Apache Pulsar PR #16333 introduced
bookkeeperClientSeparatedIoThreadsEnabledso the BookKeeper client can use a dedicated IO thread pool instead of sharing the broker's PulsarEventLoopGroup. The upstream default remainedfalsefor backward compatibility.In our deployment, sharing IO threads between the broker and the BookKeeper client can cause contention under storage-heavy workloads. Enabling separated IO threads by default isolates BookKeeper network I/O from broker I/O and better matches our production expectations.
Modifications
bookkeeperClientSeparatedIoThreadsEnabled=trueinconf/broker.confandconf/standalone.conf, and update related comments.ServiceConfigurationfromfalsetotrue, and update@FieldContextdocumentation.ServiceConfigurationTest#testBookKeeperClientIoThreadsBookKeeperClientFactoryImplTest#testBookKeeperIoThreadsConfigurationOperators who want the previous behavior can set:
bookkeeperClientSeparatedIoThreadsEnabled=falseVerifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes