From: Greg Smith <greg@2ndquadrant.com>
To: Dusan Misic <promisic@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres performance on Linux and Windows
Date: Mon, 08 Aug 2011 23:52:39 -0400
Message-ID: <4E40AF07.9050004@2ndquadrant.com> (raw)
In-Reply-To: <CAGdZ+NC=kZ1TqPp_RPxLkYrP3eKqC+8Wf17S2P5QPn_5_WiLPg@mail.gmail.com>
References: <CAGdZ+NC=kZ1TqPp_RPxLkYrP3eKqC+8Wf17S2P5QPn_5_WiLPg@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: greg@2ndquadrant.com, promisic@gmail.com
Subject: Re: Postgres performance on Linux and Windows
In-Reply-To: <4E40AF07.9050004@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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