Re: PostgreSQL 9.0 x64 bit pgbench TPC very low question?

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: tuanhoanganh <hatuan05(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL 9.0 x64 bit pgbench TPC very low question?
Date: 2010-12-18 19:48:07
Message-ID: AANLkTi=Mv2yNyKWvpdFwUTStH+znP1MNGhyLZ5byRqZH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sat, Dec 18, 2010 at 11:13 AM, tuanhoanganh <hatuan05(at)gmail(dot)com> wrote:
> My app has ~ 20 exe file, each of exe create new connect to postgesql

But how often do they do that? Does each exe make a new connection,
do one transaction, and then exit? Or does each exe make one
connection, do one transaction, then close the connection and make a
new one? Or does each exe make one connection, then stick around for
a while using that connection over and over again?

In the first two cases, indeed -C is the correct way to benchmark it,
but in the third case it is not.

> and
> there are 10-30 user use my application so I need -C to check PostgreSQL
> performance.
>
> I will test without -C option. But is there any way to decrease connect time
> when there are 200 process, each of process will create new connect to
> postgresql.

I think the easiest way to decrease the connect time by a lot would be
use a connection pooler.

The critical question is how often does each process create a new
connection. 200 processes which make one connection each and keep
them open for 10 minutes is quite different from 200 processes which
make and break connections as fast as they can.

Cheers,

Jeff

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ivan Voras 2010-12-18 22:27:07 Re: PostgreSQL 9.0 x64 bit pgbench TPC very low question?
Previous Message tuanhoanganh 2010-12-18 19:42:16 Re: PostgreSQL 9.0 x64 bit pgbench TPC very low question?