Some performance issues (since everybody is testing ... :)

Costin Oproiu <co@deuroconsult.ro>

From: Costin Oproiu <co@deuroconsult.ro>
To: PostgreSQL-development <hackers@postgreSQL.org>
Date: 1998-02-06T10:00:10Z
Lists: pgsql-hackers

Attachments

Hi there,

I am starting with the conclusions to spare time:
 - persistent connections invention stands somewhere between the fire and the
   wheel 
 - unix sockets is not much compared to tcpip (at least on my Linux 2.0.30
   box).
 - parsing and executing a trivial "select 17;" accounts for a lot of time,
   someone wanted hints on what is critical, profiler statistics coroborated.


 Stressing postmaster with 100 connections
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Connection type                       Time (seconds)
 ----------------------------------------------------
 tcpip local                                15
 tcpip local with select                    26
 unix sockets                               15
 unix sockets with select                   26
 tcpip local persistent                      0
 tcpip local persistent with select          2
 unix sockets persistent                     0
 unix sockets persistent with select         2


 Stressing postmaster with 2000 persistent connections
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Connection type                        Time (seconds)
 -----------------------------------------------------
 tcpip local                                 3
 tcpip local with select                    45
 unix sockets                                3
 unix sockets with select                   45



NOTES:
 - tests were (repeatedly!) run via php3 as apache module
 - scrips attached, comments wellcome
 - "with select" below means a pg_Exec("select 17;") 
   inserted between Connect and Close


.co.

Costin Oproiu ---------------- http://www2.deuroconsult.ro/~co
Ciprian Porumbescu 10, ap.13       tel/fax:    +(40)-68-183528
Brasov 2200, ROMANIA                 email: co@deuroconsult.ro
--------------------------------------------------------------