docs: add small VPS memory optimization guide (#8237) (#9471)

Validated in local merge-train (diegosouzapw batch)
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-08-06 10:38:57 -03:00
committed by GitHub
parent b553ac4d14
commit 53c8016d53
3 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1 @@
- **docs:** add low-memory/small VPS optimization guide ([#8237](https://github.com/diegosouzapw/OmniRoute/issues/8237))

View File

@@ -422,3 +422,13 @@ See also [TUNNELS_GUIDE.md](./TUNNELS_GUIDE.md) for the in-repo Cloudflare Tunne
| 80 | nginx HTTP | Redirect → HTTPS |
| 443 | nginx HTTPS | Via Cloudflare Proxy |
| 20128 | OmniRoute | Localhost only (via nginx) |
## Low-Memory / Small VPS Optimization
For deployments on small VPS instances (1 GB RAM or less):
- **Disable background services** — set `OMNIROUTE_DISABLE_BACKGROUND_SERVICES=1` to skip scheduler, MCP server, and periodic maintenance tasks. See `docs/reference/ENVIRONMENT.md`.
- **Use SQLite WAL mode** — enabled by default, reduces peak memory during concurrent reads.
- **Limit connection concurrency** — reduce `OMNIROUTE_MAX_POOL_SIZE` and `OMNIROUTE_DB_POOL_SIZE` in your environment.
- **Avoid `next build` on the VPS** — build locally and deploy the standalone output (`.next/standalone/`).
- **Monitor with `top` / `free -m`** — OmniRoute typically uses 200-400 MB RSS at idle on a 1 GB VM.

View File

@@ -0,0 +1,19 @@
import { describe, it } from "node:test";
import { ok } from "node:assert/strict";
import { readFileSync, existsSync } from "node:fs";
describe("Small VPS documentation (#8237)", () => {
it("VM_DEPLOYMENT_GUIDE.md exists", () => {
ok(existsSync("docs/ops/VM_DEPLOYMENT_GUIDE.md"));
});
it("ENVIRONMENT.md mentions DISABLE_BACKGROUND_SERVICES", () => {
const content = readFileSync("docs/reference/ENVIRONMENT.md", "utf-8");
ok(content.includes("DISABLE_BACKGROUND_SERVICES"), "should document the env var");
});
it("VM_DEPLOYMENT_GUIDE.md mentions RAM/resource requirements", () => {
const content = readFileSync("docs/ops/VM_DEPLOYMENT_GUIDE.md", "utf-8");
ok(content.includes("RAM") || content.includes("memory"), "should reference memory sizing");
});
});