Benchmark

The benchmark code is at rpcx-ecosystem/rpcx-benchmark.

Use the same test environment, the same test data and the same test parameters, test grpc, rpcx, dubbo, motan, thrift and go-micro.

Based on my prior test, dubbo, motan and go-micro have poor performance, so their latest test have not been listed here, you can use the benchmark code to test them.

Test Logic

Use protobuf as the codec for all test. The proto file is benchmark.proto:

  1. syntax = "proto2";
  2. package main;
  3. option optimize_for = SPEED;
  4. message BenchmarkMessage {
  5. required string field1 = 1;
  6. optional string field9 = 9;
  7. optional string field18 = 18;
  8. optional bool field80 = 80 [default=false];
  9. optional bool field81 = 81 [default=true];
  10. required int32 field2 = 2;
  11. required int32 field3 = 3;
  12. ......
  13. }

Client generates a requests by setting each fields and the size of this request is 518 bytes.

Server receives this request and sets the first field to "OK" and the second field to 100, then Server returns this request to Client.

The below two options can set concurrency and the total requests.

  1. var concurrency = flag.Int("c", 1, "concurrency")
  2. var total = flag.Int("n", 1, "total requests for all clients")

Test Environment

  • CPU: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz, 32 cores
  • Memory: 32G
  • Go: 1.9.2
  • OS: CentOS 7 / 3.10.0-229.el7.x86_64
    Client and Server are installed on the same machine.

Test Result

TPS

for 5000 concurrency, rpcx can archive 176,894 transations/second TPS, but grpc-go only gets 105219 transations/second

concurrencyRPCXGRPC-GO
5000176894105219
2000161660108245
1000148227111351
10014547993447

Latency: mean time

concurrencyRPCXGRPC-GO
50002747
20001218
100068
10001

Latency: median time

concurrencyRPCXGRPC-GO
5000342
2000715
100057
10000

By smallnest updated 2018-12-04 11:47:26