Skip to content

Performance Plan and Baselines ​

The benchmark record measures representative control-plane requests against SQLite. It also records the environment, commands, and repeated observations. Results are useful only when the workload and host conditions are stated.

Method ​

Measure throughput and latency for network and device operations. Compare file-backed and in-memory databases, and report memory per server process. Run the same workload before and after a change, use multiple trials, and avoid presenting a single best run as a guarantee.

Interpretation ​

A single-connection SQLite pool serializes writes by design. That choice simplifies state ordering for a small self-hosted deployment but can limit concurrency. Any optimization must preserve transaction order and recovery semantics before it is accepted.

Reproduction ​

The source record includes the exact commands, baseline environment, and post-change measurements. Re-run those commands on the target class of machine before drawing conclusions about production capacity. Relay throughput is also bounded by the endpoint links and VPS network path, not by control-plane benchmarks.

Baseline 2026-10-24 (R-07 performance acceptance) ​

Environment: Intel Core i9-10880H @ 2.30GHz (dev laptop), rustc 1.99.0 release build, 10 s per concurrency level. Driven by the in-process oneshot bench (apps/server/examples/bench.rs) — no TCP/TLS stack cost is included. The numbers are for before/after comparison of handler + SQLite work, not a capacity promise. Zero errors at every point.

db = file (SQLite on disk):

TargetConcurrencyreq/sp50 µsp90 µsp99 µsmax µs
GET /system/status (public, no DB)1206484341334704
GET /networks (session check = 1 DB read)15744138208112034093
GET /auth/tokens (session + list = 2 DB reads)1374322831912408118
GET /system/status16859491342321509
GET /networks1628221537685109117890
GET /auth/tokens161285110521818399114941
GET /system/status64893484342113305
GET /networks64304502043241534499387
GET /auth/tokens64169113706432854328581
GET /system/status256916522341812435
GET /networks2561680014067219893685681476
GET /auth/tokens2566579357165697789101112371

db = memory (same handlers, SQLite in-memory — isolates disk sync from handler cost):

TargetConcurrencyreq/sp50 µsp90 µsp99 µs
GET /system/status1324673237
GET /networks145591512892154
GET /auth/tokens12784332438962
GET /system/status648351023419
GET /networks64760782481002912034
GET /auth/tokens643878163321949521982
GET /system/status2569879142419
GET /networks2567272348994175949037
GET /auth/tokens2563712683938033794844

Memory footprint: RSS 11300 KiB → 66496 KiB across the file sweep (includes the load driver and runtime). The footprint run then measured 3.5 KiB/network (500 networks with one revision each: +1740 KiB). It also measured 0.2 KiB/token (500 API tokens: +112 KiB).

Reading: the public status path scales to ~0.9 M req/s because it touches no lock. Every authenticated path funnels through the single SQLite connection and saturates in the tens of thousands of req/s. With queueing (not disk) dominating at c=256, the memory table shows the same collapse. The bottleneck is the serialized pool, matching the interpretation above. At a realistic self-hosted load (a few agents polling every 30 s plus one console session) these paths sit idle. The numbers exist so future changes can be compared.

Commands: cargo run --release -p meshlet-server --example bench -- --db file --secs 10 --sweep 1,16,64,256, then --db memory, then --db file --footprint. Full raw output: R-07 Deployment Acceptance.