dubbo-go-pixiu icon indicating copy to clipboard operation
dubbo-go-pixiu copied to clipboard

[BUG] Performance Degradation: Pixiu Causes Significant Latency Increase in Dubbo / gRPC / Triple Benchmarks

Open Alanxtl opened this issue 4 weeks ago • 5 comments

🚨 Performance Degradation: Pixiu Causes Significant Latency Increase in Dubbo / gRPC / Triple Benchmarks

When benchmarking the gateway performance of dubbo-go-pixiu, I observed significant latency increases across Dubbo, gRPC, and Triple protocols when traffic is routed through Pixiu.

The degradation is especially severe for Triple , where the latency increases by 40–50x ompared to direct invocation.

This appears to indicate a potential bottleneck in Pixiu’s protocol handling, filter chain, connection management, or serialization logic.

Benchmark Results

  • dubbo:
dubbo protocol performance test
      Name                 | N   | Min   | Median | Mean  | StdDev | Max   
      =====================================================================
      GetUser [duration]   | 500 | 100µs | 200µs  | 600µs | 2.8ms  | 20.7ms
      ---------------------------------------------------------------------
      GetGender [duration] | 500 | 0s    | 100µs  | 200µs | 100µs  | 600µs 
      ---------------------------------------------------------------------
      GetUser0 [duration]  | 500 | 100µs | 100µs  | 200µs | 0s     | 400µs 
      ---------------------------------------------------------------------
      GetUsers [duration]  | 500 | 100µs | 200µs  | 200µs | 100µs  | 600µs 
      ---------------------------------------------------------------------
      GetUser2 [duration]  | 500 | 0s    | 200µs  | 200µs | 100µs  | 500µs 
      ---------------------------------------------------------------------
      GetErr [duration]    | 500 | 300µs | 500µs  | 500µs | 200µs  | 1.4ms 

 pixiu to dubbo protocol performance test
      Name                 | N   | Min   | Median | Mean  | StdDev | Max  
      ====================================================================
      GetUser [duration]   | 500 | 200µs | 600µs  | 1.8ms | 8.4ms  | 61ms 
      --------------------------------------------------------------------
      GetGender [duration] | 499 | 200µs | 500µs  | 600µs | 300µs  | 4.1ms
      --------------------------------------------------------------------
      GetUser0 [duration]  | 497 | 200µs | 500µs  | 600µs | 300µs  | 2.5ms
      --------------------------------------------------------------------
      GetUsers [duration]  | 495 | 200µs | 600µs  | 700µs | 300µs  | 2.9ms
  • grpc:
grpc protocol performance test
      Name                     | N   | Min   | Median | Mean  | StdDev | Max  
      ========================================================================
      GetUser [duration]       | 500 | 100µs | 300µs  | 400µs | 600µs  | 5.2ms
      ------------------------------------------------------------------------
      GetUsers [duration]      | 500 | 100µs | 300µs  | 300µs | 200µs  | 1.5ms
      ------------------------------------------------------------------------
      GetUserByName [duration] | 496 | 100µs | 200µs  | 300µs | 100µs  | 1ms  

pixiu to grpc protocol performance test
      Name                     | N   | Min   | Median | Mean  | StdDev | Max   
      =========================================================================
      GetUser [duration]       | 500 | 600µs | 2ms    | 3.4ms | 4.3ms  | 25.9ms
      -------------------------------------------------------------------------
      GetUsers [duration]      | 500 | 600µs | 1.3ms  | 2.1ms | 3.3ms  | 25.1ms
      -------------------------------------------------------------------------
      GetUserByName [duration] | 500 | 800µs | 1.9ms  | 2.7ms | 3.8ms  | 33.4ms
  • triple:
triple protocol performance test
      Name                | N   | Min   | Median | Mean  | StdDev | Max  
      ===================================================================
      SayHello [duration] | 500 | 100µs | 200µs  | 300µs | 300µs  | 2.6ms

pixiu to triple protocol performance test
      Name                | N   | Min    | Median | Mean | StdDev | Max   
      ====================================================================
      SayHello [duration] | 490 | 10.1ms | 12.7ms | 14ms | 4.1ms  | 43.3ms

How to Reproduce

refer to tools/benchmark

you can try

--pprof
--cpu-profile
--mem-profile

检查以下问题:

  1. goroutine 阻塞
  2. JSON 编码/解码热点
  3. 正则匹配/插件 filter 配置开销
  4. 连接池复用情况

Alanxtl avatar Nov 28 '25 02:11 Alanxtl