Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2006 19:31:01 -0500
From:      Kris Kennaway <kris@obsecurity.org>
To:        Bill Moran <wmoran@collaborativefusion.com>
Cc:        mmiranda@123.com.sv, freebsd-questions@freebsd.org, usleepless@gmail.com, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: terrible performance in 6.1beta4
Message-ID:  <20060331003101.GA24325@xor.obsecurity.org>
In-Reply-To: <20060330192437.043e88ff.wmoran@collaborativefusion.com>
References:  <442B2FC6.9040001@123.com.sv> <20060330011834.GA84658@xor.obsecurity.org> <c39ec84c0603300047u5530fc1fjb1ba93fcafcd490d@mail.gmail.com> <442BF0BB.8010504@123.com.sv> <c39ec84c0603301141g42f0f367i1c7669c90e1115d7@mail.gmail.com> <20060330202145.GA17856@xor.obsecurity.org> <c39ec84c0603301249s68475c2erdb87c49eec157c0@mail.gmail.com> <20060330205858.GA21147@xor.obsecurity.org> <20060330192437.043e88ff.wmoran@collaborativefusion.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 30, 2006 at 07:24:37PM -0500, Bill Moran wrote:
> Kris Kennaway <kris@obsecurity.org> wrote:
>=20
> > On Thu, Mar 30, 2006 at 10:49:01PM +0200, usleepless@gmail.com wrote:
> > > Kris,
> > >=20
> > > > Yes, this is my impression of the problem too.  Any time your proce=
ss
> > > > is waiting on disk I/O it is going to perform terribly (on any OS -
> > > > disks are slow), and the way to fix this is to make sure it does as
> > > > little I/O as possible (by allowing everything to be cached in RAM).
> > >=20
> > > just for my curiosity, do you share my opinion on the fsync issue?
> >=20
> > Actually I seem to recall that on Linux with default settings fsync()
> > lies and does not actually sync data before returning, so maybe it's
> > worth turning off on FreeBSD too if you're comfortable with the
> > implications of this.
>=20
> If you have fsync off and the system crashes, your PostgreSQL database
> will probably be corrupt beyond repair.
>=20
> I believe the official word from the PostgreSQL folks is that fsync is
> safe to turn off if you've got battery-backed cache on your disk
> controllers.  Many high-end SCSI controllers have this as an option.
>=20
> Alternatively, if you're just putting the database on for the first
> time, you can temporarily turn fsync off while you're uploading the
> data.  If the system crashes during this, just delete and recreate
> the database and try again.
>=20
> It's not generally a good idea to run in production with fsync off,
> however, unless you have a battery on your controller.

Yeah..but the thing to remember is that on Linux fsync isn't
guaranteeing your data safety anyway, since it's not actually syncing
data on disk before returning to the application.

Kris

--qMm9M+Fa2AknHoGS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)

iD8DBQFELHhFWry0BWjoQKURAo34AJ44SMc4G2BMUepUkkRLcAWYcEvUHgCeOyKF
Kn9+8xxbsrdl2jF2kZX0tJw=
=tklT
-----END PGP SIGNATURE-----

--qMm9M+Fa2AknHoGS--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060331003101.GA24325>