XFS: How to calculate the correct sunit,swidth values for optimal performance

XFS allows to optimize for a given RAID stripe unit (stripe size) and stripe width (number of data disks) via mount options.

These options can be sometimes autodetected (for example with md raid and recent enough kernel (>= 2.6.32) and xfsprogs (>= 3.1.1) built with libblkid support) but manual calculation is needed for most of hardware raids.

The calculation of these values is quite simple:
su =
sw = <# of data disks (don't count parity disks)>

User tags

NFS rtsp lubuntu bscan zRam route /etc/network/interfaces quagga docker-compose cpanm mount debootstrap nvidia gre kernel backup apt cfq shorewall ssh fido7 KVM sg DRBD gpg Adaptec netfilter qemu vtysh tool youtube groups gdb sublime alien leap second usb ha vrrp sysfs language ps fio numa nfs4 security erase opcontrol debian perlbrew glusterfs ansible apache centos 7 ddos LSI CentOS wget virtualbox raid5 noop ipmi video freedos openvpn fail2ban dstat build tin iptables arp tun jackd Areca sftp taskset radeon graylog2 swap PTR routing performance iostat slab backtrace qcow2 puppet Salt arping oprofile iowait deb vim munin htop rpm ipmitool pvmove scsi profiling opreport APU xargs etch wordpress chromium 3Ware mariadb lenny ulimit keyboard bind equalizer newgrp find asoundrc ardour grub proxy AMD drupal dhclient docker pacemaker MODx cpu exim4 vlan mdadm flash PXE idmapd lstat MegaRAID .htaccess bash cgroups conntrack HTTPS lxc firefox SpamAssassin iops perl tiger bacula initrd java virt-install regex vrrpd rkhunter iSCSI cluster nginx virsh raid hotplug ip Swift rtl8723be sysresccd StorMan storage pulseaudio OpenStack arch exim pam OpenSSL SuperMicro source xhost rsync RT squeeze bonding parallel dns replication soa core dump top in-addr.arpa search cpu usage chroot boot gtk sysctl tzdata glxinfo tftp tar ubuntu sysctl.conf CPAN elliptics bridge corosync mkfs su mysql bug dovecot dhcp encrypt php cache lts alsa shellshock SYN LVM xen X forwarding xfs hdparm SSD dpkg git HDFS limit_conn sysrq