Re: general PG network slowness (possible cure) (repost)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ptb(at)inv(dot)it(dot)uc3m(dot)es
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Richard Huxton" <dev(at)archonet(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: general PG network slowness (possible cure) (repost)
Date: 2007-05-25 16:16:21
Message-ID: 11030.1180109781@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Peter T. Breuer" <ptb(at)inv(dot)it(dot)uc3m(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Peter T. Breuer 2007-05-25 16:34:36 Re: general PG network slowness (possible cure) (repost)
Previous Message Peter T. Breuer 2007-05-25 15:45:41 Re: general PG network slowness (possible cure) (repost)