Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why MAX_RUNNABLE_BLOCK_SIZE=16 in ConsumerWorkService #813

miaoweiwei started this conversation in General
Discussion options

It is meaningless to set prefetch count>16 without using thread pool

version:5.15.0

You must be logged in to vote

Replies: 3 comments

Comment options

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.

You must be logged in to vote
0 replies
Comment options

你好,你的邮件我已收到。苗卫伟
You must be logged in to vote
0 replies
Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #812 on July 20, 2022 08:11.

AltStyle によって変換されたページ (->オリジナル) /