From: torn5 <torn5@shiftmail.org>
To: Ted Ts'o <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 19:43:10 +0100 [thread overview]
Message-ID: <4D3C76BE.3090908@shiftmail.org> (raw)
In-Reply-To: <20110123051718.GA3237@thunk.org>
On 01/23/2011 06:17 AM, Ted Ts'o wrote:
>
>> that's why a fakefsync mount option would be nice to have.
>>
> Yes, except the file system developers don't want to take on the moral
> liability of system administrators using such a mount option
> incorrectly.
I understand
> The fsync waits for all data to be sent to disk. It has to; since we
> can't easily, given the current disk protocols, distinguish between
> the 5 MB of I/O that pertains to file A which is being fsync'ed, but
> not the 20 MB of I/O pertaining to file B which is going on in the
> background.
So it's a queue drain + cache flush, right?
> There is a way, for some newer disk drives, to do what's
> called a FUA (Force Unit Attention) ...
>
I thought it was possible via the completion notifications from the disk.
AFAIK if a disk is in NCQ mode it will return completion for a command
only when the write was really delivered to the platters. While in
non-NCQ mode the disk immediately returns completion and caches the
write. Is this correct?
Oh ok but that's not the problem, I understand now, the problem is that
you want to see all 5MB of data delivered to the platters, not only 1
write command...
So the only way is a queue drain.
So if we want to see faster fsyncs we have to reduce the nr_requests of
a disk, so that the request_queue is short, right?
There were ideas around for an API for dependencies among BIOs.
e.g. here:
https://lwn.net/Articles/399148/
This would solve the problem of needing a queue drain for an fsync,
right? Ext4 could make the last BIO of the file being synced to depend
on all the other BIOs related to the same file, and then wait the NCQ
completion notification for the last BIO. There wouldn't be a need to to
drain the queue any more.
At that point it could even make sense to make all fsyncs-related I/O to
jump at the head of the request_queue, so that fsyncs (hopefully related
to small amounts of data) could return quickly even when there is a
large file streaming or copy in the background filling the whole
request_queue...
Does what I'm saying make sense?
I understand this feature would require major changes in Linux though...
Thank you for all these explanations,
these things really help us ignorant ext4 users understand...
next prev parent reply other threads:[~2011-01-23 18:44 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
2011-01-23 5:17 ` Ted Ts'o
2011-01-23 18:43 ` torn5 [this message]
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=4D3C76BE.3090908@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).