test(go): record 10k gateway connection baseline

This commit is contained in:
lingniu
2026-07-03 18:09:53 +08:00
parent 291bffa340
commit 65232812a1
3 changed files with 54 additions and 6 deletions

View File

@@ -104,3 +104,37 @@ go run ./cmd/load-sim \
- Redis/MySQL/TDengine 写入耗时
- CPU/load/memory/file descriptors
- 错误日志
## 2026-07-03 阶段压测记录
压测方式:在 ECS 本机使用 `/opt/lingniu-go-native/current/load-sim``127.0.0.1:808` 发起 JT808 hold-only 连接,`-send=false`,不发送业务帧,不污染 raw 数据。
压测前基线,时间 `2026-07-03 18:03:10 CST`
| 项 | 值 |
| --- | --- |
| 服务状态 | 6 个 Go systemd 服务均 active |
| JT808 连接 | 约 240 |
| GB32960 连接 | 约 2 |
| load average | `0.43 / 0.22 / 0.23` |
| available memory | 约 `6661 MB` |
| NATS ack pending | `0` |
| NATS pending | 约 `39` |
| history/stat/realtime Kafka lag | `0` |
阶段结果:
| 阶段 | 时间 | 参数 | 峰值连接/FD | 结果 | 资源和队列 |
| --- | --- | --- | --- | --- | --- |
| 100 连接 | `18:03:21-18:04:21 CST` | `connections=100 connect-rate=100 duration=60s send=false` | JT808 active `340``ss``341` | opened `100`failed `0`frames `0`write_errors `0` | load 约 `0.33/0.21/0.22`available memory 约 `6659 MB` |
| 1,000 连接 | `18:04:38-18:05:38 CST` | `connections=1000 connect-rate=500 duration=60s send=false` | JT808 active `1240``ss``1241`gateway FD 约 `1256` | opened `1000`failed `0`frames `0`write_errors `0` | load 约 `0.80/0.33/0.26`available memory 约 `6645 MB` |
| 10,000 连接 | `18:05:59-18:07:59 CST` | `connections=10000 connect-rate=1000 duration=120s send=false` | JT808 active `10240``ss``10241`gateway FD 约 `10256` | opened `10000`failed `0`frames `0`write_errors `0` | 20 秒时 load 约 `0.45/0.33/0.27`available memory 约 `6409 MB`NATS ack pending `0` |
压测后:
- `2026-07-03 18:08:47 CST` JT808 active 回落到 `240``ss``241`
- `20211/20212/20213/20214/20200` readyz 均 OK。
- 压测窗口未出现 gateway `error|failed|panic|fatal|rejected` 日志。
- `vehicle_gateway_connection_rejections_total` 未输出,表示本轮没有连接拒绝计数。
结论:单 ECS 已通过本机 1W JT808 hold-only 连接基线测试;下一阶段应跑 5W hold-only再进入带真实帧率的低 FPS 压测。