From owner-freebsd-fs@FreeBSD.ORG Wed Jan 9 14:49:24 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 45DCEA0F for ; Wed, 9 Jan 2013 14:49:24 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id F095F34A for ; Wed, 9 Jan 2013 14:49:23 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TswyF-0001xg-HC for freebsd-fs@freebsd.org; Wed, 09 Jan 2013 15:49:35 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Jan 2013 15:49:35 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Jan 2013 15:49:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Ivan Voras Subject: Re: ZFS sub-optimal performance with default setting Date: Wed, 09 Jan 2013 15:49:10 +0100 Lines: 69 Message-ID: References: <1357741879.56011.YahooMailClassic@web190806.mail.sg3.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2C0B8ED6291D76C5CFC40320" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120812 Thunderbird/14.0 In-Reply-To: <1357741879.56011.YahooMailClassic@web190806.mail.sg3.yahoo.com> X-Enigmail-Version: 1.4.3 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2013 14:49:24 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2C0B8ED6291D76C5CFC40320 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I don't know if I understand your questions correctly; you should provide more details: what is the performance you get from the system (numbers) and what do you want it to be (again, numbers). On 09/01/2013 15:31, Patrick Dung wrote: > a) I use OTRS ticketing system version 3.1, the backend is PostgreSQL. > The user interactive response is not slow (switching web pages or creat= e a change). How did you conclude the database and ZFS are the problem? What measurements from iostat and similar tools do you get which support that conclusion? > I have done some research on web, with below settings (just one change,= not 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 > 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), = any comments? Those two settings have almost the same idea behind them - delaying disk data sync in such a way that it doesn't impact the data already committed, and preserve metadata structures, but they do it on different levels. In theory, with ZFS "sync=3Ddisabled", you will survive a crash with the file system structures intact, but with some file data lost (e.g. the last 30 seconds before the crash). This may include any random file data.= With PostgreSQL's "synchronous_commit=3Doff", you will survive a crash with PostgreSQL's data structures intact (if the file system synces properly), but you could lose data within the database since the last time fsync was called. The difference is that in the first case (ZFS), you may end up with a sane file system but with corrupted PostgreSQL data, and in the second case the PostgreSQL files will be sane and only some database data can be lost. The second case is always better. --------------enig2C0B8ED6291D76C5CFC40320 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlDtg2YACgkQ/QjVBj3/HSwD4ACdF9ugkBb87gaIROfLqAWEn9ut WrkAoIen8oD9f8o5hSWarDivwmDxFzvB =z9+c -----END PGP SIGNATURE----- --------------enig2C0B8ED6291D76C5CFC40320--