Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 1226F2E003B for ; Mon, 24 Mar 2008 07:53:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 34905-01 for ; Mon, 24 Mar 2008 07:53:13 -0300 (ADT) Received: from mx2.hub.org (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 4AD292E0037 for ; Mon, 24 Mar 2008 07:53:19 -0300 (ADT) X-Greylist: delayed 00:05:01.663594 by SQLgrey-1.7.5 Received: from pat.uio.no (pat.uio.no [129.240.10.15]) by mx2.hub.org (Postfix) with ESMTP id 0C94712A656D for ; Mon, 24 Mar 2008 07:53:19 -0300 (ADT) Received: from mail-mx2.uio.no ([129.240.10.30]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1JdkDv-0004lL-LX; Mon, 24 Mar 2008 11:48:15 +0100 Received: from smtp.uio.no ([129.240.10.9] helo=mail-mx2.uio.no) by mail-mx2.uio.no with esmtp (Exim 4.69) (envelope-from ) id 1JdkDu-0008Iq-UR; Mon, 24 Mar 2008 11:48:15 +0100 Received: from cd5bebf51.dhcp.bluecom.no ([81.191.190.213] helo=[192.168.1.105]) by mail-mx2.uio.no with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1JdkDu-0008Il-R8; Mon, 24 Mar 2008 11:48:14 +0100 Message-ID: <47E786F4.9040804@usit.uio.no> Date: Mon, 24 Mar 2008 11:48:20 +0100 From: Tommy Gildseth User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: firerox@centrum.cz CC: pgsql-performance@postgresql.org Subject: Re: slow pg_connect() References: <200803240840.8128@centrum.cz> In-Reply-To: <200803240840.8128@centrum.cz> Content-Type: text/plain; charset=windows-1250; format=flowed Content-Transfer-Encoding: 7bit X-UiO-Resend: resent X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, none) X-UiO-Scanned: 689458D2FF53E149266890C9E30866161BA702F8 X-UiO-SR-test: BC3E73A8E0DF41A716EE30B2876DB264B8951C1D X-UiO-SPAM-Test: remote_host: 129.240.10.9 spam_score: 0 maxlevel 200 minaction 2 bait 0 mail/h: 354 total 7487636 max/h 8345 blacklist 0 greylist 0 ratelimit 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL=0.001 X-Spam-Level: X-Archive-Number: 200803/442 X-Sequence-Number: 29396 firerox@centrum.cz wrote: > Hi, > > I'm uning postgres 8.1 at P4 2.8GHz with 2GB RAM. > (web server + database on the same server) > > Please, how long takes your connectiong to postgres? > > It takes more then 0.05s :( > > Only this function reduce server speed max to 20request per second. I tried running the script a few times, and got substantially lower start up times than you are getting. I'm using 8.1.11 on Debian on a 2x Xeon CPU 2.40GHz with 3GB memory, so I don't think that would account for the difference. Generated in 0.0046 s Generated in 0.0036 s Generated in 0.0038 s Generated in 0.0037 s Generated in 0.0038 s Generated in 0.0037 s Generated in 0.0047 s Generated in 0.0052 s Generated in 0.005 s -- Tommy Gildseth