Re: PostgreSQL pre-fork speedup - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: PostgreSQL pre-fork speedup
Date
Msg-id 20040513.220041.74751033.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: PostgreSQL pre-fork speedup  (sdv mailer <sdvmailer@yahoo.com>)
List pgsql-hackers
> I ran the new Pgpool-1.2.2 and it was a bit faster on
> the TCP but still slower than on UNIX socket. I used
> the same script as before.
> 
> TCP Socket (Pgpool 1.2.0)
> ----------
> 2.39 sec
> 
> TCP Socket (Pgpool 1.2.2)
> ----------
> 0.80 sec
> 0.80 sec
> 0.79 sec
> 
> UNIX Socket (Pgpool 1.2.2)
> -----------
> 0.026 sec
> 0.027 sec
> 0.027 sec
> 
> Direct TCP connection (no pgpool)
> ---------------------------------
> 0.16 sec
> 0.15 sec
> 0.16 sec
> 
> 
> PgPool on TCP is still slower than direct connection
> but much faster than v1.2. Any other areas that can be
> improved?

This is strange. Using pgbench(pgbench -S -C -t 1000 -h localhost),
TCP socket with pgpool 1.2.2 runs about x2 faster than direct
connection.

Direct connection: 60TPS
With pgpool:       122TPS

Here is the set up:

Direct connection: pgbench <--TCP-->PG
With pgpool:       pgbench <--TCP-->pgpool<--UNIX-->PG

Note: I use PostgreSQL 7.4.2. This means that pgpool forces pgbench to
fallback to V2 protocol (remember that pgpool does not support V3
yet), and the start up packet flys on the wire twice at the each
connection statge. This actually makes the benchmark worse, still
pgpool is better than direct connection however.
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Chris Bowlby
Date:
Subject: dead index nodes...
Next
From: Tom Lane
Date:
Subject: Re: Probably security hole in postgresql-7.4.1