测试说明
仅限于 Java
客户端使用 JMH 进行压测, 32 线程, 3 轮预热 3 轮测试, 每轮 10s
每次运行前都会执行 killall java, 但没有在每轮测试时重启操作系统
所有类库版本在发布时都是最新的, 除非存在 bug
所有框架都尽量参考该项目自带的 Benchmark 实现
将会一直持续, 不定期发布测试结果
测试用例
boolean existUser(String email), 判断某个 email 是否存在
boolean createUser(User user), 添加一个 User
User getUser(long id), 根据 id 获取一个用户
Page<user> listUser(int pageNo), 获取用户列表/<user>
运行结果
生成时间: 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
<table><thead>frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)/<thead><tbody>turbo-rpc122.6750.2620.3870.5812.001jupiter120.0290.2670.3640.594.301thrift96.5890.3320.6331.1741.778netty91.2150.3720.4030.4710.767turbo-rest83.6890.3840.8411.5013.971undertow83.660.3690.8021.4463.415undertow-async73.5340.4330.8981.7085.604dubbo-kryo61.0770.5280.6730.9153.891dubbo60.4810.5330.6770.8683.199motan54.0750.5830.9071.85812.206rapidoid49.320.651.973.92410.764hprose39.4890.8450.5064.23940.239springwebflux29.8851.0761.6532.1838.139grpc26.8961.1291.4251.6794.08springboot23.1211.4091.96211.53425.952/<tbody>/<table>createUser
<table><thead>frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)/<thead><tbody>jupiter108.1550.2980.4170.694.415turbo-rpc96.0850.3360.4540.6642.941thrift91.3830.3540.6671.2311.884undertow82.7990.3920.8151.453.856turbo-rest77.0480.3950.751.3764.801undertow-async70.4190.4640.8271.4755.983netty70.1570.4390.5140.6030.932motan50.6840.6451.0062.09712.452dubbo-kryo45.0090.7390.9211.1455.12hprose34.0560.9980.56438.14240.436grpc28.2611.0881.4661.7183.498springwebflux26.9341.1561.7762.3478.831dubbo26.6721.2071.5441.9255.054springboot23.1561.4172.00311.64927.537rapidoid19.0331.6891.11630.24550.463/<tbody>/<table>getUser
<table><thead>frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)/<thead><tbody>turbo-rpc106.830.3040.4520.6553.224jupiter104.5610.3040.4340.744.481thrift91.2130.3510.6691.2351.896undertow81.50.4040.8631.6124.252turbo-rest71.8330.4480.7591.4155.825undertow-async69.8050.4510.8041.4524.768netty68.6680.5080.5170.5430.611motan50.6180.6260.9861.99312.222dubbo-kryo48.2870.6650.8171.0315.087rapidoid43.4540.742.4375.05413.721hprose43.0370.7660.7781.39140.042grpc28.4371.0371.3741.6473.83dubbo24.4871.1871.5072.0117.137springwebflux24.4191.3132.0852.5689.11springboot21.6191.5092.16311.82928.279/<tbody>/<table>listUser
<table><thead>frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)/<thead><tbody>jupiter42.0760.7541.3432.585.767turbo-rpc39.5440.8621.8942.3966.226thrift30.6291.0482.034.09210.223undertow30.11.0631.4892.2739.798grpc29.7881.0381.3311.8047.528motan28.7021.1021.8063.35111.64undertow-async28.5811.1191.6042.5610.153netty23.241.4941.531.6124.549rapidoid20.1661.6041.49721.72539.911turbo-rest18.6271.742.1343.63711.554springwebflux18.2081.762.7483.34611.289hprose17.3081.852.0232.66658.524dubbo-kryo17.0541.8672.4623.3918.618springboot14.8132.1753.33814.51632.309dubbo3.8338.33811.28914.94219.847/<tbody>/<table>更新说明
硬件变化, 阿里云 ecs.c4.xlarge 没有了, 只能使用 ecs.c5.xlarge
软件变化, java 9 升级为 java 10
测试方法变化, "10 轮预热 3 轮测试 每轮 1s" 修改为 "3 轮预热 3 轮测试 每轮 10s"
aeron: 性能差会丢消息, 没存在价值, 从 rpc-benchmark 中去掉了
jupiter: 作者 fengjiachun 亲自修改测试参数, 非常感谢
hprose: 作者 andot 亲自修改测试参数, 非常感谢
thrift: 连接数由 4 个增加到 32 个, 连接池修改为分段锁实现
其他: 常规版本升级, 都升级到了最新版本 (dubbo 2.6.1 存在 bug,继续使用 2.6.0)
如果你认为xx框架的代码或配置存在问题,那么欢迎发起 Pull Request
利益相关: 本测试用例作者同时为 turbo, undertow-async 的作者
快速链接
RPC Benchmark Round 1
rpc-benchmark 测试说明
rpc-benchmark 项目代码
tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=2284732365