Cost Models // SeatExit FinOps
Open WebUI Uvicorn Worker RSS Footprint (1 to 8 Workers)
Each Uvicorn worker process adds ~185 MB base RSS plus ~5 MB per active concurrent user; oversizing workers wastes GBs of RAM.
Measured Unit Economics & Telemetry
Open WebUI runs FastAPI inside Uvicorn. Because Python worker processes do not share memory after fork for loaded HuggingFace tokenizers or SentenceTransformers weights, spawning 8 workers on an 8 GB VPS immediately triggers OOM kills. Sizing 2 workers for 25 seats and 4 workers for 100 seats preserves stability.
| Resource / Billing Line | Audited Value | FinOps Impact |
|---|---|---|
| 1 Uvicorn Worker (5-15 seats) | ~610 MB RSS | Single-process safe; no Redis required |
| 2 Uvicorn Workers (15-50 seats) | ~915 MB RSS | Requires WEBSOCKET_MANAGER=redis |
| 4 Uvicorn Workers (50-100 seats) | ~1,660 MB RSS | Recommended on KVM 4 / KVM 8 |
| 8 Uvicorn Workers (100-250 seats) | ~2,900 MB RSS | Only use with externalized API embeddings |
Implementation & Configuration Checklist
- Match Workers to vCPU Count: Set UVICORN_WORKERS <= vCPU count (2 on KVM 2/4, 4 on KVM 8) when running local embeddings.
- Pair Multi-Worker with Redis: Always enable Redis WebSocket management whenever UVICORN_WORKERS > 1.
- Offload Heavy Embeds if Scaling >4 Workers: Switch RAG_EMBEDDING_ENGINE=openai or TEI container so Uvicorn workers do not duplicate 1.3 GB model weights.
UVICORN_WORKERS=2
WEBSOCKET_MANAGER=redis
WEBSOCKET_REDIS_URL=redis://redis:6379/1
MEM_LIMIT_OPENWEBUI=2400m
Team RAG Infrastructure FAQ
Why does RAM jump sharply when raising UVICORN_WORKERS with local embeddings?
Each forked Python Uvicorn worker loads its own copy of the SentenceTransformers model unless embeddings are externalized.
How many concurrent SSE chat streams can 2 Uvicorn workers serve?
FastAPI async event loops easily sustain 40-80 concurrent token streams across 2 workers.