Skip site navigation (1) Skip section navigation (2)

Re: how unsafe (or worst scenarios) when setting fsync OFF for postgresql

From: "Guoping Zhang" <guoping(dot)zhang(at)nec(dot)com(dot)au>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>,"'Guoping Zhang (E-mail)'" <guopingz(at)nstc(dot)nec(dot)com(dot)au>
Subject: Re: how unsafe (or worst scenarios) when setting fsync OFF for postgresql
Date: 2006-04-28 05:58:06
Message-ID: 004901c66a88$b909edd0$74304c93@eddy (view raw or flat)
Thread:
Lists: pgsql-performance
Hi, Tom

Many thanks for quick replies and that helps a lot.

Just in case, anyone out there can recommend a good but cost effective
battery-backed write cache SCSI for Solaris SPARC platform? How well does it
work with UFS or newer ZFS for solaris?

Cheers and regards,
Guoping




-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 2006Äê4ÔÂ28ÈÕ 14:57
To: guoping(dot)zhang(at)nec(dot)com(dot)au
Cc: pgsql-performance(at)postgresql(dot)org; 'Guoping Zhang (E-mail)'
Subject: Re: [PERFORM] how unsafe (or worst scenarios) when setting
fsync OFF for postgresql


"Guoping Zhang" <guoping(dot)zhang(at)nec(dot)com(dot)au> writes:
> a) The tests consists of ten thousands very small transactions, which are
> not grouped, that is why so slow with compare to set fsync off.

Yup.

> c) wal_sync_method is set to 'open_datasync', which is fastest among the
> four, right?

Well, is it?  You shouldn't assume that without testing.

> Looks like, if we have to set fsync be true, we need to modify our
> application.

Yes, you should definitely look into batching your operations into
larger transactions.  On normal hardware you can't expect to commit
transactions faster than one per disk revolution (unless they're coming
from multiple clients, where there's a hope of ganging several parallel
commits per revolution).

Or buy a disk controller with battery-backed write cache and put your
faith in that cache surviving a machine crash.  But don't turn off fsync
if you care about your data.

			regards, tom lane


In response to

pgsql-performance by date

Next:From: Sven GeislerDate: 2006-04-28 08:32:16
Subject: Re: Large (8M) cache vs. dual-core CPUs
Previous:From: Guoping ZhangDate: 2006-04-28 05:18:08
Subject: Re: how unsafe (or worst scenarios) when setting fsync OFF for postgresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group