From: Spelic <spelic@shiftmail.org>
To: linux-raid <linux-raid@vger.kernel.org>
Subject: Raid10 algorithm for choosing the reading drive
Date: Tue, 23 Nov 2010 23:47:36 +0100 [thread overview]
Message-ID: <4CEC4488.7000703@shiftmail.org> (raw)
Hello raid ML,
in order to be able to correctly choose the layout for my new raid10
array, I would like to know one thing:
Every time a (small) read request comes in, MD has to choose one of two
drives to serve it. It is not clear to me what is the algorithm for
choosing this. I have looked at the manpages and kernel docs, but they
do not say.
E.g. I have noticed in n2 (near) mode when one process reads a big file
sequentially, only half of the drives are used. When a second thread
reads, the other drives are used. I also noticed this for raid1.
I think this is a good low level technique to avoid starvation between
two threads and avoid seeks, and with many threads it will still reduce
starvation by half and reduce seeks.
With the array in offset or far layouts, I notice all drives are used
for a single reading thread. If another streaming read process comes in,
will it compete for *all* the drives (and cause massive seeking) or will
MD assign half of the drives to one process and half to the other process?
(ok maybe for far it's reasonable to assign all drives to all processes,
but for offset it's not so clear. Also I still haven't really understood
the algorithm for near, apart from the observation above)
In general, can anybody spend a few words on the algorithm used by MD to
choose which drive(s) should serve read requests?
Thank you
reply other threads:[~2010-11-23 22:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4CEC4488.7000703@shiftmail.org \
--to=spelic@shiftmail.org \
--cc=linux-raid@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).