pgtune helps expands the database
server to be as powerful as the hardware it's being deployed on , by taking an
existing postgresql.conf file as an input, making changes to it based on the
amount of RAM in your server and suggested workload, and output a new file.
Installation :
# wget
https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/p/pgtune-0.9.3-12.da57e00.el7.noarch.rpm install
Here's a sample usage :
##Backup the postgresql.conf file
-bash-4.1$ cp postgresql.conf postgresql.conf_backup-march
## execute the pgtune with parameters as below
-bash-4.1$ pgtune -i $PGDATA/postgresql.conf -o $PGDATA/postgresql.conf.pgtune
## validate the difference between the files
-bash-4.1$ sdiff postgresql.conf postgresql.conf.pgtune
pgtune --help will give you additional usage information. These are the current parameters passed in above example :
-i : Specifies the current postgresql.conf file. -o : Specifies the file name for the new postgresql.conf file.
-bash-4.1$ pgtune -i $PGDATA/postgresql.conf -c 100
Also, there is an online interface that can be used instead of installing the server tool, so long as you have the hardware specs at hand: http://pgtune.leopard.in.ua/
No comments:
Post a Comment