70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
# Candidate for resource acceptance, not an accepted production sizing claim.
|
|
# Apply after the base compose file that defines postgres/backend/frontend.
|
|
# Never use this alone; portal/proxy/agents and host memory need separate budget.
|
|
# See docs/mcp-2gb-resource-acceptance.md. No image, volume or network changes.
|
|
services:
|
|
postgres:
|
|
mem_limit: 384m
|
|
memswap_limit: 384m
|
|
mem_reservation: 128m
|
|
shm_size: 128m
|
|
command:
|
|
- postgres
|
|
- -c
|
|
- timezone=UTC
|
|
- -c
|
|
- listen_addresses=*
|
|
- -c
|
|
- max_connections=48
|
|
- -c
|
|
- shared_buffers=64MB
|
|
- -c
|
|
- work_mem=2MB
|
|
- -c
|
|
- hash_mem_multiplier=1
|
|
- -c
|
|
- temp_buffers=4MB
|
|
- -c
|
|
- maintenance_work_mem=32MB
|
|
- -c
|
|
- autovacuum_work_mem=32MB
|
|
- -c
|
|
- autovacuum_max_workers=1
|
|
- -c
|
|
- max_parallel_workers_per_gather=0
|
|
- -c
|
|
- max_parallel_maintenance_workers=0
|
|
- -c
|
|
- max_parallel_workers=0
|
|
- -c
|
|
- wal_compression=lz4
|
|
- -c
|
|
- default_toast_compression=lz4
|
|
- -c
|
|
- io_method=worker
|
|
- -c
|
|
- io_workers=1
|
|
- -c
|
|
- effective_io_concurrency=16
|
|
- -c
|
|
- max_wal_size=2GB
|
|
- -c
|
|
- checkpoint_timeout=15min
|
|
- -c
|
|
- checkpoint_completion_target=0.9
|
|
backend:
|
|
mem_limit: 512m
|
|
memswap_limit: 512m
|
|
mem_reservation: 192m
|
|
environment:
|
|
# Heap is only part of process memory; worker heaps share this cgroup cap.
|
|
NODE_OPTIONS: --max-old-space-size=192 --max-semi-space-size=16
|
|
# Explicit opt-in; source/output capacity is smaller than standard.
|
|
MM_FLOW_READ_RESOURCE_PROFILE: constrained
|
|
frontend:
|
|
mem_limit: 160m
|
|
memswap_limit: 160m
|
|
mem_reservation: 48m
|
|
environment:
|
|
NODE_OPTIONS: --max-old-space-size=96
|