Tuning Postgresql on FreeBSD 5.1

Scott Lambert lambert at lambertfam.org
Mon Aug 25 21:49:16 PDT 2003

On Mon, Aug 25, 2003 at 09:20:46PM -0700, Sean Chittenden wrote:
> > > while still maintaining reasonable file system performance (ext2 is
> > > faster than ext3 by a wide margin, but ext2 is _not_ a reliable FS).
> > 
> > > > #fsync = true
> > > 
> > > Change this to false.
> > 
> > This is a funny thing to suggest after the filesystem comment.
> :) Did you enjoy that?  :) I should clarify that piece of "advice"
> though.
> If you're _sure_ power isn't going to fail (using a UPS) and make
> regular backups (standard operating procedure), then fsync = false
> can be a good thing in terms of performance (roughly speaking, it
> <snip>
> keep fsync = true.  If, however, you have mitigated the risks to
> levels that your business/operation is comfortable with (your data
> center is on generators, your DB systems have UPSs, are using RAID,
> and make frequent backups), then I would set fsync = false for most
> noncritical apps (non-financial, non-medical).

I've had more UPS failures than grid failures in the past year and a
half.  In the blackout, one of my APCs smoked rather than do it's job
the second time the power went down.

The UPS maintainance people at on of the colo facilities I use managed
to drop power to everything while doing routine maintenance on their
UPS.  That left me with a lot of unexpected softupdates inconsistencies.
And three machines that dropped to single user mode on restart.  One
machine's disk didn't survive.  We lost a lot of files on the other two
systems.  The sad part being that the backups had just started for the
day when they burped the UPS.  Two hours later and it wouldn't have hurt
as bad.  

A UPS doesn't necesarily reduce your likelyhood of having a power
failure.  Two fully online UPS's and redundant power supplies in each
machine might.  

BTW, e-mail and web hosting for Grandma and Aunt Bessie and
Uncle Joe are critical services too.  No, really, I'm serious.

Scott Lambert                    KC5MLE                       Unix SysAdmin
lambert at lambertfam.org      

More information about the freebsd-performance mailing list