From: Tom Lane <tgl@sss.pgh.pa.us>
To: ptb@inv.it.uc3m.es
Cc: 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 12:16:21 -0400
Message-ID: <11030.1180109781@sss.pgh.pa.us> (raw)
In-Reply-To: <200705251545.l4PFjf612758@inv.it.uc3m.es>
References: <200705251545.l4PFjf612758@inv.it.uc3m.es>
"Peter T. Breuer" <ptb@inv.it.uc3m.es> writes:
> "Also sprach Tom Lane:"
>> Except that in the situation you're describing, there's only a hundred
>> or two bytes of response to each query, which means that only one send()
>> will occur anyway. (The flush call comes only when we are done
>> responding to the current client query.)
> 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
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.
regards, tom lane
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: tgl@sss.pgh.pa.us, ptb@inv.it.uc3m.es, alvherre@commandprompt.com, dev@archonet.com
Subject: Re: general PG network slowness (possible cure) (repost)
In-Reply-To: <11030.1180109781@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