fix: systemd agent unit add --max-semi-space-size=4 (match run.sh); README memory numbers to measured values
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
- 3x-ui 式共享节点:nodes 状态机 + 每个客户独立凭据(`ng:<customerId>` 身份)
|
- 3x-ui 式共享节点:nodes 状态机 + 每个客户独立凭据(`ng:<customerId>` 身份)
|
||||||
- 全面 sing-box:不再捆绑 xray
|
- 全面 sing-box:不再捆绑 xray
|
||||||
- 按用户流量统计:AnyTLS 走日志解析,SS 走节点级
|
- 按用户流量统计: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
|
VLESS / SS2022 / SS经典 / SOCKS5 / Hysteria2 / AnyTLS
|
||||||
|
|
||||||
## 内存占用(实测)
|
## 内存占用(实测 2026-10-20,三台节点机)
|
||||||
|
|
||||||
| 组件 | 内存 |
|
| 组件 | 内存 |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 主控面板 | 约 61MB |
|
| 主控面板 | 约 61MB(OpenWrt 路由器) |
|
||||||
| Agent | 约 30MB |
|
| Agent | 57–82MB(含 Node 运行时;客户/流量越多越高) |
|
||||||
| sing-box | 约 64MB |
|
| sing-box | 16–36MB |
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Wants=network-online.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
EnvironmentFile=/etc/nexusgate/agent.env
|
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
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
NoNewPrivileges=true
|
NoNewPrivileges=true
|
||||||
|
|||||||
Reference in New Issue
Block a user