Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFNNF-0006ln-KQ for pgsql-admin@arkaria.postgresql.org; Mon, 29 May 2017 16:18:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFNNF-00061A-7E for pgsql-admin@arkaria.postgresql.org; Mon, 29 May 2017 16:18:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFNLR-0002lX-S7 for pgsql-admin@postgresql.org; Mon, 29 May 2017 16:16:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFNLO-0001Ty-Qg for pgsql-admin@postgresql.org; Mon, 29 May 2017 16:16:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4TGGWOS012145; Mon, 29 May 2017 12:16:32 -0400 From: Tom Lane To: "Klaus P. Pieper" cc: pgsql-admin@postgresql.org Subject: Re: pgbench Windows outperforms Debian in Write tests while Debian is faster in SELECT only tests In-reply-to: <030801d2d87b$4f556820$ee003860$@gmail.com> References: <028501d2d84f$2f1ea840$8d5bf8c0$@gmail.com> <31836.1496045941@sss.pgh.pa.us> <030801d2d87b$4f556820$ee003860$@gmail.com> Comments: In-reply-to "Klaus P. Pieper" message dated "Mon, 29 May 2017 14:58:46 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12143.1496074592.1@sss.pgh.pa.us> Date: Mon, 29 May 2017 12:16:32 -0400 Message-ID: <12144.1496074592@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org "Klaus P. Pieper" writes: >> Are you sure you have Windows configured to fsync properly? > It seems that it is indeed related to the wal_sync_method settings. > Results for 1 client read / write: > Option Windows Debian > fdatasync 340 150 > fsync 125 90 > open_datasync 360 160 > fsync_writethrough 115 n/a > open_sync n/a 90 > fsync = off 360 400 OK, so open_datasync and fdatasync are nonfunctional on Windows, which is unsurprising. The other cases are evidently doing *something*, but the amount of overhead is variable from one sync method to another, which is likewise unsurprising. The whole reason why we have these options at all is that some systems handle some of them better than others. In this case, I think the relevant conclusion is that correct configuration for Debian is to use open_datasync or fdatasync, while correct configuration for Windows is to use fsync or fsync_writethrough, and when you compare those two configurations, yes Windows is slower. If you're a paranoid sort you would want to do plug-pull testing to ensure that your selected setting actually does prevent data corruption during a system crash. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin