Re: ODBC driver over network very slow - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: ODBC driver over network very slow
Date
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3415C2C49@Herge.rcsinc.local
Whole thread Raw
In response to ODBC driver over network very slow  (Milan Sekanina <milan@sde.cz>)
List pgsql-performance
> Milan Sekanina <milan@sde.cz> writes:
> > We are running an application that uses psqlodbc driver on Windows
XP to
> > connect to a server and for some reason the download of data from
the
> > server is very slow. We have created a very simple test application
that
> > inserts a larger amount of data into the database and uses a simple
> > "SELECT * from test" to download it back. The INSERT of 10MB takes
about
> > 4 seconds, while the SELECT takes almost 5 minutes (with basically
> > nothing else running on both the network and the two computers). If
we
> > run the PostgreSQL server on the local machine so that the network
is
> > not used, both actions are very fast.
>
> I seem to recall having seen similar reports not involving ODBC at
all.
> Try searching the mailing-list archives, but I think the cases we
solved
> involved getting rid of third-party add-ons to the Windows TCP stack.

IIRC there was a TCP related fix in the odbc driver related to
performance with large buffers.  I'd suggest trying a newer odbc driver
first.

Merlin

dave page wrote ([odbc] 500 times slower)
>
> My collegue spent some time to dig the following case and it
> looks like
> Nagle algorithm and delayed ACKs related problem.
> In psqlodbc.h
> #define SOCK_BUFFER_SIZE            4096
>
> I changed that value to 8192 and driver works fine for me.
> I am not sure why this change helps.

Err, no neither am I. Why do you think it's got something to do with
Nagle/delayed ACKs?

The only thing that instantly rings bells for me is that the max size of
a text field is 8190 bytes at present (which really should be increased,
if not removed altogether), which won't fit in the default buffer. But
then, I wouldn't expect to see the performance drop you describe with a
4096 byte buffer, only one much smaller.

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: ODBC driver over network very slow
Next
From: "Kevin Grittner"
Date:
Subject: Re: ODBC driver over network very slow