postgresql under Windows is slow

Started by Oleg Bartunovalmost 24 years ago14 messages
#1Oleg Bartunov
oleg@sai.msu.su

Hi,

anybody has an experience how is stable postgresql under Windows system ?
I tried postgresq 7.1 under Cygwin, Windows 98 and was dissapointed
by very bad performance. Are there something I could tune ?
I got 250 sel/sec on simple select from table with 500 rows !
Under Linux I have 2500 sel/sec.

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Oleg Bartunov (#1)
Re: postgresql under Windows is slow

Oleg Bartunov <oleg@sai.msu.su> writes:

anybody has an experience how is stable postgresql under Windows system ?
I tried postgresq 7.1 under Cygwin, Windows 98 and was dissapointed
by very bad performance. Are there something I could tune ?
I got 250 sel/sec on simple select from table with 500 rows !
Under Linux I have 2500 sel/sec.

Never tried it myself, but I distinctly recall someone reporting that
they got comparable performance on Cygwin as on Linux. You might try
asking on pgsql-cygwin.

regards, tom lane

#3Matthew T. O'Connor
matthew@zeut.net
In reply to: Tom Lane (#2)
Re: [ADMIN] postgresql under Windows is slow

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 30 January 2002 11:58 am, Tom Lane wrote:

Oleg Bartunov <oleg@sai.msu.su> writes:

anybody has an experience how is stable postgresql under Windows system ?
I tried postgresq 7.1 under Cygwin, Windows 98 and was dissapointed
by very bad performance. Are there something I could tune ?
I got 250 sel/sec on simple select from table with 500 rows !
Under Linux I have 2500 sel/sec.

Never tried it myself, but I distinctly recall someone reporting that
they got comparable performance on Cygwin as on Linux. You might try
asking on pgsql-cygwin.

We have a few developers that run Apache, PHP, Postgresql on Win2k and we
have definitely seen postgres be a good bit slower on Windows. Have never
benchmarked it however.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8WD6K8BXvT14W9HARAh+GAJwKqs2k8fwJYooenFCqHMMgXr0DjQCcCaQr
bQxY10HunpD2+IACH/L0yas=
=p8Mb
-----END PGP SIGNATURE-----

#4Dave Page
dpage@vale-housing.co.uk
In reply to: Matthew T. O'Connor (#3)
Re: [ADMIN] postgresql under Windows is slow

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 30 January 2002 17:58
To: Oleg Bartunov
Cc: pgsql-admin@postgresql.org; Pgsql Hackers
Subject: Re: [HACKERS] [ADMIN] postgresql under Windows is slow

Oleg Bartunov <oleg@sai.msu.su> writes:

anybody has an experience how is stable postgresql under Windows
system ? I tried postgresq 7.1 under Cygwin, Windows 98 and was
dissapointed by very bad performance. Are there something I

could tune

? I got 250 sel/sec on simple select from table with 500

rows ! Under

Linux I have 2500 sel/sec.

Never tried it myself, but I distinctly recall someone
reporting that they got comparable performance on Cygwin as
on Linux. You might try asking on pgsql-cygwin.

I have never benchmarked it, but I do run pg on Cygwin/Win2K/XP and
Slackware Linux 8 on the same laptop. PostgreSQL always *seems* slower under
Cygwin.

However, I know that one of the guys at Greatbridge did do some benchmarking
and as I recall reported getting comparable performance up to about 100
users.

It's possible that it's because you are running on Windows 98. For the 7.2
release we've done all regression testing on XP/2K - I suspect that Jason
only tested 7.1 on NT4 or 2K.

Regards, Dave.

#5Oleg Bartunov
oleg@sai.msu.su
In reply to: Dave Page (#4)
Re: [HACKERS] postgresql under Windows is slow

On Wed, 30 Jan 2002, Dave Page wrote:

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 30 January 2002 17:58
To: Oleg Bartunov
Cc: pgsql-admin@postgresql.org; Pgsql Hackers
Subject: Re: [HACKERS] [ADMIN] postgresql under Windows is slow

Oleg Bartunov <oleg@sai.msu.su> writes:

anybody has an experience how is stable postgresql under Windows
system ? I tried postgresq 7.1 under Cygwin, Windows 98 and was
dissapointed by very bad performance. Are there something I

could tune

? I got 250 sel/sec on simple select from table with 500

rows ! Under

Linux I have 2500 sel/sec.

Never tried it myself, but I distinctly recall someone
reporting that they got comparable performance on Cygwin as
on Linux. You might try asking on pgsql-cygwin.

I have never benchmarked it, but I do run pg on Cygwin/Win2K/XP and
Slackware Linux 8 on the same laptop. PostgreSQL always *seems* slower under
Cygwin.

However, I know that one of the guys at Greatbridge did do some benchmarking
and as I recall reported getting comparable performance up to about 100
users.

Who is this guy ? What I can do to get more preformance ?
Is't possible to compile 7.2 sources under Cygwin ? Do I need to do
something special ?

It's possible that it's because you are running on Windows 98. For the 7.2
release we've done all regression testing on XP/2K - I suspect that Jason
only tested 7.1 on NT4 or 2K.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

#6Dave Page
dpage@vale-housing.co.uk
In reply to: Oleg Bartunov (#5)
Re: [ADMIN] postgresql under Windows is slow

-----Original Message-----
From: Oleg Bartunov [mailto:oleg@sai.msu.su]
Sent: 31 January 2002 11:13
To: Dave Page
Cc: 'Tom Lane'; 'pgsql-admin@postgresql.org'; 'Pgsql Hackers'
Subject: Re: [HACKERS] [ADMIN] postgresql under Windows is slow

On Wed, 30 Jan 2002, Dave Page wrote:

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 30 January 2002 17:58
To: Oleg Bartunov
Cc: pgsql-admin@postgresql.org; Pgsql Hackers
Subject: Re: [HACKERS] [ADMIN] postgresql under Windows is slow

Oleg Bartunov <oleg@sai.msu.su> writes:

anybody has an experience how is stable postgresql

under Windows

system ? I tried postgresq 7.1 under Cygwin, Windows 98 and was
dissapointed by very bad performance. Are there something I

could tune

? I got 250 sel/sec on simple select from table with 500

rows ! Under

Linux I have 2500 sel/sec.

Never tried it myself, but I distinctly recall someone reporting
that they got comparable performance on Cygwin as on Linux. You
might try asking on pgsql-cygwin.

I have never benchmarked it, but I do run pg on Cygwin/Win2K/XP and
Slackware Linux 8 on the same laptop. PostgreSQL always

*seems* slower

under Cygwin.

However, I know that one of the guys at Greatbridge did do some
benchmarking and as I recall reported getting comparable

performance

up to about 100 users.

Who is this guy ? What I can do to get more preformance ?
Is't possible to compile 7.2 sources under Cygwin ? Do I need
to do something special ?

Yes you can compile it yourself under Cygwin, but there's not really any
point that I can see. I don't think it'll run any faster. I can't tell you
the name of the guy a Greatbridge at the moment as I can't seem to search
the archives right now.

Regards, Dave

#7Oleg Bartunov
oleg@sai.msu.su
In reply to: Dave Page (#6)
Re: [HACKERS] postgresql under Windows is slow

On Thu, 31 Jan 2002, Dave Page wrote:

Who is this guy ? What I can do to get more preformance ?
Is't possible to compile 7.2 sources under Cygwin ? Do I need
to do something special ?

Yes you can compile it yourself under Cygwin, but there's not really any
point that I can see. I don't think it'll run any faster. I can't tell you
the name of the guy a Greatbridge at the moment as I can't seem to search
the archives right now.

Ohh, this problem shoul dbe addressed to Marc. It's shame we can't search
mailing archive.

Regards, Dave

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Oleg Bartunov (#5)
Re: [HACKERS] postgresql under Windows is slow

Oleg Bartunov <oleg@sai.msu.su> writes:

What I can do to get more preformance ?

Sounds like the answer is "stop using Windows 98".

Now that Dave mentions it, I do recall that it was Great Bridge's
people who had gotten pretty much the same numbers from their TPC-C
benchmark on Cygwin as on Linux. I'm quite sure they'd have been
using a current-at-the-time Windows ... so, either NT or W2K.
Probably NT but I can't say that for certain.

regards, tom lane

#9Andy Ruhl
acruhl@sdf.lonestar.org
In reply to: Oleg Bartunov (#1)
Re: postgresql under Windows is slow

On Wed, 30 Jan 2002, Oleg Bartunov wrote:

anybody has an experience how is stable postgresql under Windows system ?
I tried postgresq 7.1 under Cygwin, Windows 98 and was dissapointed
by very bad performance. Are there something I could tune ?
I got 250 sel/sec on simple select from table with 500 rows !
Under Linux I have 2500 sel/sec.

What are your plans for postgresql on Windows? Just by the nature of the
OS, I'd never expect too much performance from a Cygwin app, especially
one like postgresql. Do you plan on running it on 98 in a production
manner?

My own experience is that postgresql runs quite a bit slower on WinMe than
my NetBSD box (same hardware), but I don't consider that to be a problem.

Andy

acruhl@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

#10Oleg Bartunov
oleg@sai.msu.su
In reply to: Andy Ruhl (#9)
Re: postgresql under Windows is slow

On Thu, 31 Jan 2002, Andy Ruhl wrote:

On Wed, 30 Jan 2002, Oleg Bartunov wrote:

anybody has an experience how is stable postgresql under Windows system ?
I tried postgresq 7.1 under Cygwin, Windows 98 and was dissapointed
by very bad performance. Are there something I could tune ?
I got 250 sel/sec on simple select from table with 500 rows !
Under Linux I have 2500 sel/sec.

What are your plans for postgresql on Windows? Just by the nature of the
OS, I'd never expect too much performance from a Cygwin app, especially
one like postgresql. Do you plan on running it on 98 in a production
manner?

even worse, we have to port our application to Windows and it should
run under W95..XP on different hardware (PII ...). It'll run in
single-user environment (thank goodness). Database will have about
20-30 K rows.

My own experience is that postgresql runs quite a bit slower on WinMe than
my NetBSD box (same hardware), but I don't consider that to be a problem.

Did you make some special tuning ? btw, what's about locale support ?

Andy

acruhl@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

#11Andy Ruhl
acruhl@sdf.lonestar.org
In reply to: Oleg Bartunov (#10)
Re: postgresql under Windows is slow

On Thu, 31 Jan 2002, Oleg Bartunov wrote:

even worse, we have to port our application to Windows and it should
run under W95..XP on different hardware (PII ...). It'll run in
single-user environment (thank goodness). Database will have about
20-30 K rows.

Ugh. Why pay for an OS these days? The free ones are getting too good.
It's amazing how entrenched Windows is.

My own experience is that postgresql runs quite a bit slower on WinMe than
my NetBSD box (same hardware), but I don't consider that to be a problem.

Did you make some special tuning ? btw, what's about locale support ?

It was a very quick, seat of the pants test. I made a junk schema with
some insert statements. I noticed that it took a few seconds longer to
finish on Windows than in NetBSD. Didn't do anything more than that. Don't
know about locale stuff, I never have to change that stuff...

Andy

acruhl@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

#12Hannu Krosing
hannu@krosing.net
In reply to: Oleg Bartunov (#10)
Re: [ADMIN] postgresql under Windows is slow

On Thu, 2002-01-31 at 21:33, Oleg Bartunov wrote:

On Thu, 31 Jan 2002, Andy Ruhl wrote:

On Wed, 30 Jan 2002, Oleg Bartunov wrote:

anybody has an experience how is stable postgresql under Windows system ?
I tried postgresq 7.1 under Cygwin, Windows 98 and was dissapointed
by very bad performance. Are there something I could tune ?
I got 250 sel/sec on simple select from table with 500 rows !
Under Linux I have 2500 sel/sec.

What are your plans for postgresql on Windows? Just by the nature of the
OS, I'd never expect too much performance from a Cygwin app, especially
one like postgresql. Do you plan on running it on 98 in a production
manner?

even worse, we have to port our application to Windows and it should
run under W95..XP on different hardware (PII ...).

It can be thet task switching behaviour of Win9x in not very best and
thus too much time is spent switching between client and server :)

To test this theory you could dry to rerun your benchmarks by sending
more queries in one request to lower the switching overhead. When you
run 250 single selects/sec you need to switch between client and server
process 500x/sec. Try sending your queries 10 at a time and see what you
get, or for even cleaner test results use separate server comuter

It'll run in single-user environment (thank goodness).

It could help if you could run in a single process perhaps by putting
your whole application logic in pl/perl (or will this still use
_another_ backent to execute it's queries.

Database will have about 20-30 K rows.

Do you really need all that performance on win9x ?

-------------
Hannu

#13Adrian Phillips
adrianp@powertech.no
In reply to: Oleg Bartunov (#10)
Re: [ADMIN] postgresql under Windows is slow

"Oleg" == Oleg Bartunov <oleg@sai.msu.su> writes:

Oleg> On Thu, 31 Jan 2002, Andy Ruhl wrote:

On Wed, 30 Jan 2002, Oleg Bartunov wrote:

anybody has an experience how is stable postgresql under

Windows system ? > I tried postgresq 7.1 under Cygwin, Windows
98 and was dissapointed > by very bad performance. Are there
something I could tune ? > I got 250 sel/sec on simple select
from table with 500 rows ! > Under Linux I have 2500 sel/sec.

What are your plans for postgresql on Windows? Just by the
nature of the OS, I'd never expect too much performance from a
Cygwin app, especially one like postgresql. Do you plan on
running it on 98 in a production manner?

Oleg> even worse, we have to port our application to Windows and
Oleg> it should run under W95..XP on different hardware (PII
Oleg> ...). It'll run in single-user environment (thank
Oleg> goodness). Database will have about 20-30 K rows.

For starters, check out the Cywgin FAQ :-

http://cygwin.com/faq/faq.html#TOC75 (How is fork implemented)

and the Cygwin User's guide, especially :-

Highlights of Cygwin Functionality/Process Creation

There are also some discussions about fork and vfork in the mailing
list archives, and I see that there have been some changes to do with
vfork during the last year or so but don't know whether that is
applicable to Postgresql.

Sincerely

Adrian Phillips

--
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now? [OK]

#14Eduardo Caillava
ecaillava@interlap.com.ar
In reply to: Andy Ruhl (#11)
Re: postgresql under Windows is slow

hug... wakala...

I have PostgreSQL running in several boxes, since a clonic PIII400 , two
NetVista PIII800 and two NetFinity PIII 550.

All of them are Linux boxes, and obviously there are some performance
diferences related to the hardware, so I try hack hard to get best
performance posible in each case, but I never ever think to use a guindous
box to do serious work, especially if it is a guin98.

I hope you know that Linux 'n, FreeBSD are free and without costs, so why
pay for a cuasi-OS that is going to break your brain and make you live the
IT practice ? ? ?

Try it on Linux on the half hardware 'n tell us later.

Best for you and Greetings