Re: PgSQL 12 on WinSrv ~3x faster than on Linux - Mailing list pgsql-performance

From Tom Lane
Subject Re: PgSQL 12 on WinSrv ~3x faster than on Linux
Date
Msg-id 143097.1622814050@sss.pgh.pa.us
Whole thread Raw
In response to Re: PgSQL 12 on WinSrv ~3x faster than on Linux  (David Rowley <dgrowleyml@gmail.com>)
Responses RE: PgSQL 12 on WinSrv ~3x faster than on Linux  (Taras Savchuk <taras@1adm.ru>)
List pgsql-performance
David Rowley <dgrowleyml@gmail.com> writes:
> On Fri, 4 Jun 2021 at 23:53, Taras Savchuk <taras@1adm.ru> wrote:
>> Any ideas what's wrong? For me such a big difference on identical databases/queries looks strange.

> It's pretty difficult to say. You've not provided any useful details
> about the workload you're running.
> If this "register 10 _same_ documents" thing requires running some
> query, then you might want to look at EXPLAIN (ANALYZE, BUFFERS) for
> that query.  You might want to consider doing SET track_io_timing =
> on;  Perhaps Linux is having to read more buffers from disk than
> Windows.

The first thing that comes to mind for me is fsync working correctly
(i.e. actually waiting for the disk write) in Linux but not in Windows.
On a weird VM stack like you've got, it's not hard for that sort of
thing to go wrong.  Needless to say, if that's the issue then the
apparent performance win is coming at the cost of crash safety.

pg_test_fsync might help detect such a problem.

            regards, tom lane



pgsql-performance by date:

Previous
From: Vijaykumar Jain
Date:
Subject: Re: PgSQL 12 on WinSrv ~3x faster than on Linux
Next
From: Taras Savchuk
Date:
Subject: RE: PgSQL 12 on WinSrv ~3x faster than on Linux