Re: pgin.tcl pg_exec_prepared slow (was: Released...) - Mailing list pgsql-interfaces

From Greg Stark
Subject Re: pgin.tcl pg_exec_prepared slow (was: Released...)
Date
Msg-id 878ydwsj1q.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: pgin.tcl pg_exec_prepared slow (was: Released...)  (L J Bayuk <ljb220@mindspring.com>)
List pgsql-interfaces
L J Bayuk <ljb220@mindspring.com> writes:

> The delay we are seeing (about 40 ms) is from the time the client sends the
> Bind message to PostgreSQL until it gets a TCP ACK back.

You might consider disabling the NAGLE algorithm. It can delay acks like this.
You could do this with setsockopt(SOL_TCP, TCP_NODELAY,...)

The problem is that while this would be perfectly appropriate for things like
bind messages, it's entirely inappropriate for the bulk data transfer
of the results of a query.

I would not suggest enabling TCP_NODELAY for all data. And I'm not sure how
implementations behave if you turn it on and off.

-- 
greg



pgsql-interfaces by date:

Previous
From: Brijesh Shrivastav
Date:
Subject: Libpq and transactions
Next
From: Greg Stark
Date:
Subject: Re: pgin.tcl pg_exec_prepared slow (was: Released...)