pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgbench -T isn't a hard cutoff.
4+ messages / 4 participants
[nested] [flat]

* pgbench -T isn't a hard cutoff.
@ 2011-08-27 03:13  mark <dvlhntr@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: mark @ 2011-08-27 03:13 UTC (permalink / raw)
  To: pgsql-bugs

Using the -T flag in pgbench I noticed that -T is a just a effort rather
than a hard cut off. 

With a (misbehaving) pooler and a "large" number of clients+jobs it's
possible to have the pgbench run extend by several seconds or even minutes
past the allotted time by -T. (or hang indefinitely if the transactions
never complete due to pooler issues.) 

Expected behavior would be -T would mean a hard cut off. 


Thoughts ?

-Mark




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgbench -T isn't a hard cutoff.
@ 2011-08-27 04:56  Tom Lane <tgl@sss.pgh.pa.us>
  parent: mark <dvlhntr@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2011-08-27 04:56 UTC (permalink / raw)
  To: mark <dvlhntr@gmail.com>; +Cc: pgsql-bugs

"mark" <dvlhntr@gmail.com> writes:
> Expected behavior would be -T would mean a hard cut off. 

Why would you expect that?

What I'd expect is that each transaction would be run to completion,
which would mean that -T cannot possibly be exact.  Even if it were,
what's your notion of "exact"?  Clock resolutions are different on
different platforms.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgbench -T isn't a hard cutoff.
@ 2011-08-29 03:22  Greg Smith <greg@2ndQuadrant.com>
  parent: mark <dvlhntr@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Greg Smith @ 2011-08-29 03:22 UTC (permalink / raw)
  To: pgsql-bugs

On 08/26/2011 11:13 PM, mark wrote:
> Using the -T flag in pgbench I noticed that -T is a just a effort rather
> than a hard cut off.
> ...
> Expected behavior would be -T would mean a hard cut off.
>    

If there's a hard cut-off, that means that partially completed 
transactions are not included in the total.  That produces less correct 
results than the current scheme.

With the current behavior, worrying about partial amounts being ignored 
isn't a problem.  But there is the potential problem you report, which 
is mainly a risk when pgbench is combined with a badly setup environment.

It's hard to justify making a change that will produce less accurate 
results in the vast majority of cases, just to improve behavior in a 
situation where useless results are coming out no matter what.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgbench -T isn't a hard cutoff.
@ 2011-08-29 03:34  Itagaki Takahiro <itagaki.takahiro@gmail.com>
  parent: Greg Smith <greg@2ndQuadrant.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Itagaki Takahiro @ 2011-08-29 03:34 UTC (permalink / raw)
  To: Greg Smith <greg@2ndquadrant.com>; +Cc: pgsql-bugs

On Mon, Aug 29, 2011 at 12:22, Greg Smith <greg@2ndquadrant.com> wrote:
> It's hard to justify making a change that will produce less accurate results
> in the vast majority of cases, just to improve behavior in a situation where
> useless results are coming out no matter what.

When I added -T option, I only expected standard pgbench transactions.
Since they are short enough, the difference should not be large.

If you have a plan to execute custom queries that take 1 second
or more, a hard cut-off makes senses.

-- 
Itagaki Takahiro



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2011-08-29 03:34 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-08-27 03:13 pgbench -T isn't a hard cutoff. mark <dvlhntr@gmail.com>
2011-08-27 04:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-08-29 03:22 ` Greg Smith <greg@2ndQuadrant.com>
2011-08-29 03:34   ` Itagaki Takahiro <itagaki.takahiro@gmail.com>

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