Postgres memory for the freed RAM: shared_buffers 8GB, effective_cache_size 32GB, random_page_cost 1.1, work_mem 16MB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aa3bd82445
commit
c9a9c0155e
1 file changed
+14
-2
+14
-2
@@ -46,19 +46,31 @@ services:
|
||||
# waited on it (WALWrite, 56–70 ms a write with the HDD 100% busy; LOG.md 2026-10-13 (43)).
|
||||
- ${PG_WAL_DIR:-/var/lib/usenet-rebuild-wal}:/var/lib/postgresql/wal
|
||||
# synchronous_commit = off is set with ALTER SYSTEM (postgresql.auto.conf in the data dir).
|
||||
# Memory for 62 GiB of RAM shared with other services (LOG.md 2026-10-16 (69)): the catalog's hot part in
|
||||
# shared_buffers, the planner told the OS caches the rest; random_page_cost for the NVMe (the HDD tablespace
|
||||
# pg_default keeps 4: ALTER TABLESPACE … SET (random_page_cost = 4)).
|
||||
command:
|
||||
- postgres
|
||||
- -c
|
||||
- shared_preload_libraries=pg_stat_statements
|
||||
- -c
|
||||
- shared_buffers=${PG_SHARED_BUFFERS:-2GB}
|
||||
- shared_buffers=${PG_SHARED_BUFFERS:-8GB}
|
||||
- -c
|
||||
- effective_cache_size=${PG_EFFECTIVE_CACHE_SIZE:-32GB}
|
||||
- -c
|
||||
- random_page_cost=1.1
|
||||
- -c
|
||||
- work_mem=16MB
|
||||
- -c
|
||||
- maintenance_work_mem=1GB
|
||||
- -c
|
||||
- max_wal_size=8GB
|
||||
- -c
|
||||
- checkpoint_timeout=15min
|
||||
- -c
|
||||
- wal_buffers=64MB
|
||||
shm_size: 1g
|
||||
# Parallel hash joins' shared memory: 1g failed with "could not resize shared memory segment" (LOG.md 2026-10-16 (61)).
|
||||
shm_size: 2g
|
||||
stop_grace_period: 120s
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"']
|
||||
|
||||
Reference in new issue
Block a user