当前位置: 首页 > 工具软件 > turbo-rpc > 使用案例 >

RPC Benchmark Round 4,TurboRPC 重回巅峰

庄嘉
2023-12-01

测试说明

  • 仅限于 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-08-05 10:35:11
  • 硬件环境: 阿里云 hfc5 ecs.hfc5.xlarge 4vCPU 8GB Intel Xeon Gold 6149 3.1GHz 1.5Gbps 50万PPS
  • 软件环境: Ubuntu x64 16.04.5, Java HotSpot(TM) 64-Bit Server VM 10.0.2+13
  • 启动参数: java -server -Xmx1g -Xms1g -XX:+UseG1GC

existUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
netty164.1480.1930.2630.3490.471
turbo-rpc160.8240.1980.2680.3480.476
jupiter121.790.2640.3720.5521.716
servicecomb120.6840.2650.3270.4471.153
thrift103.70.3090.5821.0671.534
turbo-rest95.6110.3370.8151.372.544
undertow92.1210.3190.8041.3562.392
undertow-async84.4010.3830.7431.3193.527
armeria77.7140.4190.731.2143.874
dubbo69.8530.4710.5980.8013.039
dubbo-kryo69.5090.4810.5910.7943.396
motan62.8920.5190.7851.56310.093
rapidoid58.3740.5531.522.9789.275
hprose42.930.7490.4752.23440.239
springwebflux34.5240.9341.0671.1633.76
springboot-undertow33.9840.9461.1498.60218.776
grpc28.2761.1051.3331.4912.97
springboot26.621.2061.5719.38822.512

createUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
netty152.5260.2110.2970.4120.535
turbo-rpc142.7390.2250.3080.3980.499
servicecomb109.1620.2920.3690.5392.163
jupiter108.3920.2950.4130.6261.544
thrift96.8590.3310.6271.1491.665
undertow91.5640.3390.7231.2353.6
turbo-rest90.6840.3490.6241.0493.22
undertow-async79.7920.4040.7011.1884.071
armeria64.240.5090.6811.2534.893
motan56.5450.5670.8721.77810.977
dubbo-kryo52.2850.6150.7751.0114.792
hprose38.7910.8810.49637.02840.37
springwebflux32.5421.0041.1351.2234.098
dubbo32.4930.9721.2451.5634.858
grpc29.831.0671.3171.4732.92
springboot25.9211.2421.6049.35522.086
springboot-undertow24.661.2892.1016.86514.369
rapidoid22.5591.4360.95625.75643.516

getUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
netty150.3360.2150.2930.3920.493
turbo-rpc142.1880.2230.3090.4080.51
servicecomb108.5110.2960.3770.5652.245
jupiter106.070.3030.4410.671.602
thrift97.5930.3310.6231.1411.657
undertow92.5620.3510.7451.292.626
turbo-rest83.160.3810.7391.33.105
undertow-async82.3720.390.7231.2392.994
armeria71.0210.4530.6911.1533.76
motan58.1690.5510.8471.7749.748
dubbo-kryo55.0220.5810.7180.9374.579
rapidoid51.6490.621.873.767.897
hprose48.0950.6670.6921.19840.042
dubbo32.9890.9631.2491.6635.742
grpc31.6841.0851.2941.4622.722
springboot-undertow30.2121.0851.3078.719.497
springwebflux28.1661.1381.2571.3313.838
springboot24.631.3041.7439.66723.944

listUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
turbo-rpc56.5490.5650.8791.1558.634
netty47.4020.6750.611.00919.754
jupiter47.0310.6881.0321.58716.335
servicecomb35.5540.8971.1634.48110.076
thrift33.460.951.8353.7158.405
grpc33.4280.9451.21.4875.538
motan32.7110.9721.5772.82210.24
undertow-async32.3730.9851.3391.9398.208
undertow32.2540.9941.2532.42110.576
armeria31.4451.0091.5092.5938.962
rapidoid23.4661.3561.1919.46435.586
turbo-rest21.0931.5341.8823.1139.622
dubbo-kryo20.9191.5992.1422.9747.531
springwebflux20.6791.5491.6711.7966.226
hprose20.041.5811.8082.35149.798
springboot-undertow18.2791.7582.88811.45221.332
springboot16.8251.9092.53512.05928.803
dubbo4.6616.759.33912.25516.908

更新说明

  1. 硬件无变化
  2. 软件变化, 升级为 jdk-10.0.2
  3. 重构了 netty 实现, 手工序列化 + 合并发送请求

致谢

特别感谢下列人员对本项目的大力支持

  1. turbo: hank-whu
  2. jupiter: fengjiachun
  3. hprose: andot
  4. servicecomb: imlidian

免责声明

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

快速链接

往期评测:

测试说明:

转载于:https://my.oschina.net/u/1014759/blog/1922745

 类似资料: