[Pgpool-general] Pgpool almost 20 times slower than normal postgres

Steven Crandell steven.crandell at gmail.com
Fri Feb 19 18:28:17 UTC 2010


Sorry no one got back to you on this.
Here are my thoughts on the matter.

If your test suite consists of running one simple query against pgpool vs.
running the query directly against the pg host, then yes, pgpool will always
lose that race since pgpool is not intended to act as a speed up in a
situation like that.  A more relevant test suite would include a several
thousand (ideally different) queries sent at high speed.

As it relates to getting that single query speed closer to native postgres
speeds, I would recommend you ensure that you have max_pool set to something
>= the number of backend nodes so that pgpool doesn't have to setup a new
connection every time you query it.  In conjunction with that, make sure you
have good settings for connection_life_time and child_life_time so that your
cached connections are effectively reused.  Also confirm that your
backend_weight* parameters are load balancing queries to your various hosts
properly.  (e.g. make sure you don't have one backend host fielding 100% of
inbound queries).

All of these parameters are explained in detail here.
http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html


On Fri, Feb 19, 2010 at 8:34 AM, Fernando Morgenstern <
fernando at consultorpc.com> wrote:

> Hello,
>
> I sent this email almost one month ago but didn't got any answer. I am
> still having this problem and can't find how to solve it.
>
> Is there any additional info that i can provide?
>
> Also, could you kindly share your experience with pgpool in this situation?
> ( eg.: this is normal to happen or i solved this problem by changing X )
>
> Thanks!
>
>
> Em 28/01/2010, às 08:59, Fernando Morgenstern escreveu:
>
> > Hello,
> >
> > We have been trying to identify what is causing our db cluster to be so
> slow but, as this is the first one that i am working, i am not sure if what
> i am getting is normal or not.
> >
> > Basically we have a JSP script that connects to database and run a simple
> query on a table that currently have 23 rows:
> >
> > select id,name from mytable;
> >
> > This script returns the query time. So, when we run agains postgres
> directly, we get about 2 miliseconds.
> >
> > But when we run against pgpool ( with 1-4 nodes, tried with all node
> count ), we get 40-42 miliseconds.
> >
> >
> > What i would like to ask is it this is the normal behavior or could be
> something wrong with my setup?
> >
> > Is there anything that i can do to speed up it?
> >
> > Pgpool version is 2.3.1.
> >
> > Best Regards,
> > ---
> >
> > Fernando Marcelo
> > www.consultorpc.com
> > fernando at consultorpc.com
> > _______________________________________________
> > Pgpool-general mailing list
> > Pgpool-general at pgfoundry.org
> > http://pgfoundry.org/mailman/listinfo/pgpool-general
>
> _______________________________________________
> Pgpool-general mailing list
> Pgpool-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgpool-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20100219/d4af2d5a/attachment.html>


More information about the Pgpool-general mailing list