pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ivan Voras <ivoras@freebsd.org>
To: pgsql-performance@postgresql.org
Subject: Re: Background fsck
Date: Thu, 07 Apr 2011 15:31:50 +0200
Message-ID: <inkec6$ful$1@dough.gmane.org> (raw)
In-Reply-To: <BANLkTim3SY4-P1xzxxfjB9BpvARfWd-Awg@mail.gmail.com>
References: <4D9CEA3F.5050603@wp.pl>
	<BANLkTim3SY4-P1xzxxfjB9BpvARfWd-Awg@mail.gmail.com>

On 07/04/2011 00:48, Scott Marlowe wrote:
> On Wed, Apr 6, 2011 at 4:33 PM, Ireneusz Pluta<ipluta@wp.pl>  wrote:
>> Hello,
>>
>> I saw some recommendations from people on the net not to use background fsck
>> when running PostgreSQL on FreeBSD. As I recall, these opinions were just
>> thoughts of people which they shared with the community, following their bad
>> experience caused by using background fsck. So, not coming any deeper with
>> underatanding why not, I use that as a clear recommendation for myself and
>> keep background fsck turned off on all my machines, regardless how much
>> faster a server could come up after a crash.
>>
>> But waiting so much time (like now) during foreground fsck of a large data
>> filesystem after unclean shutdown, makes me to come to this group to ask
>> whether I really need to avoid background fsck on a PostgreSQL machine?
>> Could I hear your opinions?

AFAIK, the reason why background fsck has been discouraged when used 
with databases is because it uses disk bandwidth which may be needed by 
the application. If you are not IO saturated, then there is no 
particular reason why you should avoid it.

> Shouldn't a journaling file system just come back up almost immediately?

It's a tradeoff; UFS does not use journalling (at least not likely in 
the version the OP is talking about) but it uses "soft updates". It 
brings most of the benefits of journalling, including "instant up" after 
a crash without the double-write overheads (for comparison, see some 
PostgreSQL benchmarks showing that unjournaled ext2 can be faster than 
journaled ext3, since PostgreSQL has its own form of journaling - the 
WAL). The downside is that fsck needs to be run occasionally to cleanup 
non-critical dangling references on the file system - thus the 
"background fsck" mode in FreeBSD.





view thread (17+ messages)  latest in thread

Message-ID: <inkec6$ful$1@dough.gmane.org>
Permalink:  ../inkec6$ful$1@dough.gmane.org/
Also on:    postgresql.org/message-id/inkec6$ful$1@dough.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: ivoras@freebsd.org
  Subject: Re: Background fsck
  In-Reply-To: <inkec6$ful$1@dough.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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