pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arnaud Lesauvage <thewild@freesurf.fr>
Cc: pgsql-odbc@postgresql.org
Subject: Re: TCP_NO_DELAY & TcpAckFrequency (Re: Slow query through
Date: Fri, 10 Feb 2006 10:38:01 -0500
Message-ID: <19555.1139585881@sss.pgh.pa.us> (raw)
In-Reply-To: <43ECA243.2050705@freesurf.fr>
References: <6BCB9D8A16AC4241919521715F4D8BCE6C7FD9@algol.sollentuna.se>
	<43EC712E.1060707@freesurf.fr>
	<khj7j83ti4k.fsf_-_@meije.emic.fr>
	<43ECA243.2050705@freesurf.fr>

Arnaud Lesauvage <thewild@freesurf.fr> writes:
> OK, but Magnus is affirmative that TCP_NO_DELAY is enabled on both 
> the client and the server.
> So sending ACKs more frequently should not change the behaviour of 
> the Nagle algorithm.

Yeah.  The speculations quoted in
http://archives.postgresql.org/pgsql-odbc/2006-02/msg00046.php
as to the server behavior were completely wrong: we do use NODELAY
and we don't have any weird zero-copy algorithm.  However, it is
true that we push out data in 8K bufferloads, which doesn't match
well to typical TCP MTU sizes.  I've occasionally wondered whether
we should not try to make the bufferload a multiple of the MTU
size when using a TCP connection, just so that no "short" packets
get sent unnecessarily.  (For a known MTU length, it'd be trivial
to change the hard-wired buffer size on the server side just to
experiment and see if there's any speedup.)

None of this explains why odbc is slow when psql isn't, though,
especially not if you are using one of the recent odbc releases
that relies on libpq.  The wire-level behavior certainly ought
to be the same for anything using libpq ...

			regards, tom lane



view thread (20+ messages)  latest in thread

Message-ID: <19555.1139585881@sss.pgh.pa.us>
Permalink:  ../19555.1139585881@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19555.1139585881@sss.pgh.pa.us

 · 

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-odbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thewild@freesurf.fr
  Subject: Re: TCP_NO_DELAY & TcpAckFrequency (Re: Slow query through
  In-Reply-To: <19555.1139585881@sss.pgh.pa.us>
  References: <6BCB9D8A16AC4241919521715F4D8BCE6C7FD9@algol.sollentuna.se> <43EC712E.1060707@freesurf.fr> <khj7j83ti4k.fsf_-_@meije.emic.fr> <43ECA243.2050705@freesurf.fr> <19555.1139585881@sss.pgh.pa.us>

* 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