RPC Benchmark Round 2,Dubbo 繼續墊底

測試說明

僅限於 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