Michael Guntsche schrieb:
That's exactly what I ment sorry for not being clear enough.
If you have a chunk size of 128KB it makes sense to align the beginning
of the PV to this as well.
I was talking about stripe size, not chunk size. That 128KB stripe size
is made up of n-1 chunks of an n-disk raid-5. In this case, 3 disks and
64KB chunk size result in 128KB stripe size.
I assume if you tell the file system about this stripe size (or it
figures it out itself, as xfs does), it tries to align its structures
such that whole-stripe writes are more likely than partial writes. This
means that md only has to write 3*64KB (2x data + parity).
If a write touches both (data_chunk_1 + offset) and (data_chunk_2 +
offset), you can calculate (parity_chunk + offset) without reading
anything. If it doesn't change all data chunks, you have to read either
* the current parity
* the data chunk(s) to be changed
* all other data chunks
to calculate parity.
So, if this 128KB write is offset by half a stripe, md has to read one
of the chunks from each stripe prior to writing so it can update parity.
Also, there are two parity chunks to write. So that's 2*64KB read +
4*64KB write.
That's what I meant with stripe-aligning the PV (and thus the LV and
thus the file system).
--
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html