RPC Benchmark Round 2,Dubbo 继续垫底


声明:本文转载自https://my.oschina.net/u/1014759/blog/1783112,转载目的在于传递更多信息,仅供学习交流之用。如有侵权行为,请联系我,我会及时删除。

测试说明

  • 仅限于 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

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
turbo-rpc122.6750.2620.3870.5812.001
jupiter120.0290.2670.3640.594.301
thrift96.5890.3320.6331.1741.778
netty91.2150.3720.4030.4710.767
turbo-rest83.6890.3840.8411.5013.971
undertow83.660.3690.8021.4463.415
undertow-async73.5340.4330.8981.7085.604
dubbo-kryo61.0770.5280.6730.9153.891
dubbo60.4810.5330.6770.8683.199
motan54.0750.5830.9071.85812.206
rapidoid49.320.651.973.92410.764
hprose39.4890.8450.5064.23940.239
springwebflux29.8851.0761.6532.1838.139
grpc26.8961.1291.4251.6794.08
springboot23.1211.4091.96211.53425.952

createUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
jupiter108.1550.2980.4170.694.415
turbo-rpc96.0850.3360.4540.6642.941
thrift91.3830.3540.6671.2311.884
undertow82.7990.3920.8151.453.856
turbo-rest77.0480.3950.751.3764.801
undertow-async70.4190.4640.8271.4755.983
netty70.1570.4390.5140.6030.932
motan50.6840.6451.0062.09712.452
dubbo-kryo45.0090.7390.9211.1455.12
hprose34.0560.9980.56438.14240.436
grpc28.2611.0881.4661.7183.498
springwebflux26.9341.1561.7762.3478.831
dubbo26.6721.2071.5441.9255.054
springboot23.1561.4172.00311.64927.537
rapidoid19.0331.6891.11630.24550.463

getUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
turbo-rpc106.830.3040.4520.6553.224
jupiter104.5610.3040.4340.744.481
thrift91.2130.3510.6691.2351.896
undertow81.50.4040.8631.6124.252
turbo-rest71.8330.4480.7591.4155.825
undertow-async69.8050.4510.8041.4524.768
netty68.6680.5080.5170.5430.611
motan50.6180.6260.9861.99312.222
dubbo-kryo48.2870.6650.8171.0315.087
rapidoid43.4540.742.4375.05413.721
hprose43.0370.7660.7781.39140.042
grpc28.4371.0371.3741.6473.83
dubbo24.4871.1871.5072.0117.137
springwebflux24.4191.3132.0852.5689.11
springboot21.6191.5092.16311.82928.279

listUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
jupiter42.0760.7541.3432.585.767
turbo-rpc39.5440.8621.8942.3966.226
thrift30.6291.0482.034.09210.223
undertow30.11.0631.4892.2739.798
grpc29.7881.0381.3311.8047.528
motan28.7021.1021.8063.35111.64
undertow-async28.5811.1191.6042.5610.153
netty23.241.4941.531.6124.549
rapidoid20.1661.6041.49721.72539.911
turbo-rest18.6271.742.1343.63711.554
springwebflux18.2081.762.7483.34611.289
hprose17.3081.852.0232.66658.524
dubbo-kryo17.0541.8672.4623.3918.618
springboot14.8132.1753.33814.51632.309
dubbo3.8338.33811.28914.94219.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 的作者

快速链接

本文发表于2018年03月25日 22:38
(c)注:本文转载自https://my.oschina.net/u/1014759/blog/1783112,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如有侵权行为,请联系我们,我们会及时删除.

阅读 2019 讨论 0 喜欢 0

抢先体验

扫码体验
趣味小程序
文字表情生成器

闪念胶囊

你要过得好哇,这样我才能恨你啊,你要是过得不好,我都不知道该恨你还是拥抱你啊。

直抵黄龙府,与诸君痛饮尔。

那时陪伴我的人啊,你们如今在何方。

不出意外的话,我们再也不会见了,祝你前程似锦。

这世界真好,吃野东西也要留出这条命来看看

快捷链接
网站地图
提交友链
Copyright © 2016 - 2021 Cion.
All Rights Reserved.
京ICP备2021004668号-1