pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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 11:20:18 -0400
Message-ID: <9508.1180106418@sss.pgh.pa.us> (raw)
In-Reply-To: <200705251506.l4PF6AW08031@inv.it.uc3m.es>
References: <200705251506.l4PF6AW08031@inv.it.uc3m.es>

"Peter T. Breuer" <ptb@inv.it.uc3m.es> writes:
> And definitely all those could be grouped if there are several to do.

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's possible that for bulk data transmission situations we could
optimize things a bit better --- in particular I've wondered whether we
can reliably find out the MTU of the connection and use that as the
output buffer size, instead of trusting the kernel to choose the best
message boundaries --- but for the situation you're worried about
there will be only one send.

			regards, tom lane



view thread (22+ messages)  latest in thread

Message-ID: <9508.1180106418@sss.pgh.pa.us>
Permalink:  ../9508.1180106418@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9508.1180106418@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 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: <9508.1180106418@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