pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedfsync and battery-backed caches
8+ messages / 4 participants
[nested] [flat]
* fsync and battery-backed caches
@ 2006-02-27 10:03 Javier Somoza <jsomoza@pandasoftware.es>
0 siblings, 1 reply; 8+ messages in thread
From: Javier Somoza @ 2006-02-27 10:03 UTC (permalink / raw)
To: pgsql-performance
Hi all
Is it secure to disable fsync havin battery-backed disk cache?
Thx
Javier Somoza
Oficina de Dirección Estratégica
mailto:jsomoza@pandasoftware.es
Panda Software
Buenos Aires, 12
48001 BILBAO - ESPAÑA
Teléfono: 902 24 365 4
Fax: 94 424 46 97
http://www.pandasoftware.es
Panda Software, una de las principales compañías desarrolladoras de
soluciones de protección contra virus e intrusos, presenta su nueva
familia de soluciones. Todos los usuarios de ordenadores, desde las
redes más grandes a los domésticos, disponen ahora de nuevos productos
con excelentes tecnologías de seguridad. Más información en:
http://www.pandasoftware.es/productos
¡Protéjase ahora contra virus e intrusos! Pruebe gratis nuestros
productos en http://www.pandasoftware.es/descargas/
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: fsync and battery-backed caches
@ 2006-02-27 10:12 Tino Wildenhain <tino@wildenhain.de>
parent: Javier Somoza <jsomoza@pandasoftware.es>
0 siblings, 1 reply; 8+ messages in thread
From: Tino Wildenhain @ 2006-02-27 10:12 UTC (permalink / raw)
To: Javier Somoza <jsomoza@pandasoftware.es>; +Cc: pgsql-performance
Javier Somoza schrieb:
>
> Hi all
>
> Is it secure to disable fsync havin battery-backed disk cache?
>
> Thx
>
No. fsync moves the data from OS memory cache to disk-adaptor
cache which is required to benefit from battery backup.
If this data is written to the plates immediately depends on settings
of your disk adaptor card.
Regards
Tino
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: fsync and battery-backed caches
@ 2006-02-28 00:22 Jim C. Nasby <jnasby@pervasive.com>
parent: Tino Wildenhain <tino@wildenhain.de>
0 siblings, 1 reply; 8+ messages in thread
From: Jim C. Nasby @ 2006-02-28 00:22 UTC (permalink / raw)
To: Tino Wildenhain <tino@wildenhain.de>; +Cc: Javier Somoza <jsomoza@pandasoftware.es>; pgsql-performance
On Mon, Feb 27, 2006 at 11:12:57AM +0100, Tino Wildenhain wrote:
> Javier Somoza schrieb:
> >
> > Hi all
> >
> > Is it secure to disable fsync havin battery-backed disk cache?
> >
> > Thx
> >
> No. fsync moves the data from OS memory cache to disk-adaptor
> cache which is required to benefit from battery backup.
More importantly, in guarantees that data is committed to non-volatile
storage in such a way that PostgreSQL can recover from a crash without
corruption.
If you have a battery-backed controller and turn on write caching you
shouldn't see much effect from fsync anyway.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: fsync and battery-backed caches
@ 2006-02-28 01:06 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 1 reply; 8+ messages in thread
From: Bruce Momjian @ 2006-02-28 01:06 UTC (permalink / raw)
To: Jim C. Nasby <jnasby@pervasive.com>; +Cc: Tino Wildenhain <tino@wildenhain.de>; Javier Somoza <jsomoza@pandasoftware.es>; pgsql-performance
Jim C. Nasby wrote:
> On Mon, Feb 27, 2006 at 11:12:57AM +0100, Tino Wildenhain wrote:
> > Javier Somoza schrieb:
> > >
> > > Hi all
> > >
> > > Is it secure to disable fsync havin battery-backed disk cache?
> > >
> > > Thx
> > >
> > No. fsync moves the data from OS memory cache to disk-adaptor
> > cache which is required to benefit from battery backup.
>
> More importantly, in guarantees that data is committed to non-volatile
> storage in such a way that PostgreSQL can recover from a crash without
> corruption.
>
> If you have a battery-backed controller and turn on write caching you
> shouldn't see much effect from fsync anyway.
We do mention battery-backed cache in our docs:
http://www.postgresql.org/docs/8.1/static/wal.html
If it is unclear, please let us know.
--
Bruce Momjian http://candle.pha.pa.us
SRA OSS, Inc. http://www.sraoss.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: fsync and battery-backed caches
@ 2006-02-28 08:19 Javier Somoza <jsomoza@pandasoftware.es>
parent: Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Javier Somoza @ 2006-02-28 08:19 UTC (permalink / raw)
To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Jim C. Nasby <jnasby@pervasive.com>; Tino Wildenhain <tino@wildenhain.de>; pgsql-performance
Yeah, i saw it. It says full-page-writes can be disabled
without problems.
But i wanted to confirm fsync cannot be disabled although i
have battery.
Thanks!! :-)
> We do mention battery-backed cache in our docs:
>
> http://www.postgresql.org/docs/8.1/static/wal.html
>
> If it is unclear, please let us know.
Javier Somoza
Oficina de Dirección Estratégica
mailto:jsomoza@pandasoftware.es
Panda Software
Buenos Aires, 12
48001 BILBAO - ESPAÑA
Teléfono: 902 24 365 4
Fax: 94 424 46 97
http://www.pandasoftware.es
Panda Software, una de las principales compañías desarrolladoras de
soluciones de protección contra virus e intrusos, presenta su nueva
familia de soluciones. Todos los usuarios de ordenadores, desde las
redes más grandes a los domésticos, disponen ahora de nuevos productos
con excelentes tecnologías de seguridad. Más información en:
http://www.pandasoftware.es/productos
¡Protéjase ahora contra virus e intrusos! Pruebe gratis nuestros
productos en http://www.pandasoftware.es/descargas/
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: fsync and battery-backed caches
@ 2006-02-28 17:23 Jim C. Nasby <jnasby@pervasive.com>
parent: Javier Somoza <jsomoza@pandasoftware.es>
0 siblings, 1 reply; 8+ messages in thread
From: Jim C. Nasby @ 2006-02-28 17:23 UTC (permalink / raw)
To: Javier Somoza <jsomoza@pandasoftware.es>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; Tino Wildenhain <tino@wildenhain.de>; pgsql-performance
Actually, you can't assume that a BBU means you can safely disable
full-page-writes. Depending on the controller, it's still possible to
end up with partially written pages.
BTW, if your mailer makes doing so convenient, it would be nice to trim
down your .signature; note that it's about 3x longer than the email you
actually sent.
On Tue, Feb 28, 2006 at 09:19:36AM +0100, Javier Somoza wrote:
>
> Yeah, i saw it. It says full-page-writes can be disabled
> without problems.
> But i wanted to confirm fsync cannot be disabled although i
> have battery.
>
> Thanks!! :-)
>
>
>
> > We do mention battery-backed cache in our docs:
> >
> > http://www.postgresql.org/docs/8.1/static/wal.html
> >
> > If it is unclear, please let us know.
>
> Javier Somoza
> Oficina de Direcci?n Estrat?gica
> mailto:jsomoza@pandasoftware.es
>
> Panda Software
> Buenos Aires, 12
> 48001 BILBAO - ESPA?A
> Tel?fono: 902 24 365 4
> Fax: 94 424 46 97
> http://www.pandasoftware.es
> Panda Software, una de las principales compa??as desarrolladoras de
> soluciones de protecci?n contra virus e intrusos, presenta su nueva
> familia de soluciones. Todos los usuarios de ordenadores, desde las
> redes m?s grandes a los dom?sticos, disponen ahora de nuevos productos
> con excelentes tecnolog?as de seguridad. M?s informaci?n en:
> http://www.pandasoftware.es/productos
>
>
>
> ?Prot?jase ahora contra virus e intrusos! Pruebe gratis nuestros
> productos en http://www.pandasoftware.es/descargas/
>
>
>
>
>
>
>
>
>
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: fsync and battery-backed caches
@ 2006-02-28 17:27 Javier Somoza <jsomoza@pandasoftware.es>
parent: Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 1 reply; 8+ messages in thread
From: Javier Somoza @ 2006-02-28 17:27 UTC (permalink / raw)
To: Jim C. Nasby <jnasby@pervasive.com>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; Tino Wildenhain <tino@wildenhain.de>; pgsql-performance
Ups sorry.
> Actually, you can't assume that a BBU means you can safely disable
> full-page-writes. Depending on the controller, it's still possible to
> end up with partially written pages.
>
> BTW, if your mailer makes doing so convenient, it would be nice to trim
> down your .signature; note that it's about 3x longer than the email you
> actually sent.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: fsync and battery-backed caches
@ 2006-02-28 21:09 Jim C. Nasby <jnasby@pervasive.com>
parent: Javier Somoza <jsomoza@pandasoftware.es>
0 siblings, 0 replies; 8+ messages in thread
From: Jim C. Nasby @ 2006-02-28 21:09 UTC (permalink / raw)
To: Javier Somoza <jsomoza@pandasoftware.es>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; Tino Wildenhain <tino@wildenhain.de>; pgsql-performance
Ok, you absolutely can't guarantee you won't get partial page writes
then. A UPS buys you no more data safety than being plugged directly
into the wall. UPS's fail. People trip over cords. Breakers fail. Even
if you have multiple power supplies on multiple circuits fed by
different UPS's you can *still* have unexpected power failures. The
'master' for distributed.net had exactly that happen recently; the two
breakers feeding it (from 2 seperate UPS's) failed simultaneously.
In a nutshell, having a server on a UPS is notthing at all like having a
BBU on the raid controller: commiting to the BBU is essentially the same
as committing to the drives, unless the BBU runs out of power before the
server has power restored, or fails in some similar fasion. But because
there's many fewer parts involved, such a failure of the BBU is far less
likely than a failure up-stream.
So, if you want performance, get a controller with a BBU and allow it to
cache writes. While you're at it, try and get one that will
automatically disable write caching if the BBU fails for some reason.
On Tue, Feb 28, 2006 at 06:27:34PM +0100, Javier Somoza wrote:
>
> Ups sorry.
>
>
> > Actually, you can't assume that a BBU means you can safely disable
> > full-page-writes. Depending on the controller, it's still possible to
> > end up with partially written pages.
> >
> > BTW, if your mailer makes doing so convenient, it would be nice to trim
> > down your .signature; note that it's about 3x longer than the email you
> > actually sent.
>
>
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2006-02-28 21:09 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-27 10:03 fsync and battery-backed caches Javier Somoza <jsomoza@pandasoftware.es>
2006-02-27 10:12 ` Tino Wildenhain <tino@wildenhain.de>
2006-02-28 00:22 ` Jim C. Nasby <jnasby@pervasive.com>
2006-02-28 01:06 ` Bruce Momjian <pgman@candle.pha.pa.us>
2006-02-28 08:19 ` Javier Somoza <jsomoza@pandasoftware.es>
2006-02-28 17:23 ` Jim C. Nasby <jnasby@pervasive.com>
2006-02-28 17:27 ` Javier Somoza <jsomoza@pandasoftware.es>
2006-02-28 21:09 ` Jim C. Nasby <jnasby@pervasive.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox