feat(web-app-peertube): add dynamic performance tuning for heap and transcoding concurrency

- Dynamically calculate PEERTUBE_MAX_OLD_SPACE_SIZE (~35% of container RAM, clamped between 768–3072 MB)
- Dynamically calculate PEERTUBE_TRANSCODING_CONCURRENCY (~½ vCPUs, min 1, max 8)
- Added default resource limits for Redis and Peertube containers
- Updated test suite to include human_to_bytes filter in built-in filter list

https://chatgpt.com/share/690914d2-6100-800f-a850-94e6d226e7c9
This commit is contained in:
2025-11-03 21:47:38 +01:00
parent d3aad632c0
commit 7330aeb8ec
5 changed files with 60 additions and 16 deletions

View File

@@ -12,6 +12,17 @@
- assets:/app/client/dist
- data:/data
- config:/config
environment:
- NODE_OPTIONS=--max-old-space-size={{ PEERTUBE_MAX_OLD_SPACE_SIZE }}
- PEERTUBE_TRANSCODING_CONCURRENCY={{ PEERTUBE_TRANSCODING_CONCURRENCY }}
shm_size: "512m"
tmpfs:
- /tmp:size=1g,exec
ulimits:
nofile:
soft: 131072
hard: 131072
nproc: 8192
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}