Skip to content

Commit

Permalink
Optimize PostgreSQL parameters for SSD storage (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks authored Dec 26, 2023
1 parent 32bbceb commit 8820e7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ postgresql_parameters:
- { option: "wal_buffers", value: "32MB" }
- { option: "default_statistics_target", value: "1000" }
- { option: "seq_page_cost", value: "1" }
- { option: "random_page_cost", value: "4" } # "1.1" for SSD storage. Also, if your databases fits in shared_buffers
- { option: "effective_io_concurrency", value: "2" } # "200" for SSD storage
- { option: "random_page_cost", value: "1.1" } # or "4" for HDDs with slower random access
- { option: "effective_io_concurrency", value: "200" } # or "2" for traditional HDDs with lower I/O parallelism
- { option: "synchronous_commit", value: "on" } # or 'off' if you can you lose single transactions in case of a crash
- { option: "autovacuum", value: "on" } # never turn off the autovacuum!
- { option: "autovacuum_max_workers", value: "5" }
Expand Down

0 comments on commit 8820e7a

Please sign in to comment.