Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6BF43633158 for ; Wed, 18 Feb 2009 09:44:43 -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 91412-01 for ; Wed, 18 Feb 2009 09:44:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og107.obsmtp.com (exprod7og107.obsmtp.com [64.18.2.167]) by mail.postgresql.org (Postfix) with SMTP id 6175E63312F for ; Wed, 18 Feb 2009 09:44:29 -0400 (AST) Received: from source ([72.14.220.156]) by exprod7ob107.postini.com ([64.18.6.12]) with SMTP ID DSNKSZwQugLf0aoubC19ymwJ3DpTxuunlV3d@postini.com; Wed, 18 Feb 2009 05:44:34 PST Received: by fg-out-1718.google.com with SMTP id e21so800774fga.8 for ; Wed, 18 Feb 2009 05:44:25 -0800 (PST) Received: by 10.103.178.17 with SMTP id f17mr1668338mup.45.1234964665256; Wed, 18 Feb 2009 05:44:25 -0800 (PST) Received: from oxford.xeocode.com.enterprisedb.com ([82.16.16.210]) by mx.google.com with ESMTPS id 14sm1300210muo.20.2009.02.18.05.44.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Feb 2009 05:44:24 -0800 (PST) To: pgsql-performance Subject: Re: TCP network cost In-Reply-To: <20090217200416.GA23707@cooker> (Ross J. Reedstrom's message of "Tue\, 17 Feb 2009 14\:04\:17 -0600") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+imap.gmail.com:PG" 109933) References: <20090217070403.GB2486@cooker> <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> From: Gregory Stark Organization: EnterpriseDB Date: Wed, 18 Feb 2009 13:44:23 +0000 Message-ID: <87hc2r272g.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200902/214 X-Sequence-Number: 32795 "Ross J. Reedstrom" writes: > On Tue, Feb 17, 2009 at 12:20:02AM -0700, Rusty Conover wrote: >> >> Try running tests with ttcp to eliminate any PostgreSQL overhead and >> find out the real bandwidth between the two machines. If its results >> are also slow, you know the problem is TCP related and not PostgreSQL >> related. > > I did in fact run a simple netcat client/server pair and verified that I > can transfer that file on 0.12 sec localhost (or hostname), 0.35 over the > net, so TCP stack and network are not to blame. This is purely inside > the postgresql code issue, I believe. There's not much Postgres can do to mess up TCP/IP. The only things that come to mind are a) making lots of short-lived connections and b) getting caught by Nagle when doing lots of short operations and blocking waiting on results. What libpq (or other interface) operations are you doing exactly? [also, your Mail-Followup-To has a bogus email address in it. Please don't do that] -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning