pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Axel Waggershauser <awagger@web.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Low throughput of binary inserts from windows to linux
Date: Tue, 12 Dec 2006 11:18:58 +0100
Message-ID: <5e66c6e90612120218p435bc0a6i80f1158fae970b9a@mail.gmail.com> (raw)
In-Reply-To: <21549.1165886726@sss.pgh.pa.us>
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>

On 12/12/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Axel Waggershauser" <awagger@web.de> 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



view thread (13+ messages)  latest in thread

Message-ID: <5e66c6e90612120218p435bc0a6i80f1158fae970b9a@mail.gmail.com>
Permalink:  ../5e66c6e90612120218p435bc0a6i80f1158fae970b9a@mail.gmail.com/
Also on:    postgresql.org/message-id/5e66c6e90612120218p435bc0a6i80f1158fae970b9a@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: awagger@web.de, tgl@sss.pgh.pa.us
  Subject: Re: Low throughput of binary inserts from windows to linux
  In-Reply-To: <5e66c6e90612120218p435bc0a6i80f1158fae970b9a@mail.gmail.com>
  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> <5e66c6e90612120218p435bc0a6i80f1158fae970b9a@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox