Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YqOWG-0007IZ-Dw for pgsql-admin@arkaria.postgresql.org; Thu, 07 May 2015 16:19:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YqOWF-0001DJ-Jj for pgsql-admin@arkaria.postgresql.org; Thu, 07 May 2015 16:19:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YqOWE-0001DC-Hg for pgsql-admin@postgresql.org; Thu, 07 May 2015 16:19:26 +0000 Received: from bay004-omc1s22.hotmail.com ([65.54.190.33]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1YqOW5-0007N6-C0 for pgsql-admin@postgresql.org; Thu, 07 May 2015 16:19:25 +0000 Received: from BAY172-W20 ([65.54.190.60]) by BAY004-OMC1S22.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Thu, 7 May 2015 09:19:14 -0700 X-TMN: [wNdSOcmf98L7NP3u6M3TEal8Gu8fhupf] X-Originating-Email: [srkrishna@outlook.com] Message-ID: Content-Type: multipart/alternative; boundary="_5c3094b1-9220-40bc-b72f-76d6b3c65dd6_" From: Ravi Krishna To: "pgsql-admin@postgresql.org" Subject: Re: Best setting for wal_sync_method Date: Thu, 7 May 2015 12:19:14 -0400 Importance: Normal In-Reply-To: References: , MIME-Version: 1.0 X-OriginalArrivalTime: 07 May 2015 16:19:14.0421 (UTC) FILETIME=[8F232A50:01D088E1] 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 --_5c3094b1-9220-40bc-b72f-76d6b3c65dd6_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Speaking to the sys admins we found that the file system where the WAL was = written to did not have direct_io and hence all writes were getting buffere= d. So we enabled direct_io on that FS and now writes are order of magnitude= slower (5x times).=20 It seems PG already uses O_DIRECT for WAL. So is the enabling of direct_io = in the mount options of the FS totally redundant. It definitely has a serio= us performance impact. Thanks From: srkrishna@outlook.com To: pgsql-admin@postgresql.org Subject: [ADMIN] Best setting for wal_sync_method Date: Thu=2C 7 May 2015 09:36:36 -0400 =0A= =0A= =0A= On RHEL 6.4 which is the best setting for wal_sync_method for write intensi= ve operations. Is the default fdatasync good for all conditions=2C includin= g reliability.=20 Thanks = --_5c3094b1-9220-40bc-b72f-76d6b3c65dd6_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Speaking to the sys admins we found that the file system where = the WAL was written to did not have direct_io and hence all writes were get= ting buffered. So we enabled direct_io on that FS and now writes are order = of magnitude slower (5x times). =3B

It seems PG already uses O_D= IRECT for WAL. So is the enabling of direct_io in the mount options of the = FS totally redundant. It definitely has a serious performance impact.
Thanks


From: srkrishna@outlook.comTo: pgsql-admin@postgresql.org
Subject: [ADMIN] Best setting for wal_sy= nc_method
Date: Thu=2C 7 May 2015 09:36:36 -0400

=0A= =0A= =0A=
On RHEL 6.4 which is the best setting for wal_sync_method = for write intensive operations. Is the default fdatasync good for all condi= tions=2C including reliability. =3B

Thanks
= --_5c3094b1-9220-40bc-b72f-76d6b3c65dd6_--