Remove callback threadpool for sending add responses#3825
Merged
zymap merged 2 commits intoapache:masterfrom Mar 1, 2023
Merged
Remove callback threadpool for sending add responses#3825zymap merged 2 commits intoapache:masterfrom
zymap merged 2 commits intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3825 +/- ##
=============================================
- Coverage 68.37% 58.28% -10.10%
+ Complexity 6759 5687 -1072
=============================================
Files 473 473
Lines 40972 40963 -9
Branches 5241 5239 -2
=============================================
- Hits 28015 23875 -4140
- Misses 10699 14983 +4284
+ Partials 2258 2105 -153
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
hangc0276
approved these changes
Mar 1, 2023
zymap
approved these changes
Mar 1, 2023
Ghatage
pushed a commit
to sijie/bookkeeper
that referenced
this pull request
Jul 12, 2024
### Motivation The option of triggering journal callbacks from a thread-pool instead of from the JournalForceWrite thread is not really helpful under any condition. The only thing this option does is to introduce an extra context switch to jump on this thread-pool and from there it will trigger the response, though basically no work is done in this thread-pool. It will just jump on the Netty IO-thread for the specific connection and from there the serialization and the socket write will be done. When using the thread-pool, one can see the effect of the extra-context switch and the contention on the execution. Additionally, when 0 threads are configured, we are using the Guava DirectExecutor which has non-zero overhead in the form of a mutex that is contended between multiple journal threads.
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
The option of triggering journal callbacks from a thread-pool instead of from the JournalForceWrite thread is not really helpful under any condition.
The only thing this option does is to introduce an extra context switch to jump on this thread-pool and from there it will trigger the response, though basically no work is done in this thread-pool. It will just jump on the Netty IO-thread for the specific connection and from there the serialization and the socket write will be done.
When using the thread-pool, one can see the effect of the extra-context switch and the contention on the execution.
Additionally, when 0 threads are configured, we are using the Guava DirectExecutor which has non-zero overhead in the form of a mutex that is contended between multiple journal threads.