Skip to content

support epoll - #4012

Closed
Moriadry-zz wants to merge 4 commits into
apache:masterfrom
Moriadry-zz:feature/support-epoll
Closed

Moriadry-zz wants to merge 4 commits into
apache:masterfrom
Moriadry-zz:feature/support-epoll

Conversation

@Moriadry-zz

Copy link
Copy Markdown

What is the purpose of the change

This is an improvement of netty native transport, inspired by grpc and netty. Please check this issue #2737 . We can find some transport enhancement from this upgrade, What's more, with default Epoll, we can have more transport advantages, such as TCP_USER_TIME, choice between ET mode and LT mode, and so on.

Brief changelog

change default transport to Epoll if available, otherwise using Nio.

Verifying this change

XXXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@carryxyh carryxyh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我不建议默认使用epoll。

Netty的Epoll只是边缘触发的epoll,而底层的selector是默认开启epoll的(如果系统支持,使用水平触发的epoll),性能提升并不是非常明显。
另外,据我了解,epoll并不是非常稳定以至于很多中间件只是提供了这个能力,但是默认都不会使用,举两个例子,rocketmq和flink。

@Moriadry-zz

Moriadry-zz commented May 13, 2019 •

Copy link
Copy Markdown
Author

Hi, carryxyh :) according to @lexburner 's previous benchmark, dubbo epoll benchmark : https://github.com/lexburner/dubbo-epoll-benchmark <https://github.com/lexburner/dubbo-epoll-benchmark We can find some improvement. 使用 NioSocketChannel 最高 qps 5600 ,替换成 EpollSocketChannel 之后 6300 qps,提升显著

Also in grpc-java, they also switched to epoll if Epoll is available, check this grpc/grpc-java#5581 .

I can dig into this, maybe we can discuss on this for further consideration. @ralf0131 @beiwei30 What's your guys' opinion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants