Re: LVM performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux