retrace: tune up PostgreSQL
This commit is contained in:
parent
73a906b5ef
commit
4ca6ef94df
2 changed files with 67 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
- name: restart httpd
|
||||
service: name=httpd state=restarted
|
||||
|
||||
- name: restart postgresql
|
||||
service: name=postgresql
|
||||
state=restarted
|
||||
|
|
|
@ -1,4 +1,67 @@
|
|||
---
|
||||
- name: set max_connections for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^max_connections ='
|
||||
line: 'max_connections = 150'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: set shared_buffers for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^shared_buffers ='
|
||||
line: 'shared_buffers = 33536MB'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: set effective_cache_size for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^effective_cache_size ='
|
||||
line: 'effective_cache_size = 100608MB'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: set work_mem for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^work_mem ='
|
||||
line: 'work_mem = 114MB'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: set maintenance_work_mem for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^maintenance_work_mem ='
|
||||
line: 'maintenance_work_mem = 2GB'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: set checkpoint_segments for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^checkpoint_segments ='
|
||||
line: 'checkpoint_segments = 32'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: set checkpoint_completion_target for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^checkpoint_completion_target ='
|
||||
line: 'checkpoint_completion_target = 0.9'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: set wal_buffers for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^wal_buffers ='
|
||||
line: 'wal_buffers = 16MB'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: set default_statistics_target for PostgreSQL
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: '^default_statistics_target ='
|
||||
line: 'default_statistics_target = 100'
|
||||
notify: restart postgresql
|
||||
|
||||
- name: drop faf database
|
||||
postgresql_db: name=faf
|
||||
owner=postgres
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue