Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

推荐优化工具(在线)

PGTune

  • 作用: 一个在线网站,输入机器配置,即可生成基本的“建议配置参数”

  • 访问网址: PGTune - calculate configuration for PostgreSQL based on the maximum performance for a given hardware configuration

  • 填写参数

    • 数据库版本
    • 操作系统类型
    • 数据库用途
    • 总内存大小
    • CPU数量(可选)
    • 连接数(可选)
  • 点击生成后

    • 右侧出现一些建议的参数配置,可以选择性使用
    • 有两个tab可选
      • postgresql.conf 可以直接复制到配置中,重启
        • 比如: shared_buffers = 16GB
      • ALTER SYSTEM 可以在服务器内直接更改,重启
        • 比如: ALTER SYSTEM SET shared_buffers = '16GB';

postgresqltuner(更专业)