-
Notifications
You must be signed in to change notification settings - Fork 585
Why MAX_RUNNABLE_BLOCK_SIZE=16 in ConsumerWorkService #813
-
It is meaningless to set prefetch count>16 without using thread pool
version:5.15.0
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments
-
It is not meaningless according to benchmarks.
ConsumerWorkService
is meant to guarantee ordered dispatch of delivered protocol methods on the given channel. The decision to pick MAX_RUNNABLE_BLOCK_SIZE
goes back to 2010. If you have
specific suggestions as to what can be improved and can prove the effectiveness with benchmarks,
we would happily accept a PR.
The value can be set to 128 or 256, the effectiveness of higher prefetch values hits the law of diminishing returns.
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Setting the value to 256 produces a low single digit % gain in throughput and a comparable reduction in mean consumer latency. I will submit a PR in a bit.
Beta Was this translation helpful? Give feedback.