fix: systemd agent unit add --max-semi-space-size=4 (match run.sh); README memory numbers to measured values

This commit is contained in:
aaaamoooo
2026-10-20 06:25:37 +00:00
parent ae9e607527
commit c6615f0ab5
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -13,7 +13,7 @@
- 3x-ui 式共享节点:nodes 状态机 + 每个客户独立凭据(`ng:<customerId>` 身份)
- 全面 sing-box:不再捆绑 xray
- 按用户流量统计:AnyTLS 走日志解析,SS 走节点级
- 内存优化:面板 `node --max-old-space-size=128`,agent 64M,sing-box `GOMEMLIMIT=64MiB`
- 内存优化:面板 `node --max-old-space-size=128 --optimize-for-size`,agent `--max-old-space-size=64 --optimize-for-size --max-semi-space-size=4`,sing-box `GOMEMLIMIT=64MiB GOGC=50`
## 安装
@@ -46,13 +46,13 @@ curl -fsSL https://raw.githubusercontent.com/aaaamoooo/NexusGate/main/scripts/ag
VLESS / SS2022 / SS经典 / SOCKS5 / Hysteria2 / AnyTLS
## 内存占用(实测)
## 内存占用(实测 2026-10-20,三台节点机)
| 组件 | 内存 |
|---|---|
| 主控面板 | 约 61MB |
| Agent | 约 30MB |
| sing-box | 约 64MB |
| 主控面板 | 约 61MB(OpenWrt 路由器) |
| Agent | 57–82MB(含 Node 运行时;客户/流量越多越高) |
| sing-box | 16–36MB |
## License
+1 -1
View File
@@ -6,7 +6,7 @@ Wants=network-online.target
[Service]
Type=simple
EnvironmentFile=/etc/nexusgate/agent.env
ExecStart=/usr/bin/node --max-old-space-size=64 --optimize-for-size /opt/nexusgate-agent/agent.js
ExecStart=/usr/bin/node --max-old-space-size=64 --optimize-for-size --max-semi-space-size=4 /opt/nexusgate-agent/agent.js
Restart=always
RestartSec=5
NoNewPrivileges=true