From owner-freebsd-fs@FreeBSD.ORG Wed Jan 9 14:34:36 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 E90C854A for ; Wed, 9 Jan 2013 14:34:36 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from nm39-vm1.bullet.mail.sg3.yahoo.com (nm39-vm1.bullet.mail.sg3.yahoo.com [106.10.151.172]) by mx1.freebsd.org (Postfix) with ESMTP id 17315283 for ; Wed, 9 Jan 2013 14:34:35 +0000 (UTC) Received: from [106.10.166.63] by nm39.bullet.mail.sg3.yahoo.com with NNFMP; 09 Jan 2013 14:31:20 -0000 Received: from [106.10.151.138] by tm20.bullet.mail.sg3.yahoo.com with NNFMP; 09 Jan 2013 14:31:19 -0000 Received: from [127.0.0.1] by omp1006.mail.sg3.yahoo.com with NNFMP; 09 Jan 2013 14:31:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 832519.60523.bm@omp1006.mail.sg3.yahoo.com Received: (qmail 57155 invoked by uid 60001); 9 Jan 2013 14:31:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.hk; s=s1024; t=1357741879; bh=rZskGUbkQfDsYCBN8MutOuiqfPkbEgpBFV1+6fs76Qk=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=w5QgAKXEyq3zR0Sk+pLfFM1mt6hVSMkS+ZfoBfWkRivc1vlH3pULu9tYGC9kndFM6RA/W942DNFSeiHEsn0OnQC71HWPEBY4KhRFdGi0VEXB+XcnicdzV+XgYOHk4azhwogcisntC2m3JK8G+hUBEDJMuCcGzDH5qQ6uyO1R+HE= 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:MIME-Version:Content-Type; b=FKBrSKP9cYOO60h9KObQwdX0YgWdH4f4T7/97wm/oVSlnz8jmP28PvMaOHngi4VWFAEMS52Uc5dBWmKlVQqt2UuwVFM1PbV3WcYh8yxhWDPWic0r7uAlXD87arVDTtHhlwrZiLb86tyAFjQEYb9Iyqryv0yFNFqOkrvuNvPhfSU=; X-YMail-OSG: 9taNbi4VM1kpJatzmZMVhi424NJaBke7CzuURWgST8E0ETt Z6lrdUZ.Nc22LmX4_0UIfC9hB3rBvzExMqhAy8aOghOup6eq7UHjEIp4bcyi 4PTOjGHyzu7KaDE5aT47HwpXtNHfD4hYhZgK4LEPDGxzEP5flumZ4rhhYi0t .fdAWj.hjqNjH6hkw6M308PL6rwiiSSu_.zX9cdgL9fRvCPop2f7bzuDJpOy 8n2GJN9G2r4PusoqV1KWUl8Ff0MUZqdGuYre0AacDiixcAD8WGvPyhQUMZv6 5r6oB_bqlD0ZnP6MoTWqgBVPFfQy1IHDdJY7HQ66iN61tTEoNepwdvOdtKek J2nF4QSDqkAO5tfpvp8M7VJTA_pAZscUkCynPiptXSX6LMH3sJ_H.OQ3AIhx ClcCoutL7ZEvfQ5BDNBi.Vln3tGPI_hWRzxTiLPGJy0bEJf8eJr3TlIL2mj0 F0xeI93AMzGebPuPAKsqr61T_Mi5hBAdaVMyun4RUlgeWOCcmgbUgWFSuCjI 4PGR4NR1iR1sKLxEnujzldyKZ9TG5Q8grZsrsDA52u632hWNrBN5zivJ60B0 i6cOSzxsLZZFAcmT0iJJ2uit5MB_SQn5i6mPvzbDJbDQ- Received: from [61.15.240.116] by web190806.mail.sg3.yahoo.com via HTTP; Wed, 09 Jan 2013 22:31:19 SGT X-Rocket-MIMEInfo: 001.001, SGkgZnJlZWJzZC1mcyENCg0KSSBoYXZlIG15IHRoZSBvcmlnaW5hbCBxdWVzdGlvbiBpbjoNCmh0dHA6Ly9hcmNoaXZlcy5wb3N0Z3Jlc3FsLm9yZy9wZ3NxbC1wZXJmb3JtYW5jZS8yMDEzLTAxL21zZzAwMDQ0LnBocA0KQnV0IGxhdGVyIGl0IHdhcyBmb3VuZCBvdXQgdGhlIGJvdHRsZW5lY2sgc2VlbXMgdG8gYmUgdGhlIFpGUyB3aXRoIG91dCBhIGZhc3QgWklMLg0KUGxlYXNlIGdpdmUgc29tZSBhZHZpc2UsIHRoYW5rcy4NCg0KRGV0YWlsczoNCg0KUG9zdGdyZXNxbCA5LjIuMiAoY29tcGxpZWQgYnkgZ2MBMAEBAQE- X-Mailer: YahooMailClassic/15.1.2 YahooMailWebService/0.8.130.494 Message-ID: <1357741879.56011.YahooMailClassic@web190806.mail.sg3.yahoo.com> Date: Wed, 9 Jan 2013 22:31:19 +0800 (SGT) From: Patrick Dung Subject: ZFS sub-optimal performance with default setting To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:34:37 -0000 Hi freebsd-fs! I have my the original question in: http://archives.postgresql.org/pgsql-performance/2013-01/msg00044.php But later it was found out the bottleneck seems to be the ZFS with out a fa= st ZIL. Please give some advise, thanks. Details: Postgresql 9.2.2 (complied by gcc) is installed in 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=20 setting should be the most safest one to be use (concern about data integri= ty). 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). 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. 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=3Ddisabled mydata/pgsql or=20 2) In =A0postgresql.conf, set synchronous_commit from on to off I know the above setting would lead to data loss (e.g.power goes off), any = comments? PS: 1) I have tried to use primarycache/secondarycache=3Dmetadata/none, it do n= ot seem to help. 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 sam= e as FreeBSD with the 'sync' turned off. 3) For FreeBSD, same setting with Postgresql on UFS: The performance is between ZFS (default, sync enabled) and ZFS (sync disabl= ed). Thanks, Patrick