Re: Linux MD RAID 1 read performance tunning
From: Goswin von Brederlow <hidden>
Date: 2009-12-24 12:41:56
"Ciprian Dorin, Craciun" [off-list ref] writes:
Thanks all for your feedback. (I haven't tried the proposed three
dd's in parallel, but I promise I'll try them the next time I assemble
my backup array.)
But one observation though:
* indeed my usage of the array was mono-process;
* when reading from the array to construct the MD5 sums for the
files I've used only one process;
* indeed the data was read from a single disk (at a time);
* but now the interesting think comes: I think it favored one disk
(the same most of the time) over the others;
Is this as expected?
Thanks again,
Ciprian.
I don't think it should favour any one disk in particular. But it
might be that if all disks are at the same place (e.g. you just wrote
something) it will always pick the first one. You have to check the
source for that or maybe Neil knows from memory.
But you can tune this:
-W, --write-mostly
subsequent devices listed in a --build, --create, or
--add com- mand will be flagged as 'write-mostly'. This
is valid for RAID1 only and means that the 'md' driver
will avoid reading from these devices if at all
possible. This can be useful if mirror- ing over a slow
link.
--write-behind=
Specify that write-behind mode should be enabled (valid
for RAID1 only). If an argument is specified, it will
set the maxi- mum number of outstanding writes allowed.
The default value is 256. A write-intent bitmap is
required in order to use write- behind mode, and
write-behind is only attempted on drives marked as
write-mostly.
Since you mentioned that you have different speeds on the disks maybe
you should set this for the slow drive(s).
MfG
Goswin