Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # DISCLAIMER - Software and the resulting config files are provided "AS IS" - IN NO EVENT SHALL
  2. # BE THE CREATOR LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  3. # DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION.
  4.  
  5. # Connectivity
  6. max_connections = 500
  7. superuser_reserved_connections = 3
  8.  
  9. # Memory Settings
  10. shared_buffers = '8192 MB'
  11. work_mem = '64 MB'
  12. maintenance_work_mem = '420 MB'
  13. huge_pages = try   # NB! requires also activation of huge pages via kernel params, see here for more:
  14.                    # https://www.postgresql.org/docs/current/static/kernel-resources.html#LINUX-HUGE-PAGES
  15. effective_cache_size = '22 GB'
  16. effective_io_concurrency = 300   # concurrent IO only really activated if OS supports posix_fadvise function
  17.  
  18. # Monitoring
  19. shared_preload_libraries = 'pg_stat_statements'    # per statement resource usage stats
  20. track_io_timing=on        # measure exact block IO times
  21. track_functions=pl        # track execution times of pl-language procedures if any
  22.  
  23. # Replication
  24. wal_level = replica     # consider using at least 'replica'
  25. max_wal_senders = 0
  26. synchronous_commit = off
  27. wal_keep_segments = 130
  28.  
  29. # Checkpointing:
  30. checkpoint_timeout  = '15 min'
  31. checkpoint_completion_target = 0.9
  32. max_wal_size = '1024 MB'
  33. min_wal_size = '512 MB'
  34.  
  35.  
  36. # WAL writing
  37. wal_compression = on
  38. wal_buffers = -1    # auto-tuned by Postgres till maximum of segment size (16MB by default)
  39.  
  40. # Background writer
  41. bgwriter_delay = 200ms
  42. bgwriter_lru_maxpages = 100
  43. bgwriter_lru_multiplier = 2.0
  44. bgwriter_flush_after = 0
  45.  
  46. # Parallel queries:
  47. max_worker_processes = 24
  48. max_parallel_workers_per_gather = 12
  49. max_parallel_maintenance_workers = 12
  50. max_parallel_workers = 24
  51. parallel_leader_participation = on
  52.  
  53. # Advanced features
  54.  
  55. enable_partitionwise_join = on
  56. enable_partitionwise_aggregate = on
  57.  
  58. # General notes:
  59. # We recommend not to use read-only replicas for scaling
  60. # Note that not all settings are automatically tuned.
  61. #   Consider contacting experts at
  62. #   https://www.cybertec-postgresql.com
  63. #   for more professional expertise.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement