Thread: RE: ODBC calls seem surprisingly slow...

RE: ODBC calls seem surprisingly slow...

From
Dave Page
Date:

> -----Original Message-----
> From: Robby Slaughter [mailto:webmaster@robbyslaughter.com]
> Sent: 10 July 2001 22:29
> Cc: Pgsql-Cygwin
> Subject: [CYGWIN] ODBC calls seem surprisingly slow...
>
>
> Cygwin folks,
>
> My database calls seem to be VERY slow---10 seconds for a
> single query that returns a handful of records.
>
> "select version()" yields:
>
>  PostgreSQL 7.1.2 on i686-pc-cygwin, compiled by GCC 2.95.3-4
>
> I am actually running to ASP pages but calls via Access seem
> to be having the same problem.  However, typing the same queries
> into the psql interpreter generates snappy responses.
>
> So, my question is: is this just the nature of the beast? Is
> there probably a particular layer (ipc-daemon, odbc driver,
> or otherwise) which is particularly at fault? Has anyone else
> experienced this issue?

I personally find that Cygwin PostgreSQL is only really fast enough as a
(very) convenient development platform (<ducks> sorry Jason! But it is
*very* useful and appreciated). Having said that, I don't find it anything
like as slow as you imply. Some common problems:

1) Ensure that the ODBC driver is not in Debug mode (i.e. set
HKEY_LOCAL_MACHINE\Software\ODBC\ODBCINST.INI\PostgreSQL\Debug = 0 using
regedit).

2) In the ODBC Driver Manager, make sure that ODBC Tracing is switched off -
this creates a huge logfile and can slow the system tremendously.

hth, regards, Dave.

Re: ODBC calls seem surprisingly slow...

From
Jason Tishler
Date:
Dave,

On Wed, Jul 11, 2001 at 08:32:23AM +0100, Dave Page wrote:
> I personally find that Cygwin PostgreSQL is only really fast enough as a
> (very) convenient development platform (<ducks> sorry Jason! But it is
> *very* useful and appreciated).

Thanks, I'm glad that you find Cygwin PostgreSQL useful.  No need
to apologize to me -- I just submitted some Cygwin related patches.
Anything running under Cygwin is slower than a Linux app running on the
same hardware.  Posix emulation is almost guaranteed to be slower than
real Posix.

Terry Carlin (from Great Bridge) is doing some PostgreSQL benchmarking
and hopefully will be reporting on Cygwin PostgreSQL performance versus
other platforms soon.  Do you have any data that you can share with the
list in the meantime?

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

RE: ODBC calls seem surprisingly slow...

From
Dave Page
Date:

> -----Original Message-----
> From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> Sent: 11 July 2001 14:31
> To: Dave Page
> Cc: 'webmaster@robbyslaughter.com'; Pgsql-Cygwin
> Subject: Re: [CYGWIN] ODBC calls seem surprisingly slow...
>
>
> Dave,
>
> On Wed, Jul 11, 2001 at 08:32:23AM +0100, Dave Page wrote:
> > I personally find that Cygwin PostgreSQL is only really
> fast enough as
> > a
> > (very) convenient development platform (<ducks> sorry
> Jason! But it is
> > *very* useful and appreciated).
>
> Thanks, I'm glad that you find Cygwin PostgreSQL useful.  No
> need to apologize to me -- I just submitted some Cygwin
> related patches. Anything running under Cygwin is slower than
> a Linux app running on the same hardware.  Posix emulation is
> almost guaranteed to be slower than real Posix.
>
> Terry Carlin (from Great Bridge) is doing some PostgreSQL
> benchmarking and hopefully will be reporting on Cygwin
> PostgreSQL performance versus other platforms soon.  Do you
> have any data that you can share with the list in the meantime?

No, I'm afraid not, only experience. I run PostgreSQL 7.1.2 on Slackware
Linux 7.1 for about 25 users using about 5 different databases, plus it logs
5 webservers and 2 busy PBX event logs, and even when that system was
running on a 128Mb 450MHz PIII (it's since been upgraded) it was
*significantly* faster than 7.x.x on Cygwin on my W2K PIII 850Mhz laptop
with 128Mb, with only me using it whilst developing pgAdmin (which is done
on the Slackware box when I'm in the office so it's not the different use
slowing it down).

But like I said, your efforts are very much appreciated, without them, there
are 15,000+ (seriously - my fingers hurt!) lines of code for the new version
of pgAdmin that wouldn't have been written.

Regards, Dave.

RE: ODBC calls seem surprisingly slow...

From
"Robby Slaughter"
Date:
Holy bottleneck Batman!

>2) In the ODBC Driver Manager, make sure that ODBC Tracing is switched
off -
>this creates a huge logfile and can slow the system tremendously.

After following tip, my performance just jumped by two orders of magnitude!

Thanks a million Dave!

-Robby Slaughter


Re: ODBC calls seem surprisingly slow...

From
Jason Tishler
Date:
Dave,

On Wed, Jul 11, 2001 at 02:54:31PM +0100, Dave Page wrote:
> No, I'm afraid not, only experience. I run PostgreSQL 7.1.2 on Slackware
> Linux 7.1 for about 25 users using about 5 different databases, plus it logs
> 5 webservers and 2 busy PBX event logs, and even when that system was
> running on a 128Mb 450MHz PIII (it's since been upgraded) it was
> *significantly* faster than 7.x.x on Cygwin on my W2K PIII 850Mhz laptop
> with 128Mb, with only me using it whilst developing pgAdmin (which is done
> on the Slackware box when I'm in the office so it's not the different use
> slowing it down).

Your comparison is not apples to apples.  Usually laptop hard disks
are much slower than desktop ones, which could be causing some of the
perceived slowness.  Nevertheless, like I said before, a Cygwin app
should be expected to be slower than a Linux app on the same hardware.
I'll be very interested to see Terry's apples to apples comparison,
if I can help solve the Cygwin DLL (or PostgreSQL) resource leak.  Sigh...

> But like I said, your efforts are very much appreciated, without them, there
> are 15,000+ (seriously - my fingers hurt!) lines of code for the new version
> of pgAdmin that wouldn't have been written.

You're very welcome.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

RE: ODBC calls seem surprisingly slow...

From
Dave Page
Date:

> -----Original Message-----
> From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> Sent: 11 July 2001 15:24
> To: Dave Page
> Cc: 'webmaster@robbyslaughter.com'; Pgsql-Cygwin
> Subject: Re: [CYGWIN] ODBC calls seem surprisingly slow...
>
>
> Dave,
>
> On Wed, Jul 11, 2001 at 02:54:31PM +0100, Dave Page wrote:
> > No, I'm afraid not, only experience. I run PostgreSQL 7.1.2 on
> > Slackware Linux 7.1 for about 25 users using about 5 different
> > databases, plus it logs 5 webservers and 2 busy PBX event logs, and
> > even when that system was running on a 128Mb 450MHz PIII
> (it's since
> > been upgraded) it was
> > *significantly* faster than 7.x.x on Cygwin on my W2K PIII
> 850Mhz laptop
> > with 128Mb, with only me using it whilst developing pgAdmin
> (which is done
> > on the Slackware box when I'm in the office so it's not the
> different use
> > slowing it down).
>
> Your comparison is not apples to apples.  Usually laptop hard
> disks are much slower than desktop ones, which could be
> causing some of the perceived slowness.

Of course, I'm well aware of that, however, having numerous fast boxes
running W2K on 3 1/2" IDE disks (the same make and model as in the Slackware
box) I can compare performance of other (non-postgresql) apps and be fairly
happy that the large amount of money I spent (not mine I hasten to add) was
not wasted. Like I said, it's not performance data, just experience and
judgment based on knowledge and extensive use of the systems involved.

> Nevertheless, like I
> said before, a Cygwin app should be expected to be slower
> than a Linux app on the same hardware. I'll be very
> interested to see Terry's apples to apples comparison, if I
> can help solve the Cygwin DLL (or PostgreSQL) resource leak.  Sigh...

Yes, I'd be very interested as well.


Regards, Dave.