Tune your postgres with ‘Pgtune’

9 Nov

Assume that you have your postgres  running on a box.With the bigger memory and all you don’t find good performance on the server.This happens because you are not utilizing the memory.In which case the default postgres.conf doesn’t enable some of the important tuning parameters by default.once you enable those tuning parameters you may see greater performance of your server.

HOW

 Here comes the question how do i know about my postgres tuning things and how can i get knowledge of each and every parameter.This pgtune will do everything for you. Pgtune takes the wimpy default postgresql.conf and expands the database server to be as powerful as the hardware it’s being deployed on. It works 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.So it is easy to make your postgres perform better,

Run PG Tune

# Get the pgtune here

# pgtune -i /etc/postgresql/9.0/main/postgresql.conf -o psql.conf
This puts the file, psql.conf, with the tuning suggestions in root’s home folder

PG Tune Options

* -i or –input-config : Specifies the current postgresql.conf file.

 * -o or –input-config : Specifies the file name for the new
   postgresql.conf file.

 * -M or –memory: Use this parameter to specify total system memory. If
   not specified, pgtune will attempt to detect memory size.

 * -T or –type : Specifies database type. Valid options are:
   DW, OLTP, Web, Mixed, Desktop

 * -c or –connections: Specifies number of maximum connections expected.
   If not specified, it depends on database type.

 * -D or –debug : Enables debugging mode.

 * -S or –settings: Directory where settings data files are located at.
   Defaults to the directory where the script is being run from.  The
   RPM package includes a patch to use the correct location these
   files were installed into.

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: