pg tuning: SSD planner-cost defaults in docker-compose#200
Merged
NewGraphEnvironment merged 6 commits intomainfrom May 5, 2026
Merged
pg tuning: SSD planner-cost defaults in docker-compose#200NewGraphEnvironment merged 6 commits intomainfrom
NewGraphEnvironment merged 6 commits intomainfrom
Conversation
Adds random_page_cost=1.1, effective_io_concurrency=200, and temp_buffers=64MB so postgres stops planning for spinning rust on the local Docker fwapg instance. All NewGraph hosts run on SSD. With random_page_cost=4 (the default) the planner systematically biases away from index scans for segment-keyed lookups in link's pipeline; 1.1 lets bitmap-index scans win on the hot path. Verified live: SHOW returns 1.1 / 200 / 64MB after restart. Relates to #199
Adds three rows to the Settings rationale table for the new random_page_cost / effective_io_concurrency / temp_buffers values, plus an SSD assumption section explaining why the PostgreSQL defaults are wrong for any modern host. Calls out that the M1/cypher docker-compose override file (tracked separately in rtj) needs the same flags. Compose merges override command lists by replacing the base, not appending, so the override hosts otherwise stay on PostgreSQL defaults. Relates to #199
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
random_page_cost=1.1,effective_io_concurrency=200,temp_buffers=64MBto the local Docker fwapgdb.commandblock. Default PostgreSQL values (4.0 / 1 / 8MB) are calibrated for spinning rust and bias the planner away from index scans on segment-keyed lookups.docker/tuning.mdwith per-setting rationale, plus an "SSD assumption" note flagging that the M1/cypher docker-compose override file (in rtj) needs the same flags — compose replaces the overridecommand:list, not appends.Test plan
SHOW random_page_cost; SHOW effective_io_concurrency; SHOW temp_buffers;returns1.1/200/64MB.data-raw/logs/<TS>_per_wsg_times.csvagainst the 2026-05-04 baseline (data-raw/logs/provincial_default_extrabreaks/<TS>_per_wsg_times.csv). Acceptance: ≥ 10 % median per-WSG wall reduction at unchanged segment count.Closes #199