From: Shaun Thomas <sthomas@optionshouse.com>
To: Dave Johansen <davejohansen@gmail.com>
To: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Unexpected pgbench result
Date: Thu, 19 Dec 2013 11:44:09 -0600
Message-ID: <52B33069.1060203@optionshouse.com> (raw)
In-Reply-To: <CAAcYxUe11Qdx7h3RaRjuGGvp3oO7Wi-QNYrN=9TXBSv+P2u0hg@mail.gmail.com>
References: <CAAcYxUe11Qdx7h3RaRjuGGvp3oO7Wi-QNYrN=9TXBSv+P2u0hg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 12/19/2013 11:00 AM, Dave Johansen wrote:
> When I run pgbench in "SELECT only" after doing "-i -s 2000" I get what
> appears to be good performance (60k-70k tps) but if I initialize a new
> database with "-i -s 4000" the tps drops to 4k-7k. Is this order of
> magnitude drop expected? Or is there something wrong with my hardware or
> database configuration that is causing this issue?
When you increase the size of the initialized pgbench tables, you
increase the size on disk. My guess is that you doubled it so that the
data no longer fits in memory. You can verify this yourself:
SELECT pg_size_pretty(sum(pg_database_size(oid))::bigint)
from pg_database;
Any amount of memory you have that is smaller than that, will affect
select performance. I can guarantee you will not get 60k-70k tps from
anything short of an array of SSD devices or a PCIe NVRAM solution. Your
'-s 2000' test was probably running mostly from memory, while the '-s
4000' did not.
What you're seeing is the speed your records are being supplied from
disk, plus whatever cache effects are there when records are read before
they are flushed in favor of more recent data.
--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-676-8870
sthomas@optionshouse.com
______________________________________________
See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sthomas@optionshouse.com, davejohansen@gmail.com
Subject: Re: Unexpected pgbench result
In-Reply-To: <52B33069.1060203@optionshouse.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox