pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Performance of PostgreSQL on Windows vs Linux
10+ messages / 6 participants
[nested] [flat]

* Performance of PostgreSQL on Windows vs Linux
@ 2007-01-03 17:24 Jeremy Haile <jhaile@fastmail.fm>
  2007-01-03 23:18 ` Re: Performance of PostgreSQL on Windows vs Linux Magnus Hagander <magnus@hagander.net>
  2007-01-10 20:15 ` Re: Performance of PostgreSQL on Windows vs Linux Jim C. Nasby <jim@nasby.net>
  0 siblings, 2 replies; 10+ messages in thread

From: Jeremy Haile @ 2007-01-03 17:24 UTC (permalink / raw)
  To: pgsql-performance

I am sure that this has been discussed before, but I can't seem to find
any recent posts. (I am running PostgreSQL 8.2)

I have always ran PostgreSQL on Linux in the past, but the company I am
currently working for uses Windows on all of their servers.  I don't
have the luxury right now of running my own benchmarks on the two OSes,
but wanted to know if anyone else has done a performance comparison.  Is
there any significant differences?



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
@ 2007-01-03 23:18 ` Magnus Hagander <magnus@hagander.net>
  2007-01-03 23:46   ` Re: Performance of PostgreSQL on Windows vs Linux Dimitri Fontaine <dim@dalibo.com>
  2007-01-04 14:46   ` Re: Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  1 sibling, 2 replies; 10+ messages in thread

From: Magnus Hagander @ 2007-01-03 23:18 UTC (permalink / raw)
  To: Jeremy Haile <jhaile@fastmail.fm>; +Cc: pgsql-performance

Jeremy Haile wrote:
> I am sure that this has been discussed before, but I can't seem to find
> any recent posts. (I am running PostgreSQL 8.2)
> 
> I have always ran PostgreSQL on Linux in the past, but the company I am
> currently working for uses Windows on all of their servers.  I don't
> have the luxury right now of running my own benchmarks on the two OSes,
> but wanted to know if anyone else has done a performance comparison.  Is
> there any significant differences?

That depends on your usage pattern. There are certainly cases where the
Win32 version will be significantly slower.
For example, if you open a lot of new connections, that is a lot more
expensive on Windows since each connection needs to execute a new
backend due to the lack of fork().

I don't think you'll find any case where the Windows version is faster
than Linux ;-) But to get a good answer on if the difference is
significant enough to matter, you really need to run some kind of simple
benchmark on *your* workload.

//Magnus



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-03 23:18 ` Re: Performance of PostgreSQL on Windows vs Linux Magnus Hagander <magnus@hagander.net>
@ 2007-01-03 23:46   ` Dimitri Fontaine <dim@dalibo.com>
  2007-01-04 14:27     ` Re: Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  1 sibling, 1 reply; 10+ messages in thread

From: Dimitri Fontaine @ 2007-01-03 23:46 UTC (permalink / raw)
  To: pgsql-performance; +Cc: Magnus Hagander <magnus@hagander.net>; Jeremy Haile <jhaile@fastmail.fm>

Le jeudi 4 janvier 2007 00:18, Magnus Hagander a écrit :
> But to get a good answer on if the difference is
> significant enough to matter, you really need to run some kind of simple
> benchmark on *your* workload.

To easily stress test a couple of servers and compare results on *your* 
workload, please consider using both pgfouine[1,2] and tsung[3].

The companion tool tsung-ploter[4] (for plotting several results using common 
graph, hence scales), may also be usefull.

[1]: http://pgfouine.projects.postgresql.org/
[2]: http://pgfouine.projects.postgresql.org/tsung.html
[3]: http://tsung.erlang-projects.org/
[4]: http://debian.dalibo.org/unstable/tsung-ploter_0.1-1.tar.gz

Regards,
-- 
Dimitri Fontaine
http://www.dalibo.com/

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-03 23:18 ` Re: Performance of PostgreSQL on Windows vs Linux Magnus Hagander <magnus@hagander.net>
  2007-01-03 23:46   ` Re: Performance of PostgreSQL on Windows vs Linux Dimitri Fontaine <dim@dalibo.com>
@ 2007-01-04 14:27     ` Jeremy Haile <jhaile@fastmail.fm>
  0 siblings, 0 replies; 10+ messages in thread

From: Jeremy Haile @ 2007-01-04 14:27 UTC (permalink / raw)
  To: pgsql-performance

Thanks for the recommendations.  I wasn't familiar with those packages!

On Thu, 4 Jan 2007 00:46:32 +0100, "Dimitri Fontaine" <dim@dalibo.com>
said:
> Le jeudi 4 janvier 2007 00:18, Magnus Hagander a écrit :
> > But to get a good answer on if the difference is
> > significant enough to matter, you really need to run some kind of simple
> > benchmark on *your* workload.
> 
> To easily stress test a couple of servers and compare results on *your* 
> workload, please consider using both pgfouine[1,2] and tsung[3].
> 
> The companion tool tsung-ploter[4] (for plotting several results using
> common 
> graph, hence scales), may also be usefull.
> 
> [1]: http://pgfouine.projects.postgresql.org/
> [2]: http://pgfouine.projects.postgresql.org/tsung.html
> [3]: http://tsung.erlang-projects.org/
> [4]: http://debian.dalibo.org/unstable/tsung-ploter_0.1-1.tar.gz
> 
> Regards,
> -- 
> Dimitri Fontaine
> http://www.dalibo.com/



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-03 23:18 ` Re: Performance of PostgreSQL on Windows vs Linux Magnus Hagander <magnus@hagander.net>
@ 2007-01-04 14:46   ` Jeremy Haile <jhaile@fastmail.fm>
  2007-01-04 15:23     ` Re: Performance of PostgreSQL on Windows vs Linux Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 10+ messages in thread

From: Jeremy Haile @ 2007-01-04 14:46 UTC (permalink / raw)
  To: pgsql-performance

Thanks for the response!  I know I have to benchmark them to get a real
answer.  I am just looking to hear someone say "We benchmarked Linux vs.
Windows with similar configuration and hardware and experienced a 25%
performance boost in Linux."  or "We benchmarked them and found no
significant difference."  

I realize the situation varies based on usage patterns, but I'm just
looking for some general info based on anyone else's experiences.  

My usage pattern is a single application that hits the database.  The
application uses a connection pool, so opening lots of connections is
not a huge issue.  However - it does have very large tables and
regularly queries and inserts into these tables.  I insert several
million rows into 3 tables every day - and also delete about the same
amount.



On Thu, 04 Jan 2007 00:18:23 +0100, "Magnus Hagander"
<magnus@hagander.net> said:
> Jeremy Haile wrote:
> > I am sure that this has been discussed before, but I can't seem to find
> > any recent posts. (I am running PostgreSQL 8.2)
> > 
> > I have always ran PostgreSQL on Linux in the past, but the company I am
> > currently working for uses Windows on all of their servers.  I don't
> > have the luxury right now of running my own benchmarks on the two OSes,
> > but wanted to know if anyone else has done a performance comparison.  Is
> > there any significant differences?
> 
> That depends on your usage pattern. There are certainly cases where the
> Win32 version will be significantly slower.
> For example, if you open a lot of new connections, that is a lot more
> expensive on Windows since each connection needs to execute a new
> backend due to the lack of fork().
> 
> I don't think you'll find any case where the Windows version is faster
> than Linux ;-) But to get a good answer on if the difference is
> significant enough to matter, you really need to run some kind of simple
> benchmark on *your* workload.
> 
> //Magnus



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-03 23:18 ` Re: Performance of PostgreSQL on Windows vs Linux Magnus Hagander <magnus@hagander.net>
  2007-01-04 14:46   ` Re: Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
@ 2007-01-04 15:23     ` Tom Lane <tgl@sss.pgh.pa.us>
  2007-01-04 15:29       ` Re: Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  0 siblings, 1 reply; 10+ messages in thread

From: Tom Lane @ 2007-01-04 15:23 UTC (permalink / raw)
  To: Jeremy Haile <jhaile@fastmail.fm>; +Cc: pgsql-performance

"Jeremy Haile" <jhaile@fastmail.fm> writes:
> Thanks for the response!  I know I have to benchmark them to get a real
> answer.  I am just looking to hear someone say "We benchmarked Linux vs.
> Windows with similar configuration and hardware and experienced a 25%
> performance boost in Linux."  or "We benchmarked them and found no
> significant difference."  

I've heard anecdotal reports both ways: "there's no difference" and
"there's a big difference".  So there's no substitute for benchmarking
your own application.

I think one big variable in this is which PG version you are testing.
We've been gradually filing down some of the rough edges in the native
Windows port, so I'd expect that the performance gap is closing over
time.  I don't know how close to closed it is in 8.2, but I'd surely
suggest that you do your benchmarking with 8.2.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-03 23:18 ` Re: Performance of PostgreSQL on Windows vs Linux Magnus Hagander <magnus@hagander.net>
  2007-01-04 14:46   ` Re: Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-04 15:23     ` Re: Performance of PostgreSQL on Windows vs Linux Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-01-04 15:29       ` Jeremy Haile <jhaile@fastmail.fm>
  0 siblings, 0 replies; 10+ messages in thread

From: Jeremy Haile @ 2007-01-04 15:29 UTC (permalink / raw)
  To: pgsql-performance

I'm using 8.2.  I don't know when I'll get a chance to run my own
benchmarks.  (I don't currently have access to a Windows and Linux
server with similar hardware/configuration) But when/if I get a chance
to run them, I will post the results here.

Thanks for the feedback.

Jeremy Haile


On Thu, 04 Jan 2007 10:23:51 -0500, "Tom Lane" <tgl@sss.pgh.pa.us> said:
> "Jeremy Haile" <jhaile@fastmail.fm> writes:
> > Thanks for the response!  I know I have to benchmark them to get a real
> > answer.  I am just looking to hear someone say "We benchmarked Linux vs.
> > Windows with similar configuration and hardware and experienced a 25%
> > performance boost in Linux."  or "We benchmarked them and found no
> > significant difference."  
> 
> I've heard anecdotal reports both ways: "there's no difference" and
> "there's a big difference".  So there's no substitute for benchmarking
> your own application.
> 
> I think one big variable in this is which PG version you are testing.
> We've been gradually filing down some of the rough edges in the native
> Windows port, so I'd expect that the performance gap is closing over
> time.  I don't know how close to closed it is in 8.2, but I'd surely
> suggest that you do your benchmarking with 8.2.
> 
> 			regards, tom lane



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
@ 2007-01-10 20:15 ` Jim C. Nasby <jim@nasby.net>
  2007-01-10 20:32   ` Re: Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-10 20:45   ` Re: Performance of PostgreSQL on Windows vs Linux Scott Marlowe <smarlowe@g2switchworks.com>
  1 sibling, 2 replies; 10+ messages in thread

From: Jim C. Nasby @ 2007-01-10 20:15 UTC (permalink / raw)
  To: Jeremy Haile <jhaile@fastmail.fm>; +Cc: pgsql-performance

On Wed, Jan 03, 2007 at 12:24:24PM -0500, Jeremy Haile wrote:
> I am sure that this has been discussed before, but I can't seem to find
> any recent posts. (I am running PostgreSQL 8.2)
> 
> I have always ran PostgreSQL on Linux in the past, but the company I am
> currently working for uses Windows on all of their servers.  I don't
> have the luxury right now of running my own benchmarks on the two OSes,
> but wanted to know if anyone else has done a performance comparison.  Is
> there any significant differences?

One thing to consider... I've seen a case or two where pgbench running
on windows with HyperThreading enabled was actually faster than with it
turned off. (General experience has been that HT hurts PostgreSQL). I
suspect that the windows kernel may have features that allow it to
better utilize HT than linux.

Of course if you don't have HT... it doesn't matter. :)
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-10 20:15 ` Re: Performance of PostgreSQL on Windows vs Linux Jim C. Nasby <jim@nasby.net>
@ 2007-01-10 20:32   ` Jeremy Haile <jhaile@fastmail.fm>
  1 sibling, 0 replies; 10+ messages in thread

From: Jeremy Haile @ 2007-01-10 20:32 UTC (permalink / raw)
  To: pgsql-performance

Hey Jim - 

Thanks for the feedback.  The server has dual Xeons with HyperThreading
enabled - so perhaps I should try disabling it.  How much performance
boost have you seen by disabling it?  Of course, the bottleneck in my
case is more on the I/O or RAM side, not the CPU side.

Jeremy Haile


On Wed, 10 Jan 2007 14:15:26 -0600, "Jim C. Nasby" <jim@nasby.net> said:
> On Wed, Jan 03, 2007 at 12:24:24PM -0500, Jeremy Haile wrote:
> > I am sure that this has been discussed before, but I can't seem to find
> > any recent posts. (I am running PostgreSQL 8.2)
> > 
> > I have always ran PostgreSQL on Linux in the past, but the company I am
> > currently working for uses Windows on all of their servers.  I don't
> > have the luxury right now of running my own benchmarks on the two OSes,
> > but wanted to know if anyone else has done a performance comparison.  Is
> > there any significant differences?
> 
> One thing to consider... I've seen a case or two where pgbench running
> on windows with HyperThreading enabled was actually faster than with it
> turned off. (General experience has been that HT hurts PostgreSQL). I
> suspect that the windows kernel may have features that allow it to
> better utilize HT than linux.
> 
> Of course if you don't have HT... it doesn't matter. :)
> -- 
> Jim Nasby                                            jim@nasby.net
> EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Performance of PostgreSQL on Windows vs Linux
  2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
  2007-01-10 20:15 ` Re: Performance of PostgreSQL on Windows vs Linux Jim C. Nasby <jim@nasby.net>
@ 2007-01-10 20:45   ` Scott Marlowe <smarlowe@g2switchworks.com>
  1 sibling, 0 replies; 10+ messages in thread

From: Scott Marlowe @ 2007-01-10 20:45 UTC (permalink / raw)
  To: Jim C. Nasby <jim@nasby.net>; +Cc: Jeremy Haile <jhaile@fastmail.fm>; pgsql-performance

On Wed, 2007-01-10 at 14:15, Jim C. Nasby wrote:
> On Wed, Jan 03, 2007 at 12:24:24PM -0500, Jeremy Haile wrote:
> > I am sure that this has been discussed before, but I can't seem to find
> > any recent posts. (I am running PostgreSQL 8.2)
> > 
> > I have always ran PostgreSQL on Linux in the past, but the company I am
> > currently working for uses Windows on all of their servers.  I don't
> > have the luxury right now of running my own benchmarks on the two OSes,
> > but wanted to know if anyone else has done a performance comparison.  Is
> > there any significant differences?
> 
> One thing to consider... I've seen a case or two where pgbench running
> on windows with HyperThreading enabled was actually faster than with it
> turned off. (General experience has been that HT hurts PostgreSQL). I
> suspect that the windows kernel may have features that allow it to
> better utilize HT than linux.

I've also seen a few comments in perform (and elsewhere) in the past
that newer linux kernels seem to handle HT better than older ones, and
also might give better numbers for certain situations.

Note that you should really test with a wide variety of loads (i.e. a
lot of parallel loads, a few etc...) to see what the curve looks like. 
If HT gets you 10% gain on 4 or fewer clients, but 20% slower with 8
clients, then hyperthreading might be a not so good choice.



^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2007-01-10 20:45 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-03 17:24 Performance of PostgreSQL on Windows vs Linux Jeremy Haile <jhaile@fastmail.fm>
2007-01-03 23:18 ` Magnus Hagander <magnus@hagander.net>
2007-01-03 23:46   ` Dimitri Fontaine <dim@dalibo.com>
2007-01-04 14:27     ` Jeremy Haile <jhaile@fastmail.fm>
2007-01-04 14:46   ` Jeremy Haile <jhaile@fastmail.fm>
2007-01-04 15:23     ` Tom Lane <tgl@sss.pgh.pa.us>
2007-01-04 15:29       ` Jeremy Haile <jhaile@fastmail.fm>
2007-01-10 20:15 ` Jim C. Nasby <jim@nasby.net>
2007-01-10 20:32   ` Jeremy Haile <jhaile@fastmail.fm>
2007-01-10 20:45   ` Scott Marlowe <smarlowe@g2switchworks.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox