Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 54E429FB8AF for ; Fri, 25 May 2007 13:16:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 39563-06 for ; Fri, 25 May 2007 13:16:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id AAFCB9FB5E4 for ; Fri, 25 May 2007 13:16:27 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l4PGGLo0011031; Fri, 25 May 2007 12:16:22 -0400 (EDT) To: ptb@inv.it.uc3m.es cc: "Alvaro Herrera" , "Richard Huxton" , pgsql-performance@postgresql.org Subject: Re: general PG network slowness (possible cure) (repost) In-reply-to: <200705251545.l4PFjf612758@inv.it.uc3m.es> References: <200705251545.l4PFjf612758@inv.it.uc3m.es> Comments: In-reply-to "Peter T. Breuer" message dated "Fri, 25 May 2007 17:45:41 +0200" Date: Fri, 25 May 2007 12:16:21 -0400 Message-ID: <11030.1180109781@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/519 X-Sequence-Number: 24909 "Peter T. Breuer" 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