Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C7831632B47 for ; Tue, 24 Feb 2009 13:02:08 -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 37722-05 for ; Tue, 24 Feb 2009 13:02:05 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh4.mail.rice.edu (mh4.mail.rice.edu [128.42.199.11]) by mail.postgresql.org (Postfix) with ESMTP id D8FCF63274F for ; Tue, 24 Feb 2009 13:02:05 -0400 (AST) Received: from mh4.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh4.mail.rice.edu (Postfix) with ESMTP id 2B2C937001F for ; Tue, 24 Feb 2009 11:02:04 -0600 (CST) X-Virus-Scanned: by amavis-2.6.0 at mh4.mail.rice.edu Received: from mh4.mail.rice.edu ([127.0.0.1]) by mh4.mail.rice.edu (mh4.mail.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ld1mOqdiLStH for ; Tue, 24 Feb 2009 11:02:04 -0600 (CST) Received: from cooker.cnx.rice.edu (cooker.cnx.rice.edu [168.7.5.70]) by mh4.mail.rice.edu (Postfix) with ESMTP id 0745137000A for ; Tue, 24 Feb 2009 11:02:04 -0600 (CST) Received: from reedstrm by cooker.cnx.rice.edu with local (Exim 3.36 #1 (Debian)) id 1Lc0fS-0006xe-00 for ; Tue, 24 Feb 2009 11:02:02 -0600 Date: Tue, 24 Feb 2009 11:02:01 -0600 From: "Ross J. Reedstrom" To: pgsql-performance@postgresql.org Subject: Re: TCP network cost Message-ID: <20090224170201.GA25420@cooker> Mail-Followup-To: "Ross J. Reedstrom" , pgsql-performance@postgresql.org 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27042.1235423820@sss.pgh.pa.us> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200902/292 X-Sequence-Number: 32873 Excellent. I'll take a look at this and report back here. Ross On Mon, Feb 23, 2009 at 04:17:00PM -0500, Tom Lane wrote: > "Ross J. Reedstrom" writes: > > Summary: C client and large-object API python both send bits in > > reasonable time, but I suspect there's still room for improvement in > > libpq over TCP: I'm suspicious of the 6x difference. Detailed analysis > > will probably find it's all down to memory allocation and extra copying > > of bits around (client side) > > I wonder if the backend isn't contributing to the problem too. It chops > its sends up into 8K units, which doesn't seem to create huge overhead > in my environment but maybe it does in yours. It'd be interesting to see > what results you get from the attached quick-and-dirty patch (against > HEAD, but it should apply back to at least 8.1). > > regards, tom lane