From: Tom Lane <tgl@sss.pgh.pa.us>
To: Anjan Dave <adave@vantage.com>
Cc: Vivek Khera <vivek@khera.org>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: High context switches occurring
Date: Tue, 06 Dec 2005 18:45:03 -0500
Message-ID: <22673.1133912703@sss.pgh.pa.us> (raw)
In-Reply-To: <4BAFBB6B9CC46F41B2AD7D9F4BBAF785098EC2@vt-pe2550-001.vantage.vantage.com>
References: <4BAFBB6B9CC46F41B2AD7D9F4BBAF785098EC2@vt-pe2550-001.vantage.vantage.com>
"Anjan Dave" <adave@vantage.com> writes:
> -bash-3.00$ time pgbench -c 1000 -t 30 pgbench
> starting vacuum...end.
> transaction type: TPC-B (sort of)
> scaling factor: 1
> number of clients: 1000
> number of transactions per client: 30
> number of transactions actually processed: 30000/30000
> tps = 45.871234 (including connections establishing)
> tps = 46.092629 (excluding connections establishing)
I can hardly think of a worse way to run pgbench :-(. These numbers are
about meaningless, for two reasons:
1. You don't want number of clients (-c) much higher than scaling factor
(-s in the initialization step). The number of rows in the "branches"
table will equal -s, and since every transaction updates one
randomly-chosen "branches" row, you will be measuring mostly row-update
contention overhead if there's more concurrent transactions than there
are rows. In the case -s 1, which is what you've got here, there is no
actual concurrency at all --- all the transactions stack up on the
single branches row.
2. Running a small number of transactions per client means that
startup/shutdown transients overwhelm the steady-state data. You should
probably run at least a thousand transactions per client if you want
repeatable numbers.
Try something like "-s 10 -c 10 -t 3000" to get numbers reflecting test
conditions more like what the TPC council had in mind when they designed
this benchmark. I tend to repeat such a test 3 times to see if the
numbers are repeatable, and quote the middle TPS number as long as
they're not too far apart.
regards, tom lane
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: tgl@sss.pgh.pa.us, adave@vantage.com, vivek@khera.org
Subject: Re: High context switches occurring
In-Reply-To: <22673.1133912703@sss.pgh.pa.us>
* 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