Cost Models & Formulas
Sizing Redis, Postgres 16 & BullMQ Workers in n8n Queue Mode
Calculate exact container RSS limits for n8n-main, Redis AOF, Postgres 16, and scaled workers on 8 GB KVM 2 vs 16 GB KVM 4 nodes.
KVM 2 Baseline: 1.8 GB Total RSS | 2 Workers @ Concurrency 10
Why Single-Instance n8n Stalls Under Webhook Bursts
In default single-process mode, webhook HTTP responses share the Node.js event loop with heavy JSON loops. Switching EXECUTIONS_MODE=queue isolates webhook ingestion in n8n-main while Redis BullMQ dispatches jobs to dedicated workers.
Container Memory Pinning for Zero OOM Kills
Assign 768 MB to n8n-main, 256 MB to Redis 7 (--maxmemory-policy noeviction), 512 MB to Postgres 16, and 1,024 MB per worker container—leaving 3.5+ GB OS page cache free on KVM 2.
36-Month Cost & Capacity Breakdown
| Container Service | Idle RSS | Peak Burst Limit | VPS Target |
|---|---|---|---|
| n8n-main (UI + Hooks) | 340 MB | 768 MB | KVM 2 / KVM 4 |
| redis:7-alpine | 35 MB | 256 MB | KVM 2 / KVM 4 |
| postgres:16-alpine | 180 MB | 512 MB | KVM 2 / KVM 4 |
| n8n-worker (per replica) | 420 MB | 1,024 - 2,048 MB | 2 on KVM 2 / 4 on KVM 4 |