[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <4D3A2EC6.3020700@shiftmail.org>
Date: Sat, 22 Jan 2011 02:11:34 +0100
From: torn5 <torn5@...ftmail.org>
To: Ted Ts'o <tytso@....edu>
Cc: Josef Bacik <josef@...hat.com>,
Jon Leighton <j@...athanleighton.com>,
linux-ext4@...r.kernel.org
Subject: Re: Severe slowdown caused by jbd2 process
On 01/22/2011 12:56 AM, Ted Ts'o wrote:
> On Fri, Jan 21, 2011 at 09:31:45AM -0500, Josef Bacik wrote:
>
>> Yup, whatever you are doing in your webapp is making your database do lots of
>> fsyncs, which is going to suck. If you are on a battery backed system or just
>> don't care if you lose your database and rather it be faster you can mount your
>> ext4 fs with -o nobarrier. Thanks,
>>
> Note that if you don't use -o barrier on ext3, or use -o nobarrier on
> ext4, the chance of significant file system damage if you have a power
> failure, since without the barrier, the file system doesn't wait for
> disk to acknowledge that the data has hit the barrier. The problem is
> that if you are using a barrier operation, you're not going to be able
> to get more than about 30-50 non-trivial[1] fsync's per second on a
> standard HDD; barriers are inherently slow.
>
I think that currently the fsyncs have a double meaning: they are used
to make a filesystem operation happen before another filesystem
operation, and to make a filesystem operation happen before a network
operation. I don't think the second case can be speeded up (there can be
a distributed transaction involved) but the first could probably be
speeded up, but I'm thinking how...
Do you think nobarrier + data=journal would provide the same guarantees
of barrier and almost the same performances of nobarrier (for random I/O)?
Hmm maybe you need the barriers enabled to make even data=journal work
reliably?
But then there should be a mount option (barriersonlyjournal?) so that
barriers are only generated every so many seconds and only for
committing a big transaction to the journal, while applications' fsyncs
would be made with nobarriers.
This should provide the benefits I mentioned, for disk-to-disk
sequentiality (not disk-to-network), shouldn't it?
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists