Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 465939F9F75 for ; Tue, 12 Dec 2006 06:19:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 25314-08 for ; Tue, 12 Dec 2006 06:19:00 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 63D5F9F9C35 for ; Tue, 12 Dec 2006 06:19:00 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so1645133ugf for ; Tue, 12 Dec 2006 02:18:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kGxzATZR+Hf+K35WQuBUb6Npr5XHofZSvbmmTEZ/UfCJ2R0gVb82EV3/wyNitQpZCC8Ql75KssPgozocp2B8NbbVlPxM4it8Uvh99ck132rJHPcqIZ8ZvSUEFPe/vrXpc1AZKraLDBfwi7fWfRn+NRiUM2uQmDS9upSIyQnomUQ= Received: by 10.82.118.2 with SMTP id q2mr629713buc.1165918738597; Tue, 12 Dec 2006 02:18:58 -0800 (PST) Received: by 10.82.159.6 with HTTP; Tue, 12 Dec 2006 02:18:58 -0800 (PST) Message-ID: <5e66c6e90612120218p435bc0a6i80f1158fae970b9a@mail.gmail.com> Date: Tue, 12 Dec 2006 11:18:58 +0100 From: "Axel Waggershauser" To: "Tom Lane" Subject: Re: Low throughput of binary inserts from windows to linux Cc: pgsql-performance@postgresql.org In-Reply-To: <21549.1165886726@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5e66c6e90612080417r23ecaea4p210905f868c26c7f@mail.gmail.com> <5e66c6e90612081724m57293ffdy21d6b45697e69bd4@mail.gmail.com> <3317.1165636358@sss.pgh.pa.us> <5e66c6e90612110658r3c0918f6v4fd3682363db5c15@mail.gmail.com> <12645.1165852740@sss.pgh.pa.us> <5e66c6e90612111444y78729a71m4ec9852ae9bc8567@mail.gmail.com> <21549.1165886726@sss.pgh.pa.us> X-Google-Sender-Auth: 18c768d6a73fb200 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/280 X-Sequence-Number: 22336 On 12/12/06, Tom Lane wrote: > "Axel Waggershauser" writes: > > I tested different sizes on linux some time ago and found that 64KB > > was optimal. But playing with different sizes again revealed that my > > windows->linux problem seems to be solved if I use _any_ other > > (reasonable - meaning something between 4K and 512K) power of two ?!? > > I think this almost certainly indicates a Nagle/delayed-ACK > interaction. I googled and found a nice description of the issue: > http://www.stuartcheshire.org/papers/NagleDelayedAck/ But that means I must have misinterpreted fe-connect.c, right? Meaning on the standard windows build the setsockopt(conn->sock, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on)) line gets never called (eather because TCP_NODELAY is not defined or IS_AF_UNIX(addr_cur->ai_family) in PQconnectPoll evaluates to true). In case I was mistaken, this explanation makes perfectly sens to me. But then again it would indicate a 'bug' in libpq, in the sense that it (apparently) sets TCP_NODELAY on linux but not on windows. Axel