CHUNK
Calculate the chunk size by using iostat
#iostat -x
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util
dm-0 0.00 0.00 0.00 4548.51 0.00 36388.12 40.00 203.91 44.83 0.02 10.69
Take the average request size and times it by 512 then divide by the amount of disks in the RAID array. So if you have a raid 5 with three disks you would divide by 2 as one of the disks is for parity, for example
(40*512)/1024/2=10
So the optimum chucnk size for this would be 8K because you always round down to the nearest 2 to the power. You can create the array with this chunk witht he following commamd
#mdadm -C /dev/md1 -l5 -n3 --chunk=8/dev/sd[def] -a yes
STRIDE
The optimum stride is calculated using chunk divided by block size so for the above array it will be
8/4=2
mke2fs -j -b 4096 -E stride=2 /dev/md1
No comments:
Post a Comment