I load-tested self-hosted n8n on a $0 VM for 5 hours. The worst latency came from apt.
说明与用途
测试表明,小型虚拟机可以持续处理 webhook,而长时间的包更新可能导致 I/O 等待引起的延迟峰值。
问题
Determining if a low‑cost, low‑resource self‑hosted n8n instance can sustain continuous webhook traffic without dropping events or experiencing unacceptable latency.
结果
The 0‑cost VM handled 2 880 events with zero loss, and sustained load actually improved tail latency. A 56 s latency spike was traced to a long apt‑news update that increased iowait, demonstrating that package‑update timers can dominate performance on small VMs.
工作流
- 1. Deploy n8n on a Google Cloud e2‑micro VM. 2. Configure a benchmark harness to send one webhook every 5 seconds. 3. Run the test for 4 h 42 m, collecting telemetry every 15 min. 4. Record event outcomes (accepted, refused, lost) and latency statistics. 5. Analyze system metrics (CPU, memory, iowait, load average) during the run. 6. Identify the 56 s latency spike and correlate it with system logs (apt‑news, packagekit).
- 7. Verify no container restarts or OOM events occurred. 8. Summarize results and derive recommendations for small‑VM deployments.
证据
Zero lost in five hours. No memory leak, no progressive slowdown, no queue backing up.
The machine's own package-metadata refresh, running for 45 minutes.
I/O wait went from 2.7% to 34.2% for three quarters of an hour on a shared-core VM with a slow persistent disk.
- 记录日期: 2026-09-12T20:30:48.644Z