Tuning for striped logical volume I/O
Sequential and random disk I/Os benefit from disk striping.
The following techniques have yielded the highest levels of sequential I/O throughput:
- Spread the logical volume across as many physical volumes as possible.
- Use as many adapters as possible for the physical volumes.
- Create a separate volume group for striped logical volumes.
- Set a stripe-unit size of 64 KB.
- Set minpgahead to 2, using the ioo command. See Sequential read performance tuning.
- Set maxpgahead to 16 times the number of disk drives, using the ioo command. This causes page-ahead to be done in units of the stripe-unit size (64 KB) times the number of disk drives, resulting in the reading of one stripe unit from each disk drive for each read-ahead operation.
- Request I/Os for 64 KB times the number of disk drives. This is equal to the maxpgahead value.
- Modify maxfree, using the ioo command, to accommodate the change in maxpgahead (maxfree = minfree + maxpgahead). See Values for minfree and maxfree parameters.
- Use 64-byte aligned I/O buffers. If the logical volume will occupy physical
drives that are connected to two or more disk adapters, the I/O buffers used
should be allocated on 64-byte boundaries. This avoids having the LVM serialize
the I/Os to the different disks. The following code would yield a 64-byte-aligned
buffer pointer:
char *buffer; buffer = malloc(MAXBLKSIZE+64); buffer = ((int)buffer + 64) & ~0x3f;
If the striped logical volumes are on raw logical volumes and writes larger than 1.125 MB are being done to these striped raw logical volumes, increasing the lvm_bufcnt parameter with the ioo command might increase throughput of the write activity. See File system buffer tuning.
The example above is for a JFS striped logical volume. The same techniques apply to enhanced JFS, except the ioo parameters used will be the enhanced JFS equivalents.
Also, it is not a good idea to mix striped and non-striped logical volumes in the same physical volume. All physical volumes should be the same size within a set of striped logical volumes.