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 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.372
0.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.97
3.92410.764
hprose39.4890.8450.5064.23940.239
springwebflux29.8851.0761.6532.1838.139
grpc26.8961.1291.4251.6794.08
springboot
23.1211.4091.96211.53425.952

createUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
jupiter108.1550.2980.4170.694.415
turbo-rpc
96.0850.3360.4540.6642.941
thrift91.3830.3540.6671.2311.884
undertow82.7990.3920.8151.453.856
turbo-rest77.0480.3950.751.376
4.801
undertow-async70.4190.4640.8271.4755.983
netty70.1570.4390.5140.6030.932
motan50.6840.6451.0062.09712.452
dubbo-kryo45.009
0.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.351
0.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.437
5.05413.721
hprose43.0370.7660.7781.39140.042
grpc28.4371.0371.3741.6473.83
dubbo24.4871.1871.5072.0117.137
springwebflux
24.4191.3132.0852.5689.11
springboot21.6191.5092.16311.82928.279

listUser

frameworkthrpt (ops/ms)avgt (ms)p90 (ms)p99 (ms)p999 (ms)
jupiter
42.0760.7541.3432.585.767
turbo-rpc39.5440.8621.8942.3966.226
thrift30.6291.0482.034.09210.223
undertow30.11.0631.4892.273
9.798
grpc29.7881.0381.3311.8047.528
motan28.7021.1021.8063.35111.64
undertow-async28.5811.1191.6042.5610.153
netty23.24
1.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.338
11.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 的作者

快速鏈接

  • RPC Benchmark Round 1

  • rpc-benchmark 測試說明

  • rpc-benchmark 項目代碼

tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=2284732365


分享到:


相關文章: