I read here and then that small stripe size is bad for software (and maybe hardware) RAID 5 and 6 in Linux. The rare benchmarks I saw fully agree with that.
But the explanation given by everybody is this induce more head movements. I just don't understand how a small stripe size lead to more head movements.
Let's say we have a RAID 6 setup with 4 local SAS drives.
case 1: we write 1 Gb of sequential data
The program ask the kernel to write the data, then the kernel divide it to match the stripe size and compute each chunk (data and/or parity) to be written to each disk.
The kernel is able to write to the 4 disks at the same time (with the proper disk controler).
If the written data is not fully aligned with the stripes, the kernel has only to read the first and last stripes before computing the resulting data. All other stripes will only be overwritten without any care for previous data.
Because this computing is done much faster than disks throughput, each chunk is just written next to the previous one on each disk without pause. So this is basically a sequential write on 4 disks.
How a small stripe size could slow down this ?
case 2: we write 1,000,000 x 1 kb of data at random places
1 kb is smaller than the stripe size (common stripe size is currently 512 kb)
The program asks the kernel to write some data, then some other data, and again some other, etc. For each write, the kernel has to read the current data on disk, compute the new content, and write it back to the disk. Then the heads move elsewhere and the operation is repeated 999,999 more times.
The smaller the stripe size, the faster the data is read/computed/written. Ideally a stripe size of 4 kb should be the best with modern disks (if correctly aligned).
So once again, how a small stripe size could slow down this ?