Re: Background fsck

From: Ivan Voras <ivoras(at)freebsd(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Background fsck
Date: 2011-04-07 13:31:50
Message-ID: inkec6$ful$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 07/04/2011 00:48, Scott Marlowe wrote:
> On Wed, Apr 6, 2011 at 4:33 PM, Ireneusz Pluta<ipluta(at)wp(dot)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Achilleas Mantzios 2011-04-07 14:01:02 Re: Background fsck
Previous Message Thom Brown 2011-04-07 08:01:58 Re: Partial index slower than regular index