How much server embedded Sovrant.Web needs, measured with tools/Sovrant.LoadTest (Phase 145 Part E). Web in front of Sovrant.Server is sized separately (Phase 146).
Machine: a laptop — Intel Core i5-10210U (4 cores / 8 threads), 16 GB RAM, Windows 11. Each simulated person signs in through the real form, keeps a real Blazor Server connection open and changes page every 15–20 seconds. No chat replies — model calls run at the provider, not on this server.
| People connected | .NET heap limit | Errors | Page change p95 | Connect p95 | Sign-in p50 / p95 | Memory once settled* |
|---|---|---|---|---|---|---|
| 300 | 1 GB | 0 | 34 ms | 905 ms | 1.4 s / 2.3 s | 534 MB |
| 1,000 | 2 GB | 0 | 33 ms | 916 ms | 2.4 s / 3.4 s | 668 MB |
* Private memory of the whole Web process after a full garbage collection, with everyone still connected. The 1,000-person run made 8,506 page changes in 3 minutes with none failing; 1,000 people signed in within under 3 minutes.
About 0.5–1 MB per connected person, plus roughly 110 MB for the server itself. A heap snapshot of 50 connected people held 31 MB of live .NET objects in total.
| Team size | CPU | Memory for Sovrant.Web | Notes |
|---|---|---|---|
| Up to 100 | 2 cores | 1 GB | |
| Up to 300 | 2–4 cores | 1.5 GB | Measured above with a 1 GB heap limit |
| Up to 1,000 | 4 cores | 2.5–3 GB | Measured above with a 2 GB heap limit |
| More than 1,000 | — | — | Several Web servers behind a load balancer needs Postgres and shared keys (Phase 134 Part B) — not supported yet |
These leave headroom for chats (conversation history, document generation) and background work, which the load test doesn't exercise.
Always set a memory limit. Without one, .NET keeps memory it has used and freed in reserve (each sign-in briefly needs 64 MB to check the password), so on a machine with spare RAM the process can grow to several GB that it doesn't need. With a limit it stays inside it:
- Docker / Kubernetes: a container memory limit (
--memory 2g,resources.limits.memory) — .NET follows it automatically. - Otherwise:
DOTNET_GCHeapHardLimit(bytes, hex), e.g.DOTNET_GCHeapHardLimit=0x80000000for 2 GB.
- Signing in. Passwords are checked with Argon2id (64 MB and three passes each — deliberately slow, so stolen password hashes are hard to crack). At most one check per CPU core (up to 8) runs at once and the rest queue, so a whole team arriving at once waits a couple of seconds rather than overloading the server. More cores = faster sign-in rushes. "Keep me signed in" (14 days by default; admins can change or turn it off) means most people don't sign in every day.
- Not memory or page changes: page changes stayed under 35 ms (p95) at 1,000 people.
- Chat replies are generated by your model provider; their speed depends on the provider and your plan's rate limits, not on this server.
dotnet build src/Sovrant.Web -c Release
dotnet run -c Release --project tools/Sovrant.LoadTest -- --users 300 --heap-limit-mb 1024Run it on hardware like your server's. Options and how to read the report: tools/Sovrant.LoadTest/README.md.