Halo 2.10.2 不同 JVM 压测

Halo 2.10.2 不同 JVM 压测

压测环境

硬件配置

  • CPU: Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz (4核)
  • 内存: 4GB

操作系统

  • 操作系统: Debian GNU/Linux 12 (bookworm)

容器配置

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:08:02 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.24
  GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc:
  Version:          1.1.9
  GitCommit:        v1.1.9-0-gccaecfc
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

数据库

  • MySQL: 8.1.0 (Docker 部署)

压测工具

  • Vegeta: 12.11.1

压测策略

压测URLs

# 首页
GET http://10.0.12.12:8090/
GET http://10.0.12.12:8090/themes/theme-earth/assets/dist/style.css?v=1.6.0
GET http://10.0.12.12:8090/themes/theme-earth/assets/dist/main.iife.js?v=1.6.0
GET http://10.0.12.12:8090/plugins/PluginSearchWidget/assets/static/search-widget.iife.js
GET http://10.0.12.12:8090/themes/theme-earth/assets/images/default-avatar.svg
GET http://10.0.12.12:8090/themes/theme-earth/assets/images/default-background.png
GET http://10.0.12.12:8090/plugins/PluginSearchWidget/assets/static/style.css
# 文章页
GET http://10.0.12.12:8090/archives/ci-cd-shi-jian-ji-yu-hua-wei-yun-devcloud
GET http://10.0.12.12:8090/themes/theme-earth/assets/dist/style.css?v=1.6.0
GET http://10.0.12.12:8090/themes/theme-earth/assets/dist/main.iife.js?v=1.6.0
GET http://10.0.12.12:8090/plugins/PluginLightGallery/assets/static/css/lightgallery.min.css
GET http://10.0.12.12:8090/plugins/PluginLightGallery/assets/static/js/lightgallery.min.js
GET http://10.0.12.12:8090/plugins/PluginHighlightJS/assets/static/styles/default.min.css
GET http://10.0.12.12:8090/plugins/PluginHighlightJS/assets/static/highlight.min.js
GET http://10.0.12.12:8090/plugins/PluginSearchWidget/assets/static/search-widget.iife.js
GET http://10.0.12.12:8090/halo-tracker.js
GET http://10.0.12.12:8090/themes/theme-earth/assets/images/default-avatar.svg
GET http://10.0.12.12:8090/plugins/PluginCommentWidget/assets/static/comment-widget.iife.js?version=1.8.0
GET http://10.0.12.12:8090/plugins/PluginSearchWidget/assets/static/style.css
GET http://10.0.12.12:8090/plugins/PluginCommentWidget/assets/static/style.css?version=1.8.0
GET http://10.0.12.12:8090/actuator/globalinfo
GET http://10.0.12.12:8090/apis/api.console.halo.run/v1alpha1/users/-
GET http://10.0.12.12:8090/apis/api.halo.run/v1alpha1/comments?group=content.halo.run&kind=Post&name=405c9241-262c-478b-83b1-c95ef162a774&page=1&size=20&version=v1alpha1
POST http://10.0.12.12:8090/apis/api.halo.run/v1alpha1/trackers/counter
Content-Type: application/json
@/root/vegeta/counter.json

压测策略说明

每次压测后,容器将被重新启动。会等待CPU使用率降至正常值,然后等待至少1分钟,然后再次开始压测。

使用的镜像

openj9:ruibaby/halo:2.10.2-openj9

hotspot:halohub/halo:2.10.2

Halo 主题及启动的插件

主题:Earth

插件

  • lightgallery.js 灯箱
  • highlight.js 代码高亮
  • 站点迁移
  • RSS
  • 应用市场
  • Sitemap
  • 搜索组件
  • 评论组件

测试前置处理

使用站点迁移工具从各大优质rss源中迁移文章200篇

测试的文章拥有多张图片与多个代码块

测试结果

10s-100qps

hotspot

Requests      [total, rate, throughput]         1000, 100.10, 87.59
Duration      [total, attack, wait]             11.417s, 9.99s, 1.427s
Latencies     [min, mean, 50, 90, 95, 99, max]  1.936ms, 370.937ms, 43.089ms, 296.51ms, 3.618s, 4.74s, 5.107s
Bytes In      [total, mean]                     67864000, 67864.00
Bytes Out     [total, mean]                     11603, 11.60
Success       [ratio]                           100.00%
Status Codes  [code:count]                      200:1000  
Error Set:

openj9

Requests      [total, rate, throughput]         1000, 100.10, 60.64
Duration      [total, attack, wait]             16.491s, 9.99s, 6.501s
Latencies     [min, mean, 50, 90, 95, 99, max]  2.733ms, 1.118s, 69.941ms, 5.119s, 9.517s, 11.285s, 12.709s
Bytes In      [total, mean]                     67864000, 67864.00
Bytes Out     [total, mean]                     11603, 11.60
Success       [ratio]                           100.00%
Status Codes  [code:count]                      200:1000  
Error Set:

10s-200qps

hotspot

Requests      [total, rate, throughput]         1999, 199.92, 93.17
Duration      [total, attack, wait]             21.455s, 9.999s, 11.456s
Latencies     [min, mean, 50, 90, 95, 99, max]  40.332ms, 3.309s, 2.161s, 9.715s, 12.452s, 15.193s, 18.528s
Bytes In      [total, mean]                     135559327, 67813.57
Bytes Out     [total, mean]                     23489, 11.75
Success       [ratio]                           100.00%
Status Codes  [code:count]                      200:1999  

openj9

Requests      [total, rate, throughput]         2000, 200.10, 60.40
Duration      [total, attack, wait]             33.111s, 9.995s, 23.116s
Latencies     [min, mean, 50, 90, 95, 99, max]  73.944ms, 4.882s, 2.811s, 15.635s, 21.857s, 26.002s, 29.572s
Bytes In      [total, mean]                     135604054, 67802.03
Bytes Out     [total, mean]                     23489, 11.74
Success       [ratio]                           100.00%
Status Codes  [code:count]                      200:2000  

10s-500qps

hotspot

Requests      [total, rate, throughput]         5000, 500.09, 116.97
Duration      [total, attack, wait]             39.541s, 9.998s, 29.542s
Latencies     [min, mean, 50, 90, 95, 99, max]  83.93ms, 14.817s, 13.988s, 28.724s, 30s, 30.001s, 30.002s
Bytes In      [total, mean]                     325536885, 65107.38
Bytes Out     [total, mean]                     58581, 11.72
Success       [ratio]                           92.50%
Status Codes  [code:count]                      0:375  200:4625  

openj9

Requests      [total, rate, throughput]         5000, 500.09, 108.43
Duration      [total, attack, wait]             39.999s, 9.998s, 30.001s
Latencies     [min, mean, 50, 90, 95, 99, max]  46.311ms, 16.159s, 14.094s, 30s, 30.001s, 30.001s, 30.01s
Bytes In      [total, mean]                     320179817, 64035.96
Bytes Out     [total, mean]                     51223, 10.24
Success       [ratio]                           86.74%
Status Codes  [code:count]                      0:663  200:4337  

60s-50qps

hotspot

Requests      [total, rate, throughput]         3000, 50.02, 50.01
Duration      [total, attack, wait]             59.984s, 59.98s, 4.444ms
Latencies     [min, mean, 50, 90, 95, 99, max]  1.101ms, 20.5ms, 6.825ms, 39.627ms, 91.104ms, 180.021ms, 1.737s
Bytes In      [total, mean]                     203317750, 67772.58
Bytes Out     [total, mean]                     35375, 11.79
Success       [ratio]                           100.00%
Status Codes  [code:count]                      200:3000  

openj9

Requests      [total, rate, throughput]         3000, 50.02, 50.01
Duration      [total, attack, wait]             59.991s, 59.981s, 10.475ms
Latencies     [min, mean, 50, 90, 95, 99, max]  1.914ms, 68.709ms, 11.285ms, 115.99ms, 200.417ms, 1.821s, 4.504s
Bytes In      [total, mean]                     203317875, 67772.62
Bytes Out     [total, mean]                     35375, 11.79
Success       [ratio]                           100.00%
Status Codes  [code:count]                      200:3000  

60s-100qps

hotspot

Requests      [total, rate, throughput]         6000, 100.02, 100.01
Duration      [total, attack, wait]             59.994s, 59.99s, 3.833ms
Latencies     [min, mean, 50, 90, 95, 99, max]  760.144µs, 15.17ms, 5.652ms, 26.923ms, 86.538ms, 122.81ms, 209.832ms
Bytes In      [total, mean]                     406635250, 67772.54
Bytes Out     [total, mean]                     70750, 11.79
Success       [ratio]                           100.00%
Status Codes  [code:count]                      200:6000  

openj9

Requests      [total, rate, throughput]         6000, 100.02, 88.73
Duration      [total, attack, wait]             1m7s, 59.99s, 6.739s
Latencies     [min, mean, 50, 90, 95, 99, max]  1.093ms, 3.25s, 36.093ms, 14.195s, 20.233s, 30s, 30.003s
Bytes In      [total, mean]                     404125771, 67354.30
Bytes Out     [total, mean]                     70750, 11.79
Success       [ratio]                           98.68%
Status Codes  [code:count]                      0:79  200:5921  

60s-200qps

hotspot

Requests      [total, rate, throughput]         12000, 200.02, 152.98
Duration      [total, attack, wait]             1m15s, 59.995s, 15.02s
Latencies     [min, mean, 50, 90, 95, 99, max]  562.5µs, 4.459s, 88.189ms, 20.631s, 28.414s, 30.001s, 30.01s
Bytes In      [total, mean]                     795863770, 66321.98
Bytes Out     [total, mean]                     141217, 11.77
Success       [ratio]                           95.63%
Status Codes  [code:count]                      0:524  200:11476  

openj9

Requests      [total, rate, throughput]         12000, 200.02, 129.60
Duration      [total, attack, wait]             1m23s, 59.995s, 22.737s
Latencies     [min, mean, 50, 90, 95, 99, max]  40.828ms, 7.661s, 2.905s, 29.984s, 30.001s, 30.001s, 30.018s
Bytes In      [total, mean]                     777085785, 64757.15
Bytes Out     [total, mean]                     128765, 10.73
Success       [ratio]                           89.35%
Status Codes  [code:count]                      0:1278  200:10722  
Licensed under CC BY-NC-SA 4.0