mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
infra(macmini): bump squeezed container memory limits
Mac Mini was running at 99% memory pressure with 8.6 GB swap active — load was OK but every cold-container request was paying disk-I/O for swapped pages. Container observations: redis 190/192 MB (99 %) — close to OOM, hot keys evicting victoria 227/256 MB (89 %) — constant GC pressure glitchtip 232/256 MB (91 %) umami 223/256 MB (87 %) Each bumped to 384 MB, total +512 MB reservation in the Colima VM. Headroom for that comes from stopping the Pelias stack (~3 GB freed) in the same change-window. Redis additionally gets `--maxmemory 320mb --maxmemory-policy allkeys-lru` so the daemon evicts its own LRU keys at ~80 % of mem_limit instead of letting the kernel OOM-kill the whole container. Safe for our usage — Redis only holds rate-limit counters + sync hot-paths, no critical state. Pelias stays stopped pending a migration to mana-gpu; mana-geocoding will need a Nominatim fallback before the migration so the Places module's address lookup keeps working.
This commit is contained in:
parent
0c30a16eb5
commit
537719032e
1 changed files with 10 additions and 5 deletions
|
|
@ -122,8 +122,13 @@ services:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
container_name: mana-infra-redis
|
container_name: mana-infra-redis
|
||||||
restart: always
|
restart: always
|
||||||
mem_limit: 192m
|
mem_limit: 384m
|
||||||
command: redis-server --requirepass ${REDIS_PASSWORD:-redis123}
|
# maxmemory ~80% of mem_limit so Redis evicts before the kernel OOM-kills.
|
||||||
|
# allkeys-lru drops least-recently-used keys when full — safe for our
|
||||||
|
# cache-style usage (rate-limit counters, sync hot-paths, no critical state).
|
||||||
|
command:
|
||||||
|
redis-server --requirepass ${REDIS_PASSWORD:-redis123} --maxmemory 320mb
|
||||||
|
--maxmemory-policy allkeys-lru
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
ports:
|
ports:
|
||||||
|
|
@ -1284,7 +1289,7 @@ services:
|
||||||
image: ghcr.io/umami-software/umami:postgresql-v2.18.0
|
image: ghcr.io/umami-software/umami:postgresql-v2.18.0
|
||||||
container_name: mana-mon-umami
|
container_name: mana-mon-umami
|
||||||
restart: always
|
restart: always
|
||||||
mem_limit: 256m
|
mem_limit: 384m
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
@ -1310,7 +1315,7 @@ services:
|
||||||
image: victoriametrics/victoria-metrics:v1.99.0
|
image: victoriametrics/victoria-metrics:v1.99.0
|
||||||
container_name: mana-mon-victoria
|
container_name: mana-mon-victoria
|
||||||
restart: always
|
restart: always
|
||||||
mem_limit: 256m
|
mem_limit: 384m
|
||||||
# Mount the host config dir read-only and point promscrape directly at it,
|
# Mount the host config dir read-only and point promscrape directly at it,
|
||||||
# so edits to docker/prometheus/prometheus.yml are picked up by POST /-/reload
|
# so edits to docker/prometheus/prometheus.yml are picked up by POST /-/reload
|
||||||
# without a container restart. The previous setup baked a copy into
|
# without a container restart. The previous setup baked a copy into
|
||||||
|
|
@ -1629,7 +1634,7 @@ services:
|
||||||
image: glitchtip/glitchtip:latest
|
image: glitchtip/glitchtip:latest
|
||||||
container_name: mana-mon-glitchtip
|
container_name: mana-mon-glitchtip
|
||||||
restart: always
|
restart: always
|
||||||
mem_limit: 256m
|
mem_limit: 384m
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-mana123}@postgres:5432/glitchtip
|
DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-mana123}@postgres:5432/glitchtip
|
||||||
REDIS_URL: redis://:${REDIS_PASSWORD:-redis123}@redis:6379/1
|
REDIS_URL: redis://:${REDIS_PASSWORD:-redis123}@redis:6379/1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue