dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

Enqueue soon

Open owen200008 opened this issue 3 years ago • 1 comments

#10558 增加frame 性能提升15%,减少了一次flush和一次调度,后面和上 @icodening 的批量发送提升可能会减少

owen200008 avatar Oct 10 '22 09:10 owen200008

这边为止,使用frame来完成发送,client和server修改完成

owen200008 avatar Oct 11 '22 07:10 owen200008

Codecov Report

Merging #10726 (dea50f1) into 3.2 (0b5767f) will increase coverage by 0.14%. The diff coverage is 77.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

codecov-commenter avatar Oct 27 '22 13:10 codecov-commenter

  1. 增加frame的处理逻辑 (1)去掉了endstream的包(最后一个数据包自己能描述) (2)信令优先级和数据优先级分离(frame的发送机制决定) (3)减少数据小包的发送量,分配的空间默认应该是4K,理论上都是满了才发送 a. 目前的发送时机
    1. 满了发送
    2. 手动flush
    3. halfclose的时候发送并且endstream
  2. QueueCommand全部改成直接使用Http2StreamFrame,理论上在eventloop只发送Http2StreamFrame,不处理其他构建的逻辑
  3. 性能优化上,合并了3.2之后提升不明显,估计10%左右 目前单线程调用的性能大致从4500 => 6300,具体grpc的8000还是有差距

owen200008 avatar Oct 28 '22 03:10 owen200008