Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 958A86328AF for ; Sun, 1 Mar 2009 14:52:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77544-04 for ; Sun, 1 Mar 2009 14:52:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from linos.es (centrodatos.linos.es [86.109.105.97]) by mail.postgresql.org (Postfix) with ESMTP id 24C5F632677 for ; Sun, 1 Mar 2009 14:52:26 -0400 (AST) Received: (qmail 3183 invoked from network); 1 Mar 2009 19:32:26 +0100 Received: from 230.87.220.87.dynamic.jazztel.es (HELO ?192.168.1.4?) (info@linos.es@87.220.87.230) by linos.es with SMTP; 1 Mar 2009 19:32:26 +0100 Message-ID: <49AAD965.8020404@linos.es> Date: Sun, 01 Mar 2009 19:52:21 +0100 From: Linos User-Agent: Thunderbird 2.0.0.19 (X11/20090213) MIME-Version: 1.0 To: Magnus Hagander CC: Tom Lane , "Ross J. Reedstrom" , pgsql-performance@postgresql.org Subject: Re: TCP network cost References: <1ca1c1410902171013q478f2620n13fcd68cb8b3d911@mail.gmail.com> <20090217070403.GB2486@cooker> <3FAF940B-9B0B-4DBA-8728-6096022129DF@infogears.com> <20090217070403.GB2486@cooker> <3FAF940B-9B0B-4DBA-8728-6096022129DF@infogears.com> <20090217200416.GA23707@cooker> <87hc2r272g.fsf@oxford.xeocode.com> <20090223194212.GA14802@cooker> <27042.1235423820@sss.pgh.pa.us> <20090224170201.GA25420@cooker> <49AAC6AC.60309@linos.es> <13121.1235929398@sss.pgh.pa.us> <49AACC6F.7080809@linos.es> <13505.1235931000@sss.pgh.pa.us> <49AAD1CF.6000908@linos.es> <13742.1235932104@sss.pgh.pa.us> <49AAD68A.2090308@hagander.net> In-Reply-To: <49AAD68A.2090308@hagander.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/9 X-Sequence-Number: 32931 Magnus Hagander escribió: > Tom Lane wrote: >> Linos writes: >>> Tom Lane escribió: >>>> That's just weird --- ssl off should be ssl off no matter which knob you >>>> use to turn it off. Are you sure it's really off in the slow connections? >>> Maybe i am missing something, i use the same command to connect to it >>> from localhost "psql -d database -h localhost" and in the pcap files i >>> have captured the protocol it is clear (with "ssl = false" or "ssl = >>> true" either), but in the debian machine with "ssl = true" in >>> postgresql.conf you can see in the pcap file big time jumps between >>> data packets, psql commandline enables automatically ssl if the server >>> supports it? >> Yeah, the default behavior is to do SSL if supported; see PGSSLMODE. >> Non-TCP connections never do SSL, though. One possibility to check >> is that one of the two distros has altered the default value of >> PGSSLMODE. > > IIRC, debian ships with a default certificate for the postgres > installation, so it can actually *use* SSL by default. I don't know if > other distros do that - I think most require you to actually create a > certificate yourself. > > //Magnus Yeah i have tested with PGSSLMODE environment and it makes the difference when it is activated, debian ships with a cert that makes it enabled by default but Arch Linux no, i get with wireshark in the data packets from postgresql "unreassembled packet" so i thought that was the same but obviously one it is using ssl and the other not, and before now i have not noticed but psql gives me the hint that it is connect by ssl with the line "conexión SSL (cifrado: DHE-RSA-AES256-SHA, bits: 256)" after connect, i did not know that ssl activated would have this speed penalty, goes from 110 ms to 4200ms, Thanks Tom and Magnus for the help. Regards, Miguel Angel.