From: torn5 <torn5@shiftmail.org>
To: Theodore Tso <tytso@MIT.EDU>
Cc: torn5 <torn5@shiftmail.org>, Josef Bacik <josef@redhat.com>,
Jon Leighton <j@jonathanleighton.com>,
linux-ext4@vger.kernel.org
Subject: Re: Severe slowdown caused by jbd2 process
Date: Sun, 23 Jan 2011 00:22:19 +0100 [thread overview]
Message-ID: <4D3B66AB.6030102@shiftmail.org> (raw)
In-Reply-To: <EF21BE9C-2457-4C17-A667-9839E23C58B8@mit.edu>
On 01/22/2011 08:37 PM, Theodore Tso wrote:
> On Jan 22, 2011, at 11:21 AM, torn5 wrote:
>> Is the fsync in a nobarrier mount totally swallowed?
>>
> No. It will still cause a journal commit, and send disk writes down to the HDD. How those disk writes will be interpreted by the HDD is completely up to the HDD's firmware.
...
>> If not:
>> a) what guarantees does it provide in a nobarrier situation and
>>
> As long as there is not a power failure (or disk failure, of couse), those disk writes will eventually hit the platter. ....
VERY interesting
thanks for the explanation
>> b) is there a "fakefsync" mount option or some other way to make it a no-op? (I understand the risk, and the fact that this is actually a change in the application's logic)
>>
> No, sorry. Usually the fsync is there for a good reason, and if fsync's are completely eliminated, you have absolutely no guarantees at all. (Kernel panics, reset buttons, etc., all will cause the database to be totally scrambled.) Providing such a knob to system administrators who might use it to "speed up" their application, is considered a bit of an attractive nuisance
>
Sometimes it's useful, and that's the reason why Postgresql and Mysql
both have a no-fsync mode.
Sometimes you have to do something for which intermediate state doesn't
matter. Think at it as a computation: if it fails, you restart it from
the beginning. In scientific research this is often the case. Often to
save time you use software already written, which might have an
excessively conservative behaviour for a "computation" , and this slows
down your computation. But rewriting such application is simply too
much, so you end up waiting patiently... that's why a fakefsync mount
option would be nice to have.
Anyway, you said fsyncs in nobarriers mode (only?) generate a journal
commit and push writes to the HDD.
Then if I also disable the journal the only thing that remains is the
push of data to the HDD, right?
This is near to a no-op I would say because data should have gone to the
disks earlier or later... Ow... oh no, it's not, because you wait for
the disk to return a completion and in the meanwhile you cannot use the
CPU. Right? Ok so for a single threaded app there is indeed difference.
May I ask how is this "push of data to the disk" implemented: does it
skip the request queue for the disk (i.e. jumps ahead of the queue), or
has other kinds of special priority, or it is submitted to the tail like
normal and the fysnc waits patiently for it to reach the disk?
Thank you for all these explanations
next prev parent reply other threads:[~2011-01-22 23:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 0:13 Severe slowdown caused by jbd2 process Jon Leighton
2011-01-21 1:31 ` Josef Bacik
[not found] ` <1295601083.5799.3.camel@tybalt>
2011-01-21 12:59 ` Josef Bacik
2011-01-21 14:03 ` Josef Bacik
2011-01-21 14:28 ` Jon Leighton
2011-01-21 14:31 ` Josef Bacik
2011-01-21 23:56 ` Ted Ts'o
2011-01-22 1:11 ` torn5
2011-01-22 1:34 ` Ted Ts'o
2011-01-22 16:21 ` torn5
2011-01-22 19:37 ` Theodore Tso
2011-01-22 23:22 ` torn5 [this message]
2011-01-23 5:17 ` Ted Ts'o
2011-01-23 18:43 ` torn5
2011-01-24 20:16 ` Ted Ts'o
2011-01-22 13:05 ` Ric Wheeler
2011-01-24 20:41 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D3B66AB.6030102@shiftmail.org \
--to=torn5@shiftmail.org \
--cc=j@jonathanleighton.com \
--cc=josef@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@MIT.EDU \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).