Skip to main content
added 261 characters in body
Source Link
wurtel
  • 16.5k
  • 1
  • 36
  • 38

You're not doing "100b" (byte? blocks? what was your intention?) chunks, you're doing 512 byte chunks. That is always slow because the RAID is using 512k chunks. That means that for every 512 bytes the RAID system has to read a 512k chunk, update 512 bytes in that chunk, compute its parity, and write the data + parity out to disk. It has to do the update, parity calculation and 512k + 512k parity write every time for each of the 1000 blocks you're writing. The read is only done once as that's kept in the buffer cache, and the entire operation only takes one RAID chunk.

So, yes, that's normal. Don't do that :-)

EDIT: the above would be true for RAID5. For RAID10 the parity isn't calculated, but for each dd block of 512 bytes there is still 2 times a write of 512k, one for each mirror. So you're still writing a total of 1000MB while updating just 512k. Possibly the system is smart enough to only write out the updated sectors, but I strongly suspect that's not what's happening. Also consider the updates to the write intent bitmap.

You're not doing "100b" (byte? blocks? what was your intention?) chunks, you're doing 512 byte chunks. That is always slow because the RAID is using 512k chunks. That means that for every 512 bytes the RAID system has to read a 512k chunk, update 512 bytes in that chunk, compute its parity, and write the data + parity out to disk. It has to do the update, parity calculation and 512k + 512k parity write every time for each of the 1000 blocks you're writing. The read is only done once as that's kept in the buffer cache, and the entire operation only takes one RAID chunk.

So, yes, that's normal. Don't do that :-)

You're not doing "100b" (byte? blocks? what was your intention?) chunks, you're doing 512 byte chunks. That is always slow because the RAID is using 512k chunks. That means that for every 512 bytes the RAID system has to read a 512k chunk, update 512 bytes in that chunk, compute its parity, and write the data + parity out to disk. It has to do the update, parity calculation and 512k + 512k parity write every time for each of the 1000 blocks you're writing. The read is only done once as that's kept in the buffer cache, and the entire operation only takes one RAID chunk.

So, yes, that's normal. Don't do that :-)

EDIT: the above would be true for RAID5. For RAID10 the parity isn't calculated, but for each dd block of 512 bytes there is still 2 times a write of 512k, one for each mirror. So you're still writing a total of 1000MB while updating just 512k. Possibly the system is smart enough to only write out the updated sectors, but I strongly suspect that's not what's happening. Also consider the updates to the write intent bitmap.

Source Link
wurtel
  • 16.5k
  • 1
  • 36
  • 38

You're not doing "100b" (byte? blocks? what was your intention?) chunks, you're doing 512 byte chunks. That is always slow because the RAID is using 512k chunks. That means that for every 512 bytes the RAID system has to read a 512k chunk, update 512 bytes in that chunk, compute its parity, and write the data + parity out to disk. It has to do the update, parity calculation and 512k + 512k parity write every time for each of the 1000 blocks you're writing. The read is only done once as that's kept in the buffer cache, and the entire operation only takes one RAID chunk.

So, yes, that's normal. Don't do that :-)