Re: Same query doing slow then quick

From: Nikolay Ulyanitsky <lystor(at)gmail(dot)com>
To: FFW_Rude <FFW_Rude(at)hotmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Same query doing slow then quick
Date: 2012-09-26 15:33:29
Message-ID: CA+MedixJ3jH2q3HBRqDj54SJRq-hi_ktBofUvSspYqdyzuf41w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi, FFW_Rude

1. Benchmark the device with your PostgreSQL DB:

# hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 6604 MB in 2.00 seconds = 3303.03 MB/sec
Timing buffered disk reads: 1316 MB in 3.00 seconds = 438.18 MB/sec

2. Benchmark your PostgreSQL with pgbench:

Set "fsync = off" on /var/lib/pgsql/data/postgresql.conf
# /etc/init.d/postgresql restart

# su - postgres
$ psql
# create database pgbench;
# \q
# pgbench -i pgbench && pgbench -c 10 -t 10000 pgbench
tps = 5670.635648 (including connections establishing)
tps = 5673.630345 (excluding connections establishing)[/code]

Set "fsync = on" on /var/lib/pgsql/data/postgresql.conf
# /etc/init.d/postgresql restart

--
With best regards,
Nikolay

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message FFW_Rude 2012-09-26 15:38:58 Re: Same query doing slow then quick
Previous Message FFW_Rude 2012-09-26 15:18:08 Re: Same query doing slow then quick