Resource Usage
Measured CPU, memory, disk, network, and hardware requirements for the ServerBee Agent, plus historical Server observations.
This page documents measured resource requirements and runtime performance for the ServerBee Agent (v1.0.0-beta.7), alongside preserved historical observations for the Server and earlier releases. For SQLite database growth estimates, see Storage & Capacity Planning.
Agent
Minimum vs Recommended Requirements
Based on controlled Linux VM benchmarks of serverbee-agent v1.0.0-beta.7 (statically linked musl binary, server-dictated 3-second reporting interval, default capabilities). For full scenario tables, stress tests, and methodology, see the Agent benchmark report.
| Resource | Absolute floor (minimal config) | Minimum viable (default config) | Recommended (production / active use) | Notes |
|---|---|---|---|---|
| CPU | 1 vCPU (CPUQuota=5%) | 1 vCPU (shared / burstable) | 1+ vCPU | Steady-state uses 0.14%–0.19% of 1 core; 0 CPU throttles down to CPUQuota=5% |
| Available RAM (Agent budget) | 16 MiB ([security] enabled = false, no swap) | 32 MiB (cold boot + default security_events) | 64 MiB (128 MiB with Web Terminal or >500 procs) | Cold-cache default peaks at 21.0 MiB cgroup (0 reclaim stalls at 16 MiB, 0 pressure at 24 MiB) |
| Host VPS total RAM | 64–128 MiB Linux VPS | 128–256 MiB Linux VPS | 512 MiB+ Linux VPS | Agent uses <2%–5% of a 512 MiB VPS; host kernel and init dominate total RAM |
| Disk space | 20 MiB | 30 MiB | 50–100 MiB | Binary is 13.36 MiB (amd64) / 12.10 MiB (arm64); total install is 13.53 MiB. Reserve 2× binary size for self-upgrade .bak rollback |
| Network bandwidth | 2 Kbps (~0.45 GB/mo) | 5 Kbps (~0.5 GB/mo) | 100 Kbps+ (Web Terminal / File Manager) | Measured idle steady-state: 158 B/s TX + 0.8 B/s RX (~412 MB/month) |
| OS & libc | Linux with /proc (no glibc required) | Linux + systemd or OpenRC | Linux 5.x/6.x with systemd (cgroup v2) | Official Linux amd64/arm64 binaries are statically linked musl (not a dynamic executable) |
Open FDs (nofile) | >= 256 (<150 host procs) | >= 1024 (default ulimit -n) | >= 4096–65536 (>500 host procs) | sysinfo keeps persistent /proc/<pid>/stat FDs (~1:1 with host processes); set LimitNOFILE=65536 on dense hosts |
Measured Performance (v1.0.0-beta.7)
Measured on 2026-11-24 using official serverbee-agent v1.0.0-beta.7 (linux-amd64 static musl, deploy/install.sh binary mode) on Ubuntu 24.04.5 LTS (systemd 255, cgroup v2, KVM AMD EPYC) reporting every 3 seconds over WAN TLS WebSocket to a v1.0.0-beta.7 Server.
Steady-State Idle Soak (300s)
| Metric | 1 vCPU / 4 GiB VM | 2 vCPU / 8 GiB VM | Scope |
|---|---|---|---|
| CPU (1-core avg / p95 / max) | 0.144% / 0.426% / 0.544% | 0.190% / 0.568% / 0.791% | Cgroup v2 cpu.stat (0.143% / 0.190% via /proc) |
Agent VmRSS (RssAnon + RssFile) | 11.09 MiB (0.82 + 10.27 MiB) | 11.18 MiB (0.91 + 10.27 MiB) | Process resident memory (PSS: 11.08 / 11.18 MiB) |
| Systemd cgroup memory (warm cache) | 2.62 MiB (max 2.75 MiB) | 2.95 MiB (max 3.19 MiB) | Includes journalctl -f child; drops 54% to 1.21 MiB when [security] enabled = false |
| Systemd cgroup memory (cold cache) | 19.0 MiB (peak 21.0 MiB) | — | After drop_caches=3 with MemoryMax=24M (includes faulted executable pages) |
Memory stability (300s RssAnon delta) | +12 KiB (+1.89 KiB/min) | +8 KiB (+0.65 KiB/min) | Flat plateau over 100 collection cycles, zero leak |
| Threads / Open FDs | 3 / 46 (43–47) | 5 / 51 (48–52) | Tokio spawns 1 worker thread per vCPU |
| Network bandwidth (exact TCP socket) | 158.4 B/s TX, 0.8 B/s RX | 158.0 B/s TX, 0.8 B/s RX | ss -tinp; ~475 B per 3s TLS frame (~412 MB/month) |
| Binary / total installed disk | 13.36 MiB / 13.53 MiB | 13.36 MiB / 13.53 MiB | linux-amd64 static musl (linux-arm64 binary: 12.10 MiB) |
Workload, Stress & Cgroup Floor Highlights
- Startup & enrollment: Cold-start enrollment over trans-Pacific WAN completed in
1.26 s(~25 mslocal agent work; remainder was WAN RTT/TLS). Warmsystemctl restartreconnected in0.93 s. - Active dashboard viewing: Zero measurable extra agent CPU, memory, or network cost — the Server fans out already-received telemetry to browsers.
- Active Web Terminal (PTY): Adds
+1thread,+2.39 MiBcgroup memory (interactive shell child; agentRssAnonrose by+7 KiB),0.44%avg cgroup CPU (3.47%max), and971 B/sTX during periodic command output. - Host CPU & I/O stress: Under 100% host CPU saturation, telemetry remained uninterrupted (
0.175%agent CPU). Heavy disk fsync loops plus 200 active local TCP sockets added only+0.026%CPU and+83 KiBcgroup memory. - High process count (
>500processes): Spawning 500 sleeping processes (519total) scaled open FDs ~1:1 (51 → 545), tripled CPU (0.19% → 0.57%avg,3.00%max), and increased cgroup memory2.3×(2.95 → 6.80 MiB) becausesysinfokeeps persistent/proc/<pid>/statFDs to count processes. - Offline & reconnect recovery: During a 40s packet blackhole, memory and FDs stayed flat with zero restarts; after the half-open TCP socket closed, reconnection to
Sent SystemInfotook1.36 s. - Hard cgroup v2 floors (1 vCPU,
MemorySwapMax=0):- Warm-cache OOM boundary (with 300-process burst): survives
6 MiB(default) /4 MiB(security.enabled = false), OOMs at4 MiB/3 MiB. - Cold-cache zero-thrash floor (
drop_caches=3, default):16 MiB(0reclaim stalls,0OOM);24 MiBhas zero reclaim pressure. SettingMemoryMaxbelow16 MiBavoids OOM down to6 MiBbut causes heavy executable code-page thrashing (>137kreclaim stalls in 20s). CPUQuotafloor:0throttles down to5%(2%still keeps telemetry flowing with59 msthrottled over 45s).
- Warm-cache OOM boundary (with 300-process burst): survives
Low-Resource VPS & Dense-Host Tuning
- Low-RAM VPS (
<= 256 MiBRAM): Use the static binary (deploy/install.sh) rather than Docker. If you do not need SSH journal security watching, set[security] enabled = falsein/opt/serverbee/etc/agent.tomlto eliminate thejournalctl -fchild process and cut steady-state cgroup memory by ~54% (1.21 MiBwarm). Keep unused capabilities (terminal,exec,file,docker) disabled. Safe systemd guardrails areMemoryMax=64MandCPUQuota=15%(useMemoryMax=32Monly withoutterminal/execand below300processes; do not go below24Mwith default config). - Dense hosts (
>500processes / containers): Add a systemd drop-in withLimitNOFILE=65536andMemoryMax=128M(or leave memory uncapped) sosysinfo's/procdescriptors do not hit the default1024open-file limit.
Historical v0.9.3 Agent Observation
Preserved for historical reference: earlier notes for v0.9.3 (dated 2026-05-19, 4-core AMD EPYC 7B13 / 8 GB / Ubuntu 24.04 KVM, 3s interval, raw logs and exact linkage unarchived) recorded ~10 MB → ~34 MB ps RSS (~4.3 MB → ~27 MB systemd cgroup) over 8 hours, ~0.5%–0.7% CPU, 9–10 threads, an ~11 MB binary, and a protocol-based network estimate of <= 1–2 KB/s. That 8-hour reading alone did not establish a long-term plateau or libc linkage; use the v1.0.0-beta.7 measurements above for current deployments.
Server
Source: the historical measurement notes originally recorded on this page for v0.9.3, dated 2026-05-19 unless noted otherwise. Raw benchmark logs and exact binary linkage were not archived with those notes. Measure your deployed version, allocator, Agent count, enabled collectors, and query load before setting Server resource limits.
Historical Railway observation
The original page recorded roughly 140–170 MB with a small number of Agents and MALLOC_ARENA_MAX=2 present in the environment. It also reported 800 MB–1 GB after 2–3 days in another run. The notes do not capture exact build linkage, Agent count, query load, or a controlled comparison. These are historical readings, not evidence that the environment variable caused the difference or a memory target for the current release.
Historical self-hosted idle observation
The v0.9.3 notes describe a near-idle Server on the same VPS with no active Agent connections:
| Resource | Observed | Scope |
|---|---|---|
| Memory (systemd cgroup) | ~15 MB, peak ~23.8 MB | Historical idle observation, not a loaded-server requirement |
| Threads | 7 | Observed tokio runtime |
| CPU | Near zero | Idle workload |
| Binary size | ~47 MB | Historical linux-amd64 binary with the frontend SPA embedded |
Allocator and build scope
MALLOC_ARENA_MAX applies to glibc's allocator. Official Linux release binaries and Docker images use musl, where this variable has no effect. The standard deployment examples therefore do not set it. For a custom glibc build, assess allocator behavior against that build's measurements rather than applying the old Railway numbers.
A separate release-toolchain regression affected v1.0.0-beta.1: the recorded idle Server grew about 20 MB per day because of cross-thread free behavior in Zig 0.16's bundled allocator. The release workflow now pins Zig 0.15.2; the correction shipped in v1.0.0-beta.2. Its cause, observation scope, and reproduction procedure are recorded in the release memory soak runbook. This is a distinct observation from the v0.9.3 figures above. Use a current release and investigate sustained growth on the actual deployed build.
Disk
Server disk use includes SQLite, uploaded brand images, downloaded GeoIP/ASN MMDB files, and configuration. Database growth depends on Agent count, enabled features, and retention. See Storage & Capacity Planning for database estimates and Backup and Restore for files outside SQLite. Reserve space for WAL, bursts, and complete backup sets in addition to the base database.
Caveats
- The historical idle Server readings do not describe many Agents or heavy query load.
- Cgroup memory (
memory.current) and process RSS (VmRSS/PSS) measure different scopes; compare like with like and account for warm vs cold page cache when settingMemoryMax. - A 5-minute soak confirms flat steady-state behavior for the Agent reporting loop, but hosts running additional capabilities (Docker monitoring, frequent remote commands, or high process churn) should still validate limits under their real workload.