diff --git a/Dockerfile b/Dockerfile index 08d89026..ccb23460 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,9 @@ RUN --mount=type=cache,target=/root/.cache/pip \ FROM base +# 4 gunicorn workers of 4 threads (about 140 MB each); docker-compose.override.yml can set another number +ENV GUNICORN_CMD_ARGS="--workers 4" + COPY --from=build /srv/webvirtcloud/venv venv COPY . . diff --git a/README.md b/README.md index 253a3314..1f2ff403 100644 --- a/README.md +++ b/README.md @@ -369,7 +369,7 @@ services: The container makes the file the panel user's (uid 33) with mode 600; edit it as root. -gunicorn runs at most 8 workers (fewer on hosts with under 4 CPUs) of 4 threads each; to change it, set `GUNICORN_CMD_ARGS=--workers N` in a drop-in of `webvirt-cloud` (`systemctl edit webvirt-cloud`: `[Service]` and `Environment="GUNICORN_CMD_ARGS=--workers N"`) or in `docker-compose.override.yml`. +gunicorn runs at most 8 workers (fewer on hosts with under 4 CPUs), in Docker 4, of 4 threads each; each worker takes about 140 MB and sends at most 2 requests at a time to one compute. To change it, set `GUNICORN_CMD_ARGS=--workers N` in a drop-in of `webvirt-cloud` (`systemctl edit webvirt-cloud`: `[Service]` and `Environment="GUNICORN_CMD_ARGS=--workers N"`) or in `docker-compose.override.yml`. ### HTTPS and reverse proxy