Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # DISCLAIMER - Software and the resulting config files are provided "AS IS" - IN NO EVENT SHALL
- # BE THE CREATOR LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
- # DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION.
- # Connectivity
- max_connections = 500
- superuser_reserved_connections = 3
- # Memory Settings
- shared_buffers = '8192 MB'
- work_mem = '64 MB'
- maintenance_work_mem = '420 MB'
- huge_pages = try # NB! requires also activation of huge pages via kernel params, see here for more:
- # https://www.postgresql.org/docs/current/static/kernel-resources.html#LINUX-HUGE-PAGES
- effective_cache_size = '22 GB'
- effective_io_concurrency = 300 # concurrent IO only really activated if OS supports posix_fadvise function
- # Monitoring
- shared_preload_libraries = 'pg_stat_statements' # per statement resource usage stats
- track_io_timing=on # measure exact block IO times
- track_functions=pl # track execution times of pl-language procedures if any
- # Replication
- wal_level = replica # consider using at least 'replica'
- max_wal_senders = 0
- synchronous_commit = off
- wal_keep_segments = 130
- # Checkpointing:
- checkpoint_timeout = '15 min'
- checkpoint_completion_target = 0.9
- max_wal_size = '1024 MB'
- min_wal_size = '512 MB'
- # WAL writing
- wal_compression = on
- wal_buffers = -1 # auto-tuned by Postgres till maximum of segment size (16MB by default)
- # Background writer
- bgwriter_delay = 200ms
- bgwriter_lru_maxpages = 100
- bgwriter_lru_multiplier = 2.0
- bgwriter_flush_after = 0
- # Parallel queries:
- max_worker_processes = 24
- max_parallel_workers_per_gather = 12
- max_parallel_maintenance_workers = 12
- max_parallel_workers = 24
- parallel_leader_participation = on
- # Advanced features
- enable_partitionwise_join = on
- enable_partitionwise_aggregate = on
- # General notes:
- # We recommend not to use read-only replicas for scaling
- # Note that not all settings are automatically tuned.
- # Consider contacting experts at
- # https://www.cybertec-postgresql.com
- # for more professional expertise.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement