Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Jan 2013 15:49:10 +0100
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-fs@freebsd.org
Subject:   Re: ZFS sub-optimal performance with default setting
Message-ID:  <kck014$dpi$1@ger.gmane.org>
In-Reply-To: <1357741879.56011.YahooMailClassic@web190806.mail.sg3.yahoo.com>
References:  <1357741879.56011.YahooMailClassic@web190806.mail.sg3.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?kck014$dpi$1>