On Wed, August 26, 2009 9:34 am, CoolCold wrote: > On Wed, Aug 26, 2009 at 2:25 AM, Neil Brown <neilb@xxxxxxx> wrote: >> >> On Sunday August 23, for.poige+linux@xxxxxxxxx wrote: >> > 2009/8/23 NeilBrown <neilb@xxxxxxx>: >> >> That is correct - chunk size only affect data layout, not IO size. >> md/raid5 always reads or writes a whole page (normally 4K) at a time. >> >> NeilBrown >> >> > > Hmm...so how read from some program -> fs -> md happens then? I.e. - > if FS has stride/stripe/swidth for, say, 64kb (and md chunk size is > 64kb), some program requests 128kb of data to be read, does it mean > we'll do 16 reads for 4kb from two drives? Even if we do, is it > right/good ? Actually it is a bit more complicated than that. Md/raid5 tries to encourage the filesystem to submit read requests is sizes that fit inside one chunk. When md/raid5 gets such a read request, and it is for a device that has not failed and no reshape is happening (and maybe some other conditions), it will forward the read request down to the drive that can serve it. If any of these conditions aren't met, then the read request will be split in to 4K chunks and each chunk will be handled separately, possibly reconstructing from other devices if that is needed etc. However if a number of consecutive 4K reads (or writes) are submitted to a device, the driver for that device will normally assemble those requests together into fewer larger requests so you shouldn't get lots of little request going out to the device unless there are lots of little requests coming down from the filesystem. NeilBrown -- 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