RPC Benchmark Round 2,Dubbo 继续垫底

测试说明

  • 仅限于 Java
  • 客户端使用 JMH 进行压测, 32 线程, 3 轮预热 3 轮测试, 每轮 10s
  • 每次运行前都会执行 killall java, 但没有在每轮测试时重启操作系统
  • 所有类库版本在发布时都是最新的, 除非存在 bug
  • 所有框架都尽量参考该项目自带的 Benchmark 实现
  • 将会一直持续, 不定期发布测试结果

测试用例

  1. boolean existUser(String email), 判断某个 email 是否存在
  2. boolean createUser(User user), 添加一个 User
  3. User getUser(long id), 根据 id 获取一个用户
  4. Page<User> listUser(int pageNo), 获取用户列表

运行结果

  • 生成时间: 2018-03-25 13:25:48
  • 硬件环境: 阿里云 ecs.c5.xlarge Intel Xeon Platinum 8163, 4CPU 8GB RAM 两台
  • 软件环境: Ubuntu x64 16.04.5, Java HotSpot(TM) 64-Bit Server VM 10+46
  • 启动参数: java -server -Xmx1g -Xms1g -XX:MaxDirectMemorySize=1g -XX:+UseG1GC

existUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
turbo-rpc 122.675 0.262 0.387 0.581 2.001
jupiter 120.029 0.267 0.364 0.59 4.301
thrift 96.589 0.332 0.633 1.174 1.778
netty 91.215 0.372 0.403 0.471 0.767
turbo-rest 83.689 0.384 0.841 1.501 3.971
undertow 83.66 0.369 0.802 1.446 3.415
undertow-async 73.534 0.433 0.898 1.708 5.604
dubbo-kryo 61.077 0.528 0.673 0.915 3.891
dubbo 60.481 0.533 0.677 0.868 3.199
motan 54.075 0.583 0.907 1.858 12.206
rapidoid 49.32 0.65 1.97 3.924 10.764
hprose 39.489 0.845 0.506 4.239 40.239
springwebflux 29.885 1.076 1.653 2.183 8.139
grpc 26.896 1.129 1.425 1.679 4.08
springboot 23.121 1.409 1.962 11.534 25.952

createUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
jupiter 108.155 0.298 0.417 0.69 4.415
turbo-rpc 96.085 0.336 0.454 0.664 2.941
thrift 91.383 0.354 0.667 1.231 1.884
undertow 82.799 0.392 0.815 1.45 3.856
turbo-rest 77.048 0.395 0.75 1.376 4.801
undertow-async 70.419 0.464 0.827 1.475 5.983
netty 70.157 0.439 0.514 0.603 0.932
motan 50.684 0.645 1.006 2.097 12.452
dubbo-kryo 45.009 0.739 0.921 1.145 5.12
hprose 34.056 0.998 0.564 38.142 40.436
grpc 28.261 1.088 1.466 1.718 3.498
springwebflux 26.934 1.156 1.776 2.347 8.831
dubbo 26.672 1.207 1.544 1.925 5.054
springboot 23.156 1.417 2.003 11.649 27.537
rapidoid 19.033 1.689 1.116 30.245 50.463

getUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
turbo-rpc 106.83 0.304 0.452 0.655 3.224
jupiter 104.561 0.304 0.434 0.74 4.481
thrift 91.213 0.351 0.669 1.235 1.896
undertow 81.5 0.404 0.863 1.612 4.252
turbo-rest 71.833 0.448 0.759 1.415 5.825
undertow-async 69.805 0.451 0.804 1.452 4.768
netty 68.668 0.508 0.517 0.543 0.611
motan 50.618 0.626 0.986 1.993 12.222
dubbo-kryo 48.287 0.665 0.817 1.031 5.087
rapidoid 43.454 0.74 2.437 5.054 13.721
hprose 43.037 0.766 0.778 1.391 40.042
grpc 28.437 1.037 1.374 1.647 3.83
dubbo 24.487 1.187 1.507 2.011 7.137
springwebflux 24.419 1.313 2.085 2.568 9.11
springboot 21.619 1.509 2.163 11.829 28.279

listUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
jupiter 42.076 0.754 1.343 2.58 5.767
turbo-rpc 39.544 0.862 1.894 2.396 6.226
thrift 30.629 1.048 2.03 4.092 10.223
undertow 30.1 1.063 1.489 2.273 9.798
grpc 29.788 1.038 1.331 1.804 7.528
motan 28.702 1.102 1.806 3.351 11.64
undertow-async 28.581 1.119 1.604 2.56 10.153
netty 23.24 1.494 1.53 1.612 4.549
rapidoid 20.166 1.604 1.497 21.725 39.911
turbo-rest 18.627 1.74 2.134 3.637 11.554
springwebflux 18.208 1.76 2.748 3.346 11.289
hprose 17.308 1.85 2.023 2.666 58.524
dubbo-kryo 17.054 1.867 2.462 3.391 8.618
springboot 14.813 2.175 3.338 14.516 32.309
dubbo 3.833 8.338 11.289 14.942 19.847

更新说明

  1. 硬件变化, 阿里云 ecs.c4.xlarge 没有了, 只能使用 ecs.c5.xlarge
  2. 软件变化, java 9 升级为 java 10
  3. 测试方法变化, "10 轮预热 3 轮测试 每轮 1s" 修改为 "3 轮预热 3 轮测试 每轮 10s"
  4. aeron: 性能差会丢消息, 没存在价值, 从 rpc-benchmark 中去掉了
  5. jupiter: 作者 fengjiachun 亲自修改测试参数, 非常感谢
  6. hprose: 作者 andot 亲自修改测试参数, 非常感谢
  7. thrift: 连接数由 4 个增加到 32 个, 连接池修改为分段锁实现
  8. 其他: 常规版本升级, 都升级到了最新版本 (dubbo 2.6.1 存在 bug,继续使用 2.6.0)

免责声明

  • 能力所限错误在所难免, 本测试用例及测试结果仅供参考
  • 如果你认为xx框架的代码或配置存在问题,那么欢迎发起 Pull Request
  • 利益相关: 本测试用例作者同时为 turbo, undertow-async 的作者

快速链接

猜你喜欢

转载自my.oschina.net/u/1014759/blog/1783112