RPC Benchmark Round 4,TurboRPC 重回巔峯

測試說明

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

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
netty 164.148 0.193 0.263 0.349 0.471
turbo-rpc 160.824 0.198 0.268 0.348 0.476
jupiter 121.79 0.264 0.372 0.552 1.716
servicecomb 120.684 0.265 0.327 0.447 1.153
thrift 103.7 0.309 0.582 1.067 1.534
turbo-rest 95.611 0.337 0.815 1.37 2.544
undertow 92.121 0.319 0.804 1.356 2.392
undertow-async 84.401 0.383 0.743 1.319 3.527
armeria 77.714 0.419 0.73 1.214 3.874
dubbo 69.853 0.471 0.598 0.801 3.039
dubbo-kryo 69.509 0.481 0.591 0.794 3.396
motan 62.892 0.519 0.785 1.563 10.093
rapidoid 58.374 0.553 1.52 2.978 9.275
hprose 42.93 0.749 0.475 2.234 40.239
springwebflux 34.524 0.934 1.067 1.163 3.76
springboot-undertow 33.984 0.946 1.149 8.602 18.776
grpc 28.276 1.105 1.333 1.491 2.97
springboot 26.62 1.206 1.571 9.388 22.512

createUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
netty 152.526 0.211 0.297 0.412 0.535
turbo-rpc 142.739 0.225 0.308 0.398 0.499
servicecomb 109.162 0.292 0.369 0.539 2.163
jupiter 108.392 0.295 0.413 0.626 1.544
thrift 96.859 0.331 0.627 1.149 1.665
undertow 91.564 0.339 0.723 1.235 3.6
turbo-rest 90.684 0.349 0.624 1.049 3.22
undertow-async 79.792 0.404 0.701 1.188 4.071
armeria 64.24 0.509 0.681 1.253 4.893
motan 56.545 0.567 0.872 1.778 10.977
dubbo-kryo 52.285 0.615 0.775 1.011 4.792
hprose 38.791 0.881 0.496 37.028 40.37
springwebflux 32.542 1.004 1.135 1.223 4.098
dubbo 32.493 0.972 1.245 1.563 4.858
grpc 29.83 1.067 1.317 1.473 2.92
springboot 25.921 1.242 1.604 9.355 22.086
springboot-undertow 24.66 1.289 2.101 6.865 14.369
rapidoid 22.559 1.436 0.956 25.756 43.516

getUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
netty 150.336 0.215 0.293 0.392 0.493
turbo-rpc 142.188 0.223 0.309 0.408 0.51
servicecomb 108.511 0.296 0.377 0.565 2.245
jupiter 106.07 0.303 0.441 0.67 1.602
thrift 97.593 0.331 0.623 1.141 1.657
undertow 92.562 0.351 0.745 1.29 2.626
turbo-rest 83.16 0.381 0.739 1.3 3.105
undertow-async 82.372 0.39 0.723 1.239 2.994
armeria 71.021 0.453 0.691 1.153 3.76
motan 58.169 0.551 0.847 1.774 9.748
dubbo-kryo 55.022 0.581 0.718 0.937 4.579
rapidoid 51.649 0.62 1.87 3.76 7.897
hprose 48.095 0.667 0.692 1.198 40.042
dubbo 32.989 0.963 1.249 1.663 5.742
grpc 31.684 1.085 1.294 1.462 2.722
springboot-undertow 30.212 1.085 1.307 8.7 19.497
springwebflux 28.166 1.138 1.257 1.331 3.838
springboot 24.63 1.304 1.743 9.667 23.944

listUser

framework thrpt (ops/ms) avgt (ms) p90 (ms) p99 (ms) p999 (ms)
turbo-rpc 56.549 0.565 0.879 1.155 8.634
netty 47.402 0.675 0.61 1.009 19.754
jupiter 47.031 0.688 1.032 1.587 16.335
servicecomb 35.554 0.897 1.163 4.481 10.076
thrift 33.46 0.95 1.835 3.715 8.405
grpc 33.428 0.945 1.2 1.487 5.538
motan 32.711 0.972 1.577 2.822 10.24
undertow-async 32.373 0.985 1.339 1.939 8.208
undertow 32.254 0.994 1.253 2.421 10.576
armeria 31.445 1.009 1.509 2.593 8.962
rapidoid 23.466 1.356 1.19 19.464 35.586
turbo-rest 21.093 1.534 1.882 3.113 9.622
dubbo-kryo 20.919 1.599 2.142 2.974 7.531
springwebflux 20.679 1.549 1.671 1.796 6.226
hprose 20.04 1.581 1.808 2.351 49.798
springboot-undertow 18.279 1.758 2.888 11.452 21.332
springboot 16.825 1.909 2.535 12.059 28.803
dubbo 4.661 6.75 9.339 12.255 16.908

更新說明

  1. 硬件無變化
  2. 軟件變化, 升級爲 jdk-10.0.2
  3. 重構了 netty 實現, 手工序列化 + 合併發送請求

致謝

特別感謝下列人員對本項目的大力支持java

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

免責聲明

  • 能力所限錯誤在所不免, 本測試用例及測試結果僅供參考
  • 若是你認爲 xxx 框架的代碼或配置存在問題,那麼歡迎發起 Pull Request
  • 利益相關: 本測試用例做者同時爲 turbo undertow-async 的做者

快速連接

往期評測:git

測試說明:github

相關文章
相關標籤/搜索