From: Dave Chinner <david@fromorbit.com>
To: Gionatan Danti <g.danti@assyoma.it>
Cc: linux-xfs@vger.kernel.org
Subject: Re: CFQ or BFQ scheduler and XFS
Date: Mon, 24 Jan 2022 09:52:01 +1100 [thread overview]
Message-ID: <20220123225201.GK59729@dread.disaster.area> (raw)
In-Reply-To: <8bb2c601dfffd38c2809c7c6f6a369a5@assyoma.it>
On Sun, Jan 23, 2022 at 10:27:32PM +0100, Gionatan Danti wrote:
> Hi list,
> I have a question about CFQ scheduler and the old warning one can find on
> the faq page: "As of kernel 3.2.12, the default i/o scheduler, CFQ, will
> defeat much of the parallelization in XFS".
>
> Can I ask for more information about the bad interaction between CFQ and
> XFS, and especially why it does defeat filesystem parallelization? Is this
> warning still valid? What about the newer BFQ?
CFQ doesn't understand that IO from different threads/tasks are
related and so it cannot account for/control multi-threaded IO
workloads. Given that XFS's journal IO is inherently a
multi-threaded IO workload, CFQ IO accounting and throttling simply
does not work properly with XFS or any other filesystem that
decouples IO from the user task context that requires the IO to be
done on it's behalf.
> Note: I always used deadline or noop with XFS, but I am facing a disk with
> random read starvation when NCQ is enabled and a mixed sequential & random
> load happens. So far I saw that the only scheduler (somewhat) immune to the
> issue is CFQ, probably because it does not mix IO from multiple processes
> (it issue IO from one process at time, if I understand it correctly).
And, as per above, that's exactly why it doesn't work well with XFS...
Read starvation during sequential writes sounds more like a problem
with the block layer writeback throttle or something you need to
use an IO controller (blk-cgroups) to address, not try to fix with a
IO scheduler...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2022-01-23 22:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-23 21:27 CFQ or BFQ scheduler and XFS Gionatan Danti
2022-01-23 22:52 ` Dave Chinner [this message]
2022-01-24 7:55 ` Gionatan Danti
2022-01-24 21:13 ` Dave Chinner
2022-01-25 0:42 ` Gionatan Danti
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=20220123225201.GK59729@dread.disaster.area \
--to=david@fromorbit.com \
--cc=g.danti@assyoma.it \
--cc=linux-xfs@vger.kernel.org \
/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).