Thread: Re: [pgsql-hackers-win32] Performance on Win32 vs Cygwin

Re: [pgsql-hackers-win32] Performance on Win32 vs Cygwin

From
"Magnus Hagander"
Date:
>Hi,
>
>We are experiencing slow performance on 8 Beta 2 Dev3 on Win32 and are
>trying to determine why. Any info is appreciated.
>
>We have a Web Server and a DB server both running Win2KServer with all
>service packs and critical updates.
>
>An ASP page on the Web Server hits the DB Server with a simple
>query that
>returns 205 rows and makes the ASP page delivered to the user
>about 350K.
>
>On an ethernet lan a client pc perceives just under 1 sec
>performance with
>the following DB Server configuration:
>    PIII 550Mhz
>    256MB RAM
>    7200 RPM HD
>    cygwin
>    Postgresql 7.1.3
>    PGODBC 7.3.2
>
>We set up another DB Server with 8 beta (same Web Server, same
>network, same
>client pc) and now the client pc perceives response of just
>over 3 sec with
>the following DB server config:
>    PIII 700 Mhz
>    448MB RAM
>    7200 RPM HD
>    8 Beta 2 Dev3 on Win32  running as a service
>
>Is the speed decrease because it's a beta?
>Is the speed decrease because it's running on Win instead of cygwin?
>
>We did not install cygwin on the new DB Server.

IIRC, previous versions of postgresql (< 8.0) did not correctly sync
disks when running on Cygwin. I'm not 100% sure, can someone confirm?
8.0 does, and I beleive it does both under native win32 and cygwin.

It's been my experience that the native version is slightly faster than
the cygwin one, but I've only compared 8.0 to 8.0.


//Magnus


Re: [pgsql-hackers-win32] Performance on Win32 vs Cygwin

From
Tom Lane
Date:
"MikeSmialek2@Hotmail.com" <mikesmialek2@hotmail.com> writes:
> So are we correct to rely on
> - 8 being slower than 7.x in general and

I think this is a highly unlikely claim ... *especially* if you are
comparing against 7.1.  The point about sync() being a no-op is real,
but offhand I think it would only come into play at checkpoints.  We
have never issued sync() during regular queries.

What seems more likely to me is that you have neglected to do any
performance tuning on the new installation.  Have you vacuumed/analyzed
all your tables?  Checked the postgresql.conf settings for sanity?

If you'd like to do an apples-to-apples comparison to prove whether
7.1's failure to sync() is relevant, then turn off fsync in the 8.0
configuration and see how much difference that makes.

If you can identify specific queries that are slower in 8.0 than 7.1,
I'd be interested to see the EXPLAIN ANALYZE details from each.
(Actually, I'm not sure 7.1 had EXPLAIN ANALYZE; you may have to
settle for EXPLAIN from it.)

            regards, tom lane

Re: [pgsql-hackers-win32] Performance on Win32 vs Cygwin

From
"MikeSmialek2@Hotmail.com"
Date:
Thanks Magnus,

So are we correct to rely on
- 8 being slower than 7.x in general and
- 8 on Win32 being a little faster than 8 on Cygwin?

Will the final release of 8 be faster than the beta?

Thanks,

Mike


----- Original Message -----
From: "Magnus Hagander" <mha@sollentuna.net>
To: "MikeSmialek2@Hotmail.com" <mikesmialek2@hotmail.com>;
<pgsql-performance@postgresql.org>; <pgsql-hackers-win32@postgresql.org>
Sent: Thursday, October 14, 2004 12:29 PM
Subject: SV: [pgsql-hackers-win32] Performance on Win32 vs Cygwin


>Hi,
>
>We are experiencing slow performance on 8 Beta 2 Dev3 on Win32 and are
>trying to determine why. Any info is appreciated.
>
>We have a Web Server and a DB server both running Win2KServer with all
>service packs and critical updates.
>
>An ASP page on the Web Server hits the DB Server with a simple
>query that
>returns 205 rows and makes the ASP page delivered to the user
>about 350K.
>
>On an ethernet lan a client pc perceives just under 1 sec
>performance with
>the following DB Server configuration:
>    PIII 550Mhz
>    256MB RAM
>    7200 RPM HD
>    cygwin
>    Postgresql 7.1.3
>    PGODBC 7.3.2
>
>We set up another DB Server with 8 beta (same Web Server, same
>network, same
>client pc) and now the client pc perceives response of just
>over 3 sec with
>the following DB server config:
>    PIII 700 Mhz
>    448MB RAM
>    7200 RPM HD
>    8 Beta 2 Dev3 on Win32  running as a service
>
>Is the speed decrease because it's a beta?
>Is the speed decrease because it's running on Win instead of cygwin?
>
>We did not install cygwin on the new DB Server.

IIRC, previous versions of postgresql (< 8.0) did not correctly sync
disks when running on Cygwin. I'm not 100% sure, can someone confirm?
8.0 does, and I beleive it does both under native win32 and cygwin.

It's been my experience that the native version is slightly faster than
the cygwin one, but I've only compared 8.0 to 8.0.


//Magnus


Re: [pgsql-hackers-win32] Performance on Win32 vs Cygwin

From
Reini Urban
Date:
Magnus Hagander schrieb:
> IIRC, previous versions of postgresql (< 8.0) did not correctly sync
> disks when running on Cygwin. I'm not 100% sure, can someone confirm?
> 8.0 does, and I beleive it does both under native win32 and cygwin.

yes, sync is a NOOP on cygwin.

> It's been my experience that the native version is slightly faster than
> the cygwin one, but I've only compared 8.0 to 8.0.

Sure. This is expected. Cygwin's interim's layer costs a lot of time.
(process handling, path resolution)
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/