Re: PgSQL 12 on WinSrv ~3x faster than on Linux

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Taras Savchuk <taras(at)1adm(dot)ru>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: PgSQL 12 on WinSrv ~3x faster than on Linux
Date: 2021-06-04 13:40:50
Message-ID: 143097.1622814050@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> On Fri, 4 Jun 2021 at 23:53, Taras Savchuk <taras(at)1adm(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Taras Savchuk 2021-06-04 14:01:51 RE: PgSQL 12 on WinSrv ~3x faster than on Linux
Previous Message Vijaykumar Jain 2021-06-04 13:14:16 Re: PgSQL 12 on WinSrv ~3x faster than on Linux