Figure 4 Interleaving Disks Among Buses
•
Increasing the number of disks might not improve performance because the maximum efficiency
that can be achieved by combining disks in a striped logical volume is limited by the maximum
throughput of the file system itself and by the buses to which the disks are attached.
•
Disk striping is highly beneficial for applications with few users and large, sequential transfers.
However, applications that exhibit small, concurrent, random I/O (such as databases) often
see no performance gain through disk striping. Consider four disks with a stripe size of 512
bytes. Each 2K request is sent to all disks. One 2K request completes in about the same time
when the disk has been striped. However, several 2K requests are all serialized because all
the disks must seek for each request. On the nonstriped system, performance might actually
be better because each disk might service separate requests in parallel.
Determining Optimum Stripe Size
The logical volume stripe size identifies the size of each of the blocks of data that make up the
stripe. You can set the stripe size to a power of two in the range 4 to 32768 for a Version 1.0
volume group, or a power of two in the range 4 to 262144 for a Version 2.x volume group. The
default is 8192.
NOTE:
The stripe size of a logical volume is not related to the physical sector size of a disk,
which is typically 512 bytes.
How you intend to use the striped logical volume determines what stripe size you assign to it.
For best results follow these guidelines:
•
If you plan to use the striped logical volume for an HFS file system, select the stripe size that
most closely reflects the block size of the file system. The
newfs
command enables you to
specify a block size when you build the file system and provides a default block size of 8K
for HFS.
•
If you plan to use the striped logical volume for a JFS (VxFS) file system, use the largest available
size, 64K. For I/O purposes, VxFS combines blocks into extents, which are variable in size
and may be very large. The configured block size, 1K by default, is not significant in this
context.
•
If you plan to use the striped logical volume as swap space, set the stripe size to 16K for best
performance. For more information on configuring swap, see
“Administering Swap Logical
Volumes” (page 101)
.
•
If you plan to use the striped logical volume as a raw data partition (for example, for a
database application that uses the device directly), the stripe size must be as large or larger
than the I/O size for the application.
32
Configuring LVM