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)).
|
# 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
|
- ${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).
|
# 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:
|
command:
|
||||||
- postgres
|
- postgres
|
||||||
- -c
|
- -c
|
||||||
- shared_preload_libraries=pg_stat_statements
|
- shared_preload_libraries=pg_stat_statements
|
||||||
- -c
|
- -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
|
- -c
|
||||||
- max_wal_size=8GB
|
- max_wal_size=8GB
|
||||||
- -c
|
- -c
|
||||||
- checkpoint_timeout=15min
|
- checkpoint_timeout=15min
|
||||||
- -c
|
- -c
|
||||||
- wal_buffers=64MB
|
- 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
|
stop_grace_period: 120s
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"']
|
test: ['CMD-SHELL', 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"']
|
||||||
|
|||||||
Reference in new issue
Block a user