[GitHub] 595979101 opened a new issue #1748: dubbo ESTABLISHED
595979101 opened a new issue #1748: dubbo ESTABLISHED URL: https://github.com/apache/incubator-dubbo/issues/1748 provider dubbo maxESTABLISHED 55 but consumer new 200 threads why it 55? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
[GitHub] coder-PengWenHao opened a new issue #1747: dubbo-demo
coder-PengWenHao opened a new issue #1747: dubbo-demo URL: https://github.com/apache/incubator-dubbo/issues/1747 dubbo -demo hava a bug , Unable to locate Spring NamespaceHandler for XML schema namespace [http://dubbo.apache.org/schema/dubbo] Offending resource: class path resource [META-INF/spring/dubbo-demo-provider.xml] This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
[GitHub] codecov-io commented on issue #1746: [Dubbo-1744] Enable tcp no delay for netty 3 server implementation
codecov-io commented on issue #1746: [Dubbo-1744] Enable tcp no delay for netty 3 server implementation URL: https://github.com/apache/incubator-dubbo/pull/1746#issuecomment-386801732 # [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/1746?src=pr&el=h1) Report > Merging [#1746](https://codecov.io/gh/apache/incubator-dubbo/pull/1746?src=pr&el=desc) into [2.5.x](https://codecov.io/gh/apache/incubator-dubbo/commit/b3a8f1c296248973d88f8422daf5047f9f1dede3?src=pr&el=desc) will **increase** coverage by `0.77%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0)](https://codecov.io/gh/apache/incubator-dubbo/pull/1746?src=pr&el=tree) ```diff @@Coverage Diff @@ ##2.5.x#1746 +/- ## == + Coverage 27.52% 28.29% +0.77% == Files 791 791 Lines 4075441736 +982 Branches 8166 8529 +363 == + Hits1121811811 +593 - Misses 2764927853 +204 - Partials 1887 2072 +185 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/1746?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...ba/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlTZXJ2ZXIuamF2YQ==) | `71.92% <100%> (+0.5%)` | :arrow_up: | | [...ava/com/alibaba/dubbo/rpc/filter/tps/StatItem.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9ycGMvZmlsdGVyL3Rwcy9TdGF0SXRlbS5qYXZh) | `79.16% <0%> (-15.84%)` | :arrow_down: | | [...o/rpc/cluster/support/MergeableClusterInvoker.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JwYy9jbHVzdGVyL3N1cHBvcnQvTWVyZ2VhYmxlQ2x1c3Rlckludm9rZXIuamF2YQ==) | `35.13% <0%> (-9.58%)` | :arrow_down: | | [.../alibaba/dubbo/rpc/cluster/merger/ArrayMerger.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JwYy9jbHVzdGVyL21lcmdlci9BcnJheU1lcmdlci5qYXZh) | `61.9% <0%> (-6.52%)` | :arrow_down: | | [...alibaba/dubbo/remoting/transport/CodecSupport.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L0NvZGVjU3VwcG9ydC5qYXZh) | `69.23% <0%> (-4.69%)` | :arrow_down: | | [.../java/com/alibaba/dubbo/config/ConsumerConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9jb25maWcvQ29uc3VtZXJDb25maWcuamF2YQ==) | `53.84% <0%> (-4.49%)` | :arrow_down: | | [...n/java/com/alibaba/dubbo/rpc/support/RpcUtils.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9ycGMvc3VwcG9ydC9ScGNVdGlscy5qYXZh) | `20.27% <0%> (-4.32%)` | :arrow_down: | | [...rpc/protocol/dubbo/telnet/ChangeTelnetHandler.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kZWZhdWx0L3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vcnBjL3Byb3RvY29sL2R1YmJvL3RlbG5ldC9DaGFuZ2VUZWxuZXRIYW5kbGVyLmphdmE=) | `90.9% <0%> (-4.1%)` | :arrow_down: | | [.../rpc/cluster/router/condition/ConditionRouter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JwYy9jbHVzdGVyL3JvdXRlci9jb25kaXRpb24vQ29uZGl0aW9uUm91dGVyLmphdmE=) | `71.11% <0%> (-3.89%)` | :arrow_down: | | [...bbo/rpc/cluster/loadbalance/RandomLoadBalance.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JwYy9jbHVzdGVyL2xvYWRiYWxhbmNlL1JhbmRvbUxvYWRCYWxhbmNlLmphdmE=) | `50% <0%> (-2.95%)` | :arrow_down: | | ... and [220 more](https://codecov.io/gh/apache/incubator-dubbo/pull/1746/diff?src=pr&el=tree-more) | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/1746?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact
[GitHub] nobodyiam opened a new pull request #1746: [Dubbo-1744]enable tcp no delay for netty 3 server implementation
nobodyiam opened a new pull request #1746: [Dubbo-1744]enable tcp no delay for netty 3 server implementation URL: https://github.com/apache/incubator-dubbo/pull/1746 ## What is the purpose of the change Fix #1744 ## Brief changelog Enable `TCP_NODELAY` for netty 3 server implementation ## Verifying this change The accepted channel's socket in server side returns true when calling java.net.Socket#getTcpNoDelay Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) filed 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. - [x] 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. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] 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 integration-test in [test module](https://github.com/alibaba/dubbo/tree/master/dubbo-test). - [x] Run `mvn clean install -DskipTests` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass. - [x] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
[GitHub] codecov-io commented on issue #1745: New threadLocal provides more performance.
codecov-io commented on issue #1745: New threadLocal provides more performance. URL: https://github.com/apache/incubator-dubbo/pull/1745#issuecomment-386791924 # [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/1745?src=pr&el=h1) Report > Merging [#1745](https://codecov.io/gh/apache/incubator-dubbo/pull/1745?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/04c93e8b98250230c4d22423372acd1c29e2c770?src=pr&el=desc) will **increase** coverage by `0.1%`. > The diff coverage is `46.82%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/graphs/tree.svg?height=150&width=650&src=pr&token=VnEIkiFQT0)](https://codecov.io/gh/apache/incubator-dubbo/pull/1745?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master#1745 +/- ## === + Coverage 37.92% 38.02% +0.1% - Complexity 4024 4055 +31 === Files 618 622 +4 Lines 2973029900+170 Branches 5244 5265 +21 === + Hits 1127511370 +95 - Misses1661016682 +72 - Partials 1845 1848 +3 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/1745?src=pr&el=tree) | Coverage Δ | Complexity Δ | | |---|---|---|---| | [...mmon/threadpool/support/fixed/FixedThreadPool.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3RocmVhZHBvb2wvc3VwcG9ydC9maXhlZC9GaXhlZFRocmVhZFBvb2wuamF2YQ==) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: | | [.../threadpool/support/limited/LimitedThreadPool.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3RocmVhZHBvb2wvc3VwcG9ydC9saW1pdGVkL0xpbWl0ZWRUaHJlYWRQb29sLmphdmE=) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: | | [...mmon/threadpool/support/eager/EagerThreadPool.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3RocmVhZHBvb2wvc3VwcG9ydC9lYWdlci9FYWdlclRocmVhZFBvb2wuamF2YQ==) | `90% <ø> (ø)` | `2 <0> (ø)` | :arrow_down: | | [...on/threadpool/support/cached/CachedThreadPool.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3RocmVhZHBvb2wvc3VwcG9ydC9jYWNoZWQvQ2FjaGVkVGhyZWFkUG9vbC5qYXZh) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: | | [...alibaba/dubbo/common/utils/NamedThreadFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3V0aWxzL05hbWVkVGhyZWFkRmFjdG9yeS5qYXZh) | `64.7% <100%> (ø)` | `3 <2> (ø)` | :arrow_down: | | [...rc/main/java/com/alibaba/dubbo/rpc/RpcContext.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9ycGMvUnBjQ29udGV4dC5qYXZh) | `30.93% <100%> (ø)` | `27 <1> (ø)` | :arrow_down: | | [...common/threadlocal/NamedInternalThreadFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3RocmVhZGxvY2FsL05hbWVkSW50ZXJuYWxUaHJlYWRGYWN0b3J5LmphdmE=) | `20% <20%> (ø)` | `1 <1> (?)` | | | [...ibaba/dubbo/common/threadlocal/InternalThread.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3RocmVhZGxvY2FsL0ludGVybmFsVGhyZWFkLmphdmE=) | `26.31% <26.31%> (ø)` | `3 <3> (?)` | | | [.../dubbo/common/threadlocal/InternalThreadLocal.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3RocmVhZGxvY2FsL0ludGVybmFsVGhyZWFkTG9jYWwuamF2YQ==) | `35.82% <35.82%> (ø)` | `8 <8> (?)` | | | [...bbo/common/threadlocal/InternalThreadLocalMap.java](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL3RocmVhZGxvY2FsL0ludGVybmFsVGhyZWFkTG9jYWxNYXAuamF2YQ==) | `63.51% <63.51%> (ø)` | `15 <15> (?)` | | | ... and [13 more](https://codecov.io/gh/apache/incubator-dubbo/pull/1745/diff?src=pr&el=tree-more) | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/1745?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs
[GitHub] carryxyh opened a new pull request #1745: New threadLocal provides more performance.
carryxyh opened a new pull request #1745: New threadLocal provides more performance. URL: https://github.com/apache/incubator-dubbo/pull/1745 Faster ThreadLocal impl in internal use * Used in RpcContext`s LOCAL field. * Compatible traditional ThreadLocal. * Faster get than the traditional ThreadLocal. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
[GitHub] nobodyiam opened a new issue #1744: Client side response time is slower than actual when client side is in tcp delayed ack mode
nobodyiam opened a new issue #1744: Client side response time is slower than actual when client side is in tcp delayed ack mode URL: https://github.com/apache/incubator-dubbo/issues/1744 ## Issue Description Dubbo's [netty 3 server implementation](https://github.com/apache/incubator-dubbo/blob/master/dubbo-remoting/dubbo-remoting-netty/src/main/java/com/alibaba/dubbo/remoting/transport/netty/NettyServer.java#L70) does not enable `TCP_NODELAY` option, which causes the server side not responding in time when client side is in delayed ack mode and the response size is less than MSS. However, the [netty 4 server implementation](https://github.com/apache/incubator-dubbo/blob/master/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServer.java#L81) does enable this option. ```java bootstrap.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) ---> .childOption(ChannelOption.TCP_NODELAY, Boolean.TRUE) .childOption(ChannelOption.SO_REUSEADDR, Boolean.TRUE) .childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) ``` Considering Netty 4 enables this option by default([Enable TCP_NODELAY and SCTP_NODELAY by default](https://github.com/netty/netty/commit/39357f3835f971e6cc1a0e41a805fa1293e7005e)), dubbo's [netty 3 server implementation](https://github.com/apache/incubator-dubbo/blob/master/dubbo-remoting/dubbo-remoting-netty/src/main/java/com/alibaba/dubbo/remoting/transport/netty/NettyServer.java#L70) should also enable this option by default. ## Solution Simply set this option when constructing ServerBootstrap: ```java bootstrap.setOption("child.tcpNoDelay", true); ``` ## Issue Screenshots Here is an actual example captured in our environment, with 10.5.160.181 as the client side and 10.5.169.180 as the server side. ### Case with normal ack The demo server side logic costs 10-11 ms, so normally, the client side response time is around 12 ms. The frame 9 highlighted below is a normal request, whose request id is 0x02. ![image](https://user-images.githubusercontent.com/837658/39660725-87c0676c-5077-11e8-9059-be353ceebf97.png) The frame 11 highlighted below is the response, whose response id is 0x02. ![image](https://user-images.githubusercontent.com/837658/39660733-b84b750c-5077-11e8-9c72-bdb78da0f299.png) The actual response time is 12 ms. Also we can see from the above screenshots that both client side and server side respond `ack` normally. ### Case with delayed ack Now let's take a look when client side is in delayed ack mode. From the screen shots below, there is no single `ack` packets, which means it's in delayed ack mode - `ack` is returned with a data packet. The frame 239 highlighted below is a request, whose request id is 0x7f. We can see the 240 packet responded immediately when 239 is sent to server, considering the server logic costs 10-11 ms, this packet is not the response. ![image](https://user-images.githubusercontent.com/837658/39660790-700dc08c-5078-11e8-9934-61c630420ee0.png) As we can see, the frame 240's response id is 0x7e, which is the response to the previous request. ![image](https://user-images.githubusercontent.com/837658/39660802-02df6a82-5079-11e8-8964-e8c3c5054ea1.png) Then frame 241 is sent, whose request id is 0x80. ![image](https://user-images.githubusercontent.com/837658/39660818-3cb482f6-5079-11e8-8563-c1e1b2480905.png) Until then, the response to request 0x7f is returned (frame 242) ![image](https://user-images.githubusercontent.com/837658/39660824-5a960dc6-5079-11e8-9feb-3f6f154a2b49.png) Request 0x7f was sent in 14:37:53.267, so we know that the response was ready around 14:37:53.277 in the server side. However, since the server side does not enable `TCP_NODELAY`, so according to Nagel algorithm, the response cannot be sent until an `ack` is received or a timeout occurrs(40ms). So the response is hold in server side and is sent when another request is sent from client side, which was 14:37:53.292730. In this case, the client side response time (25ms) is much slower than actual (12ms). Even worse, in this situation, the response time is determined by the interval in which the client side sends the request. We've done some experiments and the results shows in this situation, if client side sends requests in qps 50, then the client side response time is 20ms, because the client side request sending interval is 20ms (1000/50). If client side qps is 40, the the response time is 25ms. If client side qps is 30, then the response time is 33ms. The response time increases when the qps decreases, until the qps is 25. Because when the interval is larger than