Mention recommended minimum CPU and Memory requirements for self-hosting
Ideally this README: https://github.com/get-convex/convex-backend/tree/main/self-hosted should mention what is the minimum amount of memory and CPU cores/etc. needed to run the default backend configuration.
My current conservative kube limits:
resources:
requests:
memory: "4Gi"
cpu: "500m"
limits:
memory: "6Gi"
cpu: "4000m"
I'm curious to know how much ram does the backend use with low traffic or close to idle
yep - it's a good idea.
There is no one size fits all answer Your mileage may vary, so you can only really get a true answer by trying out your own workload. CPU you can go as low or high as you want depending on your load. Memory has some baseline usage, but increases again with your load.
Here's a screenshot after I do docker compose up and look at my docker dashboard.
if one of you wants to show usage on your project and post in this thread - that'll help future folks with similar questions.
running docker stats on a self hosted instance with like 5-10 tables in it and 5-10 rows total across all tables
❯ docker stats --no-stream
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
6cb4d74f0a87 convex-backend 2.48% 224.5MiB / 22.29GiB 0.98% 0B / 0B 1.43MB / 35.4MB 43
9632dea354bb convex-dashboard 0.00% 52.79MiB / 22.29GiB 0.23% 0B / 0B 1.36MB / 0B 11
docker compose
- 225 MB for backend
- 52 MB for frontend
So I would say 300 MB to get started from fresh
I find it a bit strange that Convex needs 225 MB of memory to run, since its written in Rust and should be very memory efficient. Running Bun (supporting a much more inefficient JS runtime) with websockets and some http routing eats about 100 MB. Very strange seeing Convex use more, or am I the only one?