Skip to content

Commit 74d2a47

Browse files
committed
Adjust resource limits for lightweight and production services
- Update memory and CPU allocation in `docker-compose.monitoring-rpi.yml` for optimized usage on Raspberry Pi 5. - Revise resource reservations and limits in `docker-compose.prod.yml` for better scalability and performance. - Ensure alignment with updated system requirements and tested configurations.
1 parent a1438df commit 74d2a47

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

docker-compose.monitoring-rpi.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
# - Logs: Promtail scrapes Docker containers → Loki
2727
#
2828
# Resource Limits (optimized for Raspberry Pi 5 - 8GB RAM):
29-
# - Memory: ~2.5GB total (512MB × 5 services)
30-
# - CPU: ~5 cores total (1.0 for main services, 0.5 for Collector/Promtail)
29+
# - Memory: ~3GB total (512MB × 5 main + 256MB × 2 lightweight)
30+
# - CPU: ~4.5 cores total (1.0 for main services, 0.5 for Collector/Promtail/Caddy)
3131
# - Tested on: Raspberry Pi 5 with 8GB RAM
3232
#
3333
# Security:
@@ -158,6 +158,8 @@ services:
158158
- promtail_data:/data/promtail
159159
ports:
160160
- "9080:9080" # Promtail HTTP for healthcheck
161+
mem_limit: 256m
162+
mem_reservation: 128m
161163
cpus: '0.5' # Limit to 0.5 CPU core (lightweight)
162164
networks:
163165
- observability

docker-compose.prod.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ services:
4444
deploy:
4545
resources:
4646
limits:
47+
memory: 2G
48+
cpus: '1.5'
49+
reservations:
4750
memory: 1G
4851
cpus: '0.5'
49-
reservations:
50-
memory: 512M
51-
cpus: '0.25'
5252

5353
worker:
5454
image: ghcr.io/${GITHUB_REPOSITORY}:production
@@ -65,11 +65,11 @@ services:
6565
deploy:
6666
resources:
6767
limits:
68+
memory: 1G
69+
cpus: '1.0'
70+
reservations:
6871
memory: 512M
6972
cpus: '0.25'
70-
reservations:
71-
memory: 256M
72-
cpus: '0.1'
7373

7474
websocket:
7575
image: ghcr.io/${GITHUB_REPOSITORY}:production
@@ -88,9 +88,9 @@ services:
8888
resources:
8989
limits:
9090
memory: 512M
91-
cpus: '0.25'
91+
cpus: '0.5'
9292
reservations:
9393
memory: 256M
94-
cpus: '0.1'
94+
cpus: '0.25'
9595

9696
# 네이티브 PostgreSQL과 Redis 사용으로 볼륨/네트워크 불필요

0 commit comments

Comments
 (0)