From: Peter T. Breuer <ptb@inv.it.uc3m.es>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: ptb@inv.it.uc3m.es, "Alvaro Herrera" <alvherre@commandprompt.com>
Cc: Richard Huxton <dev@archonet.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: general PG network slowness (possible cure) (repost)
Date: Fri, 25 May 2007 18:34:36 +0200 (MET DST)
Message-ID: <200705251634.l4PGYak16803@inv.it.uc3m.es> (raw)
In-Reply-To: <11030.1180109781@sss.pgh.pa.us>
"Also sprach Tom Lane:"
> > It may still be useful. The kernel won't necessarily send data as you
> > push it down to the network protocols and driver. The driver may decide
> > to wait for more data to accumulate,
>
> No, because we set TCP_NODELAY. Once we've flushed a message to the
That just means "disable Nagle", which is indeed more or less the
correct thing to do .. you don't want to sit around waiting for more
data when we're sure there will be none, as you say. Yet you also don't
want to send short data out prematurely, which disabling Nagle can
cause.
And disabling Nagle doesn't actually force data out immediately you want
it to be sent ... it just disables extra waits imposed by the Nagle
algorithm/protocol. It doesn't stop the driver from waiting around
because it feels taking the bus might be a bit premature right now,
for example.
> kernel, we don't want the kernel sitting on it --- any delay there adds
> directly to the elapsed query time. At least this is the case for the
> final response to a query. I'm not too clear on whether this means we
> need to be careful about intermediate message boundaries when there's a
> lot of data being sent.
It's unclear. But not my situation.
If I clear TCP_CORK all data is sent at that point. If I set TCP_CORK
data is held until I clear TCP_CORK, or 200ms have passed with no send.
Peter
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: ptb@inv.it.uc3m.es, tgl@sss.pgh.pa.us, alvherre@commandprompt.com, dev@archonet.com
Subject: Re: general PG network slowness (possible cure) (repost)
In-Reply-To: <200705251634.l4PGYak16803@inv.it.uc3m.es>
* 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