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<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

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
turbo-rpc 122.675 0.262 0.387 0.581 2.001
jupiter 120.029 0.267 0.364 0.59 4.301
thrift 96.589 0.332 0.633 1.174 1.778
netty 91.215 0.372 0.403 0.471 0.767
turbo-rest 83.689 0.384 0.841 1.501 3.971
undertow 83.66 0.369 0.802 1.446 3.415
undertow-async 73.534 0.433 0.898 1.708 5.604
dubbo-kryo 61.077 0.528 0.673 0.915 3.891
dubbo 60.481 0.533 0.677 0.868 3.199
motan 54.075 0.583 0.907 1.858 12.206
rapidoid 49.32 0.65 1.97 3.924 10.764
hprose 39.489 0.845 0.506 4.239 40.239
springwebflux 29.885 1.076 1.653 2.183 8.139
grpc 26.896 1.129 1.425 1.679 4.08
springboot 23.121 1.409 1.962 11.534 25.952

createUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
jupiter 108.155 0.298 0.417 0.69 4.415
turbo-rpc 96.085 0.336 0.454 0.664 2.941
thrift 91.383 0.354 0.667 1.231 1.884
undertow 82.799 0.392 0.815 1.45 3.856
turbo-rest 77.048 0.395 0.75 1.376 4.801
undertow-async 70.419 0.464 0.827 1.475 5.983
netty 70.157 0.439 0.514 0.603 0.932
motan 50.684 0.645 1.006 2.097 12.452
dubbo-kryo 45.009 0.739 0.921 1.145 5.12
hprose 34.056 0.998 0.564 38.142 40.436
grpc 28.261 1.088 1.466 1.718 3.498
springwebflux 26.934 1.156 1.776 2.347 8.831
dubbo 26.672 1.207 1.544 1.925 5.054
springboot 23.156 1.417 2.003 11.649 27.537
rapidoid 19.033 1.689 1.116 30.245 50.463

getUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
turbo-rpc 106.83 0.304 0.452 0.655 3.224
jupiter 104.561 0.304 0.434 0.74 4.481
thrift 91.213 0.351 0.669 1.235 1.896
undertow 81.5 0.404 0.863 1.612 4.252
turbo-rest 71.833 0.448 0.759 1.415 5.825
undertow-async 69.805 0.451 0.804 1.452 4.768
netty 68.668 0.508 0.517 0.543 0.611
motan 50.618 0.626 0.986 1.993 12.222
dubbo-kryo 48.287 0.665 0.817 1.031 5.087
rapidoid 43.454 0.74 2.437 5.054 13.721
hprose 43.037 0.766 0.778 1.391 40.042
grpc 28.437 1.037 1.374 1.647 3.83
dubbo 24.487 1.187 1.507 2.011 7.137
springwebflux 24.419 1.313 2.085 2.568 9.11
springboot 21.619 1.509 2.163 11.829 28.279

listUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
jupiter 42.076 0.754 1.343 2.58 5.767
turbo-rpc 39.544 0.862 1.894 2.396 6.226
thrift 30.629 1.048 2.03 4.092 10.223
undertow 30.1 1.063 1.489 2.273 9.798
grpc 29.788 1.038 1.331 1.804 7.528
motan 28.702 1.102 1.806 3.351 11.64
undertow-async 28.581 1.119 1.604 2.56 10.153
netty 23.24 1.494 1.53 1.612 4.549
rapidoid 20.166 1.604 1.497 21.725 39.911
turbo-rest 18.627 1.74 2.134 3.637 11.554
springwebflux 18.208 1.76 2.748 3.346 11.289
hprose 17.308 1.85 2.023 2.666 58.524
dubbo-kryo 17.054 1.867 2.462 3.391 8.618
springboot 14.813 2.175 3.338 14.516 32.309
dubbo 3.833 8.338 11.289 14.942 19.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 的做者

快速連接

相關文章
相關標籤/搜索