What is the correct sector size (which available in Powershell as options, when creating a new vhdx) for RAID10 array with default stripe size? I am using LSI 9271-4i controller and 4x Seagate ST3300657SS in Hyper-V 2012 R2 enviroment.
Correct VHDX sector size in Hyper-V enviroment for a RAID array
hardware-raidhyper-vlsiraidvhd
Related Solutions
The logic for when Linux applies read-ahead is complicated. Starting in 2.6.23 there's the really fancy On-Demand Readahead, before that it used a less complicated prediction mechanism. The design goals of read-ahead always include not doing read-ahead unless you have a read access pattern that justifies it. So the idea that the stripe size is a relevant piece of data here is fundamentally unsound. Individual reads that are on that end of the file I/O range, below the stripe size, aren't normally going to trigger the read-ahead logic and have it applied to them anyway. Tiny values of read-ahead effectively turn the feature off. And you don't want that.
When you really are doing sequential I/O to a large RAID10 array, the only way to reach the full throughput of many systems is to have read-ahead working for you. Otherwise Linux won't dispatch requests fast enough to keep the array reading to its full potential. The last few times I've tested larger disk arrays of RAID10 drives, in the 24 disk array range, large read-ahead settings (>=4096 = 2048KB) have given 50 to 100% performance gains on sequential I/O, as measured by dd or bonnie++. Try that yourself; run bonnie++, increase read-ahead a lot, and see what happens. If you have a large array, that will quickly dispel the idea that read-ahead numbers smaller than typical stripe sizes make any sense.
The Linux kernel is so aware of this necessity that it even automatically increases read-ahead for you when you create some types of arrays. Check out this example from a system with a 2.6.32 kernel:
[root@toy ~]# blockdev --report
RO RA SSZ BSZ StartSec Size Device
rw 256 512 4096 0 905712320512 /dev/md1
rw 768 512 512 0 900026204160 /dev/md0
Why is read-ahead 256 (128KB) on md1 while it's 768 (384KB) on md0? That's because md1 is a 3-disk RAID0, and Linux increases read-ahead knowing it has no hope of achieving full speed across an array of that size with the default of 256. Even that's actually too low; it needs to be 2048 (1024KB) or larger to hit the maximum speed that small array is capable of.
Much of the lore on low-level RAID settings like stripe sizes and alignment is just that: lore, not reality. Run some benchmarks at a few read-ahead settings yourself, see what happens, and then you'll have known good facts to work with instead.
As usual, to answer this question you should ask yourself what stripe size is and what does it impact to:
The smaller it is the closer data is interleaved and more smoothly (equally) workload is being spread, but it also means more devices and (more often) would be involved when doing even small I/O — read "busy".
The higher it is, the less benefits of load distribution would have theirs chance to happen when dealing with single file (it could sit entirely on one disk only). But it would keep other disks free, so they could process requests to other files at the same time.
My usual choice is large chunks (stripes) and I think for "20 VMs" scenario it should be exactly the same.
Best Answer
This depends more on what guest OS you intend to use the VHD with than it does on the physical storage subsystem. (In general, with virtualization, you want to separate the physical characteristics from the virtual characteristics, so that you can move your VM from one host to another.)
If your guest OS supports 4K disks, then you'll probably get better performance for a big VHD by using 4K sectors. If your guest OS doesn't support 4K disks, you'll be really frustrated if you use them.
And if the VHD is small, then probably none of this matters much. 4K disks are a much bigger deal when the disk is large.