pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres performance on Linux and Windows
5+ messages / 4 participants
[nested] [flat]
* Postgres performance on Linux and Windows
@ 2011-08-03 16:37 Dusan Misic <promisic@gmail.com>
2011-08-03 17:05 ` Re: Postgres performance on Linux and Windows Andy Colson <andy@squeakycode.net>
2011-08-03 17:29 ` Re: Postgres performance on Linux and Windows Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-08-09 03:52 ` Re: Postgres performance on Linux and Windows Greg Smith <greg@2ndquadrant.com>
0 siblings, 3 replies; 5+ messages in thread
From: Dusan Misic @ 2011-08-03 16:37 UTC (permalink / raw)
To: pgsql-performance
I had done some testing for my application (WIP) and I had executed same SQL
script and queries on real physical 64-bit Windows 7 and on virtualized
64-bit CentOS 6.
Both database servers are tuned with real having 8 GB RAM and 4 cores,
virtualized having 2 GB RAM and 2 virtual cores.
Virtualized server crushed real physical server in performance in both DDL
and DML scripts.
My question is simple. Does PostgreSQL perform better on Linux than on
Windows and how much is it faster in your tests?
Thank you for your time.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Postgres performance on Linux and Windows
2011-08-03 16:37 Postgres performance on Linux and Windows Dusan Misic <promisic@gmail.com>
@ 2011-08-03 17:05 ` Andy Colson <andy@squeakycode.net>
2011-08-03 17:16 ` Re: Postgres performance on Linux and Windows Dusan Misic <promisic@gmail.com>
2 siblings, 1 reply; 5+ messages in thread
From: Andy Colson @ 2011-08-03 17:05 UTC (permalink / raw)
To: Dusan Misic <promisic@gmail.com>; +Cc: pgsql-performance
On 8/3/2011 11:37 AM, Dusan Misic wrote:
> I had done some testing for my application (WIP) and I had executed same
> SQL script and queries on real physical 64-bit Windows 7 and on
> virtualized 64-bit CentOS 6.
>
> Both database servers are tuned with real having 8 GB RAM and 4 cores,
> virtualized having 2 GB RAM and 2 virtual cores.
>
> Virtualized server crushed real physical server in performance in both
> DDL and DML scripts.
>
> My question is simple. Does PostgreSQL perform better on Linux than on
> Windows and how much is it faster in your tests?
>
> Thank you for your time.
>
Given the exact same hardware, I think PG will perform better on Linux.
Your question "how much faster" is really dependent on usage. If you're
cpu bound then I'd bet they perform the same. You are cpu bound after
all, and on the exact same hardware, it should be the same.
If you have lots of clients, with lots of IO, I think linux would
perform better, but hard to say how much. I cant recall anyone posting
benchmarks from "the exact same hardware".
Comparing windows on metal vs linux on vm is like comparing apples to
Missouri. If your test was io bound, and the vmserver was write
caching, that's why your vm won so well... but I'd hate to see a power
failure.
It would be interesting to compare windows on metal vs windows on vm
though. (Which, I have done linux on metal vs linux on vm, but the
hardware specs where different (dual amd64 4 sata software raid10 vs
intel 8-core something with 6-disk scsi hardware raid), but linux on
metal won every time.)
I think in the long run, running the system you are best at, will be a
win. If you don't know linux much, and run into problems, how much
time/money will you spend fixing it. Compared to windows.
If you have to have the fastest, absolute, system. Linux on metal is
the way to go.
(This is all speculation and personal opinion, I have no numbers to back
anything up)
-Andy
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Postgres performance on Linux and Windows
2011-08-03 16:37 Postgres performance on Linux and Windows Dusan Misic <promisic@gmail.com>
2011-08-03 17:05 ` Re: Postgres performance on Linux and Windows Andy Colson <andy@squeakycode.net>
@ 2011-08-03 17:16 ` Dusan Misic <promisic@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Dusan Misic @ 2011-08-03 17:16 UTC (permalink / raw)
To: Andy Colson <andy@squeakycode.net>; +Cc: pgsql-performance
Thank you Andy for your answer.
That is exactly what I had expected, but it is better to consult with
experts on this matter.
Again, thank you.
Dusan
On Aug 3, 2011 7:05 PM, "Andy Colson" <andy@squeakycode.net> wrote:
> On 8/3/2011 11:37 AM, Dusan Misic wrote:
>> I had done some testing for my application (WIP) and I had executed same
>> SQL script and queries on real physical 64-bit Windows 7 and on
>> virtualized 64-bit CentOS 6.
>>
>> Both database servers are tuned with real having 8 GB RAM and 4 cores,
>> virtualized having 2 GB RAM and 2 virtual cores.
>>
>> Virtualized server crushed real physical server in performance in both
>> DDL and DML scripts.
>>
>> My question is simple. Does PostgreSQL perform better on Linux than on
>> Windows and how much is it faster in your tests?
>>
>> Thank you for your time.
>>
>
> Given the exact same hardware, I think PG will perform better on Linux.
>
> Your question "how much faster" is really dependent on usage. If you're
> cpu bound then I'd bet they perform the same. You are cpu bound after
> all, and on the exact same hardware, it should be the same.
>
> If you have lots of clients, with lots of IO, I think linux would
> perform better, but hard to say how much. I cant recall anyone posting
> benchmarks from "the exact same hardware".
>
> Comparing windows on metal vs linux on vm is like comparing apples to
> Missouri. If your test was io bound, and the vmserver was write
> caching, that's why your vm won so well... but I'd hate to see a power
> failure.
>
> It would be interesting to compare windows on metal vs windows on vm
> though. (Which, I have done linux on metal vs linux on vm, but the
> hardware specs where different (dual amd64 4 sata software raid10 vs
> intel 8-core something with 6-disk scsi hardware raid), but linux on
> metal won every time.)
>
> I think in the long run, running the system you are best at, will be a
> win. If you don't know linux much, and run into problems, how much
> time/money will you spend fixing it. Compared to windows.
>
> If you have to have the fastest, absolute, system. Linux on metal is
> the way to go.
>
> (This is all speculation and personal opinion, I have no numbers to back
> anything up)
>
> -Andy
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Postgres performance on Linux and Windows
2011-08-03 16:37 Postgres performance on Linux and Windows Dusan Misic <promisic@gmail.com>
@ 2011-08-03 17:29 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2 siblings, 0 replies; 5+ messages in thread
From: Kevin Grittner @ 2011-08-03 17:29 UTC (permalink / raw)
To: Dusan Misic <promisic@gmail.com>; pgsql-performance
Dusan Misic <promisic@gmail.com> wrote:
> My question is simple. Does PostgreSQL perform better on Linux
> than on Windows and how much is it faster in your tests?
We tested this quite a while back (on 8.0 and 8.1) with identical
hardware and identical databases running in matching versions of
PostgreSQL. On both saturation stress tests and load balancing a
real live web site between PostgreSQL on Windows and Linux, Linux
came out about 40% faster. Who knows what the number would be
today, with current PostgreSQL, Linux, and Windows? Anyway, perhaps
it's a useful data point for you.
BTW, I wrote a tiny Java program to push data in both directions as
fast a possible over our network to check for networking problems
(it really showed up half duplex legs pretty dramatically), and when
everything was on one switch it ran 30% faster if both ends were
Linux than when both ends were Windows. I found it interesting that
with one end on Linux and one on Windows, it split the difference.
So this is not unique to PostgreSQL.
-Kevin
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Postgres performance on Linux and Windows
2011-08-03 16:37 Postgres performance on Linux and Windows Dusan Misic <promisic@gmail.com>
@ 2011-08-09 03:52 ` Greg Smith <greg@2ndquadrant.com>
2 siblings, 0 replies; 5+ messages in thread
From: Greg Smith @ 2011-08-09 03:52 UTC (permalink / raw)
To: Dusan Misic <promisic@gmail.com>; +Cc: pgsql-performance
Dusan Misic wrote:
>
> I had done some testing for my application (WIP) and I had executed
> same SQL script and queries on real physical 64-bit Windows 7 and on
> virtualized 64-bit CentOS 6.
>
> Both database servers are tuned with real having 8 GB RAM and 4 cores,
> virtualized having 2 GB RAM and 2 virtual cores.
>
> Virtualized server crushed real physical server in performance in both
> DDL and DML scripts.
>
> My question is simple. Does PostgreSQL perform better on Linux than on
> Windows and how much is it faster in your tests?
>
You didn't mention what tuning you did on the Windows server. If you
set shared_buffers to a large value, more than around 512MB, that's been
reported to slow the server down rather than make it faster on that OS.
The other thing you can easily get wrong in this sort of comparison is
having one server enforce synchronous writes, while the other cheats.
Many virtualized systems will not flush information to disk properly
during writes, which is faster but can lead to database corruption after
a crash. See http://wiki.postgresql.org/wiki/Reliable_Writes for more
information on this general topic. Generally for a VM solution, you
need to check if it properly handles the "fsync" system call.
Comparing performance across two different operating systems fairly is
really hard to get right. It's easy to skew the results because of
something unrelated to the difference in database performance, such as
Kevin's commentary about network speed heavily influencing results.
--
Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2011-08-09 03:52 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-08-03 16:37 Postgres performance on Linux and Windows Dusan Misic <promisic@gmail.com>
2011-08-03 17:05 ` Andy Colson <andy@squeakycode.net>
2011-08-03 17:16 ` Dusan Misic <promisic@gmail.com>
2011-08-03 17:29 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-08-09 03:52 ` Greg Smith <greg@2ndquadrant.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