dubbo
dubbo copied to clipboard
Enqueue soon
#10558 增加frame 性能提升15%,减少了一次flush和一次调度,后面和上 @icodening 的批量发送提升可能会减少
这边为止,使用frame来完成发送,client和server修改完成
Codecov Report
Merging #10726 (dea50f1) into 3.2 (0b5767f) will increase coverage by
0.14%. The diff coverage is77.74%.
@@ Coverage Diff @@
## 3.2 #10726 +/- ##
============================================
+ Coverage 64.76% 64.91% +0.14%
- Complexity 390 391 +1
============================================
Files 1342 1347 +5
Lines 57323 57421 +98
Branches 8457 8465 +8
============================================
+ Hits 37124 37273 +149
+ Misses 16217 16177 -40
+ Partials 3982 3971 -11
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...apache/dubbo/common/constants/CommonConstants.java | 100.00% <ø> (ø) |
|
| ...a/org/apache/dubbo/rpc/model/ApplicationModel.java | 82.35% <0.00%> (ø) |
|
| ...fig/bootstrap/builders/AbstractServiceBuilder.java | 88.76% <0.00%> (-4.18%) |
:arrow_down: |
| ...apache/dubbo/rpc/protocol/tri/RequestMetadata.java | 86.95% <ø> (+4.34%) |
:arrow_up: |
| ...g/apache/dubbo/rpc/protocol/tri/TripleInvoker.java | 61.37% <ø> (+0.42%) |
:arrow_up: |
| ...he/dubbo/rpc/protocol/tri/stream/ClientStream.java | 33.33% <ø> (ø) |
|
| ...bo/rpc/protocol/tri/stream/TripleServerStream.java | 34.61% <50.00%> (+2.31%) |
:arrow_up: |
| ...e/dubbo/remoting/buffer/ChannelWritableBuffer.java | 57.14% <57.14%> (ø) |
|
| .../protocol/dubbo/DubboIsolationExecutorSupport.java | 58.82% <58.82%> (ø) |
|
| ...ubbo/rpc/protocol/tri/call/AbstractServerCall.java | 56.14% <60.00%> (+4.43%) |
:arrow_up: |
| ... and 84 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
- 增加frame的处理逻辑
(1)去掉了endstream的包(最后一个数据包自己能描述)
(2)信令优先级和数据优先级分离(frame的发送机制决定)
(3)减少数据小包的发送量,分配的空间默认应该是4K,理论上都是满了才发送
a. 目前的发送时机
- 满了发送
- 手动flush
- halfclose的时候发送并且endstream
- QueueCommand全部改成直接使用Http2StreamFrame,理论上在eventloop只发送Http2StreamFrame,不处理其他构建的逻辑
- 性能优化上,合并了3.2之后提升不明显,估计10%左右 目前单线程调用的性能大致从4500 => 6300,具体grpc的8000还是有差距