This appendix contains suggestions for developers of applications that will be run on systems with RAIDs. These suggestions are designed to maximize performance of the RAIDs and the applications:
Determine the typical size of reads and use this number to optimize the stripe depth. The sar(1M) command with the –d option reports the number of transfers to or from a block device and the number of bytes transferred.
Hard mount filesystems on RAIDs that are NFS mounted rather than soft mounting them. (Hard mounting waits if the server is down, so data errors are returned after the connection times out. Soft mounting doesn't wait.)
Expect different filesystem performance characteristics with RAID 3 than with a non-RAID disk. RAID 3 may not perform as you'd expect because of the many small things like inodes in a filesystem. For example, file creation and removal time may be very slow compared to data transfer times.
Use raw or direct I/O instead of a filesystem to read more than 64 KB per disk access with RAID. To find out more about direct I/O, read about the F_DIOINFO command on the fcntl(2) manual page and the O_DIRECT flag on the open(2) manual page.
Investigate using asynchronous I/O and direct I/O for large, data intensive applications if filesystem performance seems inadequate.
When using a RAID as a raw disk, try to align I/O requests on stripe boundaries and make the sizes of requests some even multiple of the stripe depth.