Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tsc17-0004HH-8b for pgsql-performance@arkaria.postgresql.org; Tue, 08 Jan 2013 16:27:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tsc16-00073P-2Q for pgsql-performance@arkaria.postgresql.org; Tue, 08 Jan 2013 16:27:08 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tsc13-00073D-DL for pgsql-performance@postgresql.org; Tue, 08 Jan 2013 16:27:05 +0000 Received: from nm15.bullet.mail.sg3.yahoo.com ([106.10.148.94]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tsc0t-0000Y7-Pu for pgsql-performance@postgresql.org; Tue, 08 Jan 2013 16:27:03 +0000 Received: from [106.10.166.115] by nm15.bullet.mail.sg3.yahoo.com with NNFMP; 08 Jan 2013 16:26:51 -0000 Received: from [106.10.151.186] by tm4.bullet.mail.sg3.yahoo.com with NNFMP; 08 Jan 2013 16:26:51 -0000 Received: from [127.0.0.1] by omp1012.mail.sg3.yahoo.com with NNFMP; 08 Jan 2013 16:26:50 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 989934.23610.bm@omp1012.mail.sg3.yahoo.com Received: (qmail 57449 invoked by uid 60001); 8 Jan 2013 16:26:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.hk; s=s1024; t=1357662410; bh=wKZw16zomJ178p9eqUt6NQiFFqdQNRhCNODM1X4Bv1U=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=Aap22lCChcLJyQuWlozinBJZ15gvnxb1rxrWu2kfIMJZF3JtKhfrRioT9tah83UecKyitYGtxsTvQITonpj11velphOlvdLeRSO+HfXRVPfLLtF0wZwUiFpsb5FgsvWCdg2/1eObelpi7SfbJNboSHOf4TgHVnRHo6KnxWX7R8M= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=E2csIoNth4BXuV2dXmtt1sVd58Tu3Ueq+Z+F35w8AqZyO3MyKXj4S6c6jrv+UwQKlUUvghTvcSBvg2YnQRPbf4AHVgCI3H7LnKkjqzjWyJkv7RpRlPga1rqKdR4u9x31R8XM7MPOninRA0yzEwdw0i0UjKLcpYcXVegFv3YH/Ok=; X-YMail-OSG: Tt.Int4VM1n0oAt.XYnlaJ23i8b517fzUrlxX9Jco549Av1 2s5c_jBYnp3RytuUlTr7s3SEEE_x5T5pIG5x4m3E7wBX2FGGFUZ0K6jKBGzh dz8n0Osqi13.LC.psxPVfd5.vlt.qotCZ0pCDQb936CpZDHjA1yD6lAr7X3z aOX0Pb7aqSdPGCqaiuzdNwDoo60l_5SJGQ6W2bduFwinb6yI4TMzms7CulkZ Dp.bV8BuTcY33GdCcHPEVpNfEhSiu6mzK_IJdjZcLB8.3KqQF.dfGyLqGXsN HLmAEsdHwduNegijNRq0sSeKAyrh7VSwaHfjlBZqp.9qg_c5MusPIXgpDR3U .df_CFCDOvPO.oBT3n34N5_JY384Xopjn45bBx.zQL4R6V08Bd3NzIXZIuiF WniXS0sleV6Y.9_1rIAhOLMagrCp_AldQZtJwIIODcpB1E6w_57jNsJPeUau ewJzbHssWpnjsxKnjp39I2OT0DLNatyGbFsOSZHfI5o2qqINkGgBr4QlT46u wcafTONIQ13gV5TJQuO2P2v.1IReHYR853pl2FpZ0u3yqYa8rsoLKXtvWjRR NATmPm50vArEGa_GIRmPcT3cRo5Tu5N5Fmy88YAt89jcmXQQVvx1nihmpGnJ QMUNURr1ClxFlKYTyL30u Received: from [61.15.240.116] by web190803.mail.sg3.yahoo.com via HTTP; Wed, 09 Jan 2013 00:26:50 SGT X-Rocket-MIMEInfo: 001.001, SGkgS2VuLA0KDQpUaGFua3MgZm9yIHJlcGx5Lg0KQWZ0ZXIgcmVzZWFyY2hpbmcsIEkgZ2V0IG1vcmUgdW5kZXJzdGFuZGluZyB3aXRoIHRoZSBpbXBvcnRhbmNlIG9mIHRoZSBaSUwNCmh0dHA6Ly9jb25zdGFudGluLmdsZXouZGUvYmxvZy8yMDEwLzA3L3NvbGFyaXMtemZzLXN5bmNocm9ub3VzLXdyaXRlcy1hbmQtemlsLWV4cGxhaW5lZA0KU28gdGhlIHBlcmZvcm1hbmNlIGlzc3VlIGlzIHRoZSBaSUwuLi4gDQoNCkJUVywgdXNpbmcgYSBzdGFuZGFyZCBVRlMrc29mdHdhcmUgdXBkYXRlIGlzIHN0aWxsIHMBMAEBAQE- X-Mailer: YahooMailClassic/15.1.2 YahooMailWebService/0.8.130.494 Message-ID: <1357662410.38270.YahooMailClassic@web190803.mail.sg3.yahoo.com> Date: Wed, 9 Jan 2013 00:26:50 +0800 (SGT) From: Patrick Dung Subject: Re: Sub optimal performance with default setting of Postgresql with FreeBSD 9.1 on ZFS To: "ktm@rice.edu" Cc: pgsql-performance@postgresql.org In-Reply-To: <20130107182811.GR14743@aart.rice.edu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="41175793-106892819-1357662410=:38270" X-Pg-Spam-Score: -0.6 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --41175793-106892819-1357662410=:38270 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Ken, Thanks for reply. After researching, I get more understanding with the importance of the ZIL http://constantin.glez.de/blog/2010/07/solaris-zfs-synchronous-writes-and-z= il-explained So the performance issue is the ZIL...=20 BTW, using a standard UFS+software update is still slower than Linux or ZFS= without sync. Best regards, Patrick --- On Tue, 1/8/13, ktm@rice.edu wrote: From: ktm@rice.edu Subject: Re: [PERFORM] Sub optimal performance with default setting of Post= gresql with FreeBSD 9.1 on ZFS To: "Patrick Dung" Cc: pgsql-performance@postgresql.org Date: Tuesday, January 8, 2013, 2:28 AM Hi Patrick, You really need a flash ZIL with ZFS to handle syncs effectively. Setting the sync_commit to off is the best you can do without it. Not that that is bad, we do that here as well. Regards, Ken On Tue, Jan 08, 2013 at 01:18:02AM +0800, Patrick Dung wrote: > Hi, >=20 > Updated information in this post. >=20 > I have installed Postgresql 9.2.2 (complied by gcc) in FreeBSD 9.1 i386. > The pgsql base directory is in a ZFS dataset. >=20 > I >=A0 have noticed the performance is sub-optimal, but I know the default=20 > setting should be the most safest one to be use (without possible data=20 > corruption/loss). >=20 > a) I use OTRS ticketing system version 3.1, the backend is PostgreSQL. > The user interactive response is not slow (switching web pages or create = a change). >=20 > b) There is a benchmark in the support module of OTRS. > It tested insert,update,select and delete performance. > The response time is slow (>10 sec), except select. >=20 > I have done some research on web, with below settings (just one change, n= ot both), the performance returned to normal: >=20 > 1) Disabled sync in the pgsql dataset in ZFS > zfs set sync=3Ddisabled mydata/pgsql > or=20 > 2) In >=A0 postgresql.conf, set synchronous_commit from on to off >=20 > I know the above setting would lead to data loss (e.g.power goes off), an= y comments? >=20 > PS: > 1) I have tried to use primarycache/secondarycache=3Dmetadata/none, it do= not seem to help. >=20 > 2) > I have tried the default setting on Linux too: > RHEL 6.3, ext4, stock postgresql 8.x, OTRS 3.1. > The web site is responsive and the benchmark result is more or less the s= ame as FreeBSD with the 'sync' turned off. >=20 > 3) > For FreeBSD, same setting with Postgresql on UFS: > The performance is between ZFS (default, sync enabled) and ZFS (sync disa= bled). >=20 > Thanks, > Patrick >=20 > --- On Mon, 1/7/13, Patrick Dung wrote: >=20 > From: Patrick Dung > Subject: Sub optimal performance with default setting of Postgresql with = FreeBSD 9.1 on ZFS > To: pgsql-performance@postgresql.org > Date: Monday, January 7, 2013, 11:32 PM >=20 > Hi, >=20 > I have installed Postgresql 9.2.2 (complied by gcc) in FreeBSD 9.1 i386. > The pgsql base directory is in a ZFS dataset. >=20 > I have noticed the performance is sub-optimal, but I know the default set= ting should be the most safest one to be use (without possible data corrupt= ion/loss). >=20 > a) I use OTRS ticketing system, the backend is PostgreSQL. > The user interactive response is not slow (switching web pages or create = a change). >=20 > b) There is a benchmark in the support module of OTRS. > It tested insert,update,select and delete performance. > The response time is slow (>10 sec), except select. >=20 > I have done some research on web, with below settings (just one change, n= ot both), the performance returned to normal: >=20 > 1) Disabled sync in the pgsql dataset in ZFS > zfs set sync=3Ddisabled mydata/pgsql > or=20 > 2) In >=A0 postgresql.conf, set synchronous_commit from on to off >=20 > I know the above setting would lead to data loss (e.g.power goes off), an= y comments? >=20 > PS: > 1) I have tried to use primarycache/secondarycache=3Dmetadata/none, it do= not seem to help. >=20 > 2) > I have tried the default setting on Linux too: > RHEL 6.3, stock postgresql 8.x, OTRS 3.1. > The web site is responsive and the benchmark result is more or less the s= ame as FreeBSD with the 'sync' turned off. >=20 > Thanks, > Patrick --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance --41175793-106892819-1357662410=:38270 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Ken,

Thanks for reply.
After res= earching, I get more understanding with the importance of the ZIL
http:/= /constantin.glez.de/blog/2010/07/solaris-zfs-synchronous-writes-and-zil-exp= lained
So the performance issue is the ZIL...

BTW, using a stand= ard UFS+software update is still slower than Linux or ZFS without sync.
=
Best regards,
Patrick

--- On Tue, 1/8/13, ktm@rice.edu = <ktm@rice.edu> wrote:

From: k= tm@rice.edu <ktm@rice.edu>
Subject: Re: [PERFORM] Sub optimal perf= ormance with default setting of Postgresql with FreeBSD 9.1 on ZFS
To: "= Patrick Dung" <patrick_dkt@yahoo.com.hk>
Cc: pgsql-performance@pos= tgresql.org
Date: Tuesday, January 8, 2013, 2:28 AM

Hi Patrick,

You really need a flash ZIL with ZF= S to handle syncs effectively. Setting
the sync_commit to off is the bes= t you can do without it. Not that that
is bad, we do that here as well.<= br>
Regards,
Ken

On Tue, Jan 08, 2013 at 01:18:02AM +0800, Pat= rick Dung wrote:
> Hi,
>
> Updated information in this p= ost.
>
> I have installed Postgresql 9.2.2 (complied by gcc) i= n FreeBSD 9.1 i386.
> The pgsql base directory is in a ZFS dataset.>
> I
>  have noticed the performance is sub-optimal= , but I know the default
> setting should be the most safest one to = be use (without possible data
> corruption/loss).
>
> a= ) I use OTRS ticketing system version 3.1, the backend is PostgreSQL.
&g= t; The user interactive response is not slow (switching web pages or create= a change).
>
> b) There is a benchmark in the support module of OTRS.
> It tested insert,update,select and delete performa= nce.
> The response time is slow (>10 sec), except select.
>=
> I have done some research on web, with below settings (just one c= hange, not both), the performance returned to normal:
>
> 1) D= isabled sync in the pgsql dataset in ZFS
> zfs set sync=3Ddisabled my= data/pgsql
> or
> 2) In
>  postgresql.conf, set syn= chronous_commit from on to off
>
> I know the above setting wo= uld lead to data loss (e.g.power goes off), any comments?
>
> = PS:
> 1) I have tried to use primarycache/secondarycache=3Dmetadata/n= one, it do not seem to help.
>
> 2)
> I have tried the d= efault setting on Linux too:
> RHEL 6.3, ext4, stock postgresql 8.x, = OTRS 3.1.
> The web site is responsive and the benchmark result is mo= re or less the same as FreeBSD with the 'sync' turned off.
>
> 3)
> For FreeBSD, same setting with Postgresql on UFS:
&= gt; The performance is between ZFS (default, sync enabled) and ZFS (sync di= sabled).
>
> Thanks,
> Patrick
>
> --- On M= on, 1/7/13, Patrick Dung <patrick_dkt@yahoo.com.h= k> wrote:
>
> From: Patrick Dung <patrick_dkt@yahoo.com.hk>
> Subject: Sub optimal performa= nce with default setting of Postgresql with FreeBSD 9.1 on ZFS
> To: = pgsql-performance@postgresql.org=
> Date: Monday, January 7, 2013, 11:32 PM
>
> Hi,
&g= t;
> I have installed Postgresql 9.2.2 (complied by gcc) in FreeBSD = 9.1 i386.
> The pgsql base directory is in a ZFS dataset.
>
&g= t; I have noticed the performance is sub-optimal, but I know the default se= tting should be the most safest one to be use (without possible data corrup= tion/loss).
>
> a) I use OTRS ticketing system, the backend is= PostgreSQL.
> The user interactive response is not slow (switching w= eb pages or create a change).
>
> b) There is a benchmark in t= he support module of OTRS.
> It tested insert,update,select and delet= e performance.
> The response time is slow (>10 sec), except selec= t.
>
> I have done some research on web, with below settings (= just one change, not both), the performance returned to normal:
> > 1) Disabled sync in the pgsql dataset in ZFS
> zfs set sync=3Dd= isabled mydata/pgsql
> or
> 2) In
>  postgresql.con= f, set synchronous_commit from on to off
>
> I know the above setting would lead to data loss (e.g.power goes off), any comments?<= br>>
> PS:
> 1) I have tried to use primarycache/secondaryc= ache=3Dmetadata/none, it do not seem to help.
>
> 2)
> I= have tried the default setting on Linux too:
> RHEL 6.3, stock postg= resql 8.x, OTRS 3.1.
> The web site is responsive and the benchmark r= esult is more or less the same as FreeBSD with the 'sync' turned off.
&g= t;
> Thanks,
> Patrick


--
Sent via pgsql-perfor= mance mailing list (pgsql-performanc= e@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
--41175793-106892819-1357662410=:38270--