Lists: | pgsql-performance |
---|
From: | "Jeremy Haile" <jhaile(at)fastmail(dot)fm> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-03 17:24:24 |
Message-ID: | 1167845064.29222.282952329@webmail.messagingengine.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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?
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Jeremy Haile <jhaile(at)fastmail(dot)fm> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-03 23:18:23 |
Message-ID: | 459C39BF.4070403@hagander.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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
From: | Dimitri Fontaine <dim(at)dalibo(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Jeremy Haile <jhaile(at)fastmail(dot)fm> |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-03 23:46:32 |
Message-ID: | 200701040046.32453.dim@dalibo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-performance |
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/
From: | "Jeremy Haile" <jhaile(at)fastmail(dot)fm> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-04 14:27:46 |
Message-ID: | 1167920866.6081.283102447@webmail.messagingengine.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)dalibo(dot)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/
From: | "Jeremy Haile" <jhaile(at)fastmail(dot)fm> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-04 14:46:53 |
Message-ID: | 1167922013.8482.283102539@webmail.messagingengine.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)hagander(dot)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
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jeremy Haile" <jhaile(at)fastmail(dot)fm> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-04 15:23:51 |
Message-ID: | 17034.1167924231@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-performance |
"Jeremy Haile" <jhaile(at)fastmail(dot)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
From: | "Jeremy Haile" <jhaile(at)fastmail(dot)fm> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-04 15:29:41 |
Message-ID: | 1167924581.14522.283112867@webmail.messagingengine.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)sss(dot)pgh(dot)pa(dot)us> said:
> "Jeremy Haile" <jhaile(at)fastmail(dot)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
From: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
---|---|
To: | Jeremy Haile <jhaile(at)fastmail(dot)fm> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-10 20:15:26 |
Message-ID: | 20070110201526.GS12217@nasby.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
From: | "Jeremy Haile" <jhaile(at)fastmail(dot)fm> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-10 20:32:01 |
Message-ID: | 1168461121.8030.1168616597@webmail.messagingengine.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)nasby(dot)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(at)nasby(dot)net
> EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
Cc: | Jeremy Haile <jhaile(at)fastmail(dot)fm>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Performance of PostgreSQL on Windows vs Linux |
Date: | 2007-01-10 20:45:31 |
Message-ID: | 1168461931.20602.207.camel@state.g2switchworks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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.