LVM Version 2.0 Volume Groups in HP-UX 11i v3 (September 2008)

The extent size affects the following:
The maximum volume group size you can select when creating a volume group.
The amount of disk space reserved for the metadata.
The memory footprint used by the activated volume group.
The I/O performance (for the case where the logical volume is not striped).
The resynchronization time of the mirrors in some particular cases.
The minimum size of a logical volume.
As shown in Figure 2, “Maximum volume group size versus extent size”, on page 21, the maximum size of a
volume group dictates a minimum extent size. You can pick this minimum value or a larger value.
A larger extent size uses less disk space for metadata and reduces the volume group memory footprint. To
understand the relationship, see the Figure 1, “Space reserved on each disk for 2.x metadata”, on page 17 and
Figure 4, “Maximal memory footprint, all extents allocated, max number of LVs and PVs”, on page 24.
As an example, suppose you want a volume group that can grow to 128 TB. Figure 2, “Maximum volume group
size versus extent size”, shows that the minimum extent size is 4 MB. As a consequence, you can pick an extent
size between 4 MB and 256 MB.
For the amount of disk space used for metadata (on each disk), See Figure 1, “Space reserved on each disk for
2.x metadata”. The metadata disk space used is between approximately 520 MB for 4 MB extents and 20 MB
for 256 MB extents.
For the memory footprint, see Figure 3, “Maximal memory footprint, all extents allocated, max number of LVs and
PVs”. The chart shows about 950 MB for 4 MB extents and 27 MB for 256 MB extents. However, these figures
represent the full usage of 128 TB of the volume group. In the following year, you expect to use only half the
capacity of the volume group (64 TB). Reading the chart using 64 TB as the volume group size instead of 128 TB,
you can see about 500 MB for 4 MB extents and 20 MB for 256 MB extents. You can examine the chart for other
extents sizes between 4 MB and 256 MB.
Notes:
This maximum memory footprint chart gives the worst case memory footprint for a given volume group
size and extent size. In addition to using all the extents and the maximum number of logical volumes and
physical volumes, a specific configuration of the mirrors is needed to reach this worst case. Most likely the
actual footprint in a user configuration will be smaller.
The impact of the number of logical and physical volumes on the memory footprint is negligible.
For the example, you now have a good idea of how much disk and memory overhead you can incur depending
on the extent size.
There is an incentive to use large extents because it reduces the LVM overhead in term of disk space and memory
footprint. However, before selecting the extent size, you must consider three other factors.
The most important is the size of logical volumes. The minimum disk space allocation to a logical volume is one
extent. As a consequence, it makes sense to select a small extent size for a volume group containing a lot of very
small logical volumes. It avoids wasting disk space if a lot of small logical volumes are needed or used.
Another factor to consider is related to user I/O performance. If you want to use extent based striping (lvcreate –D
y), smaller extents give better throughput. However, you can obtain equal or better I/O throughput with striped
logical volumes (lvcreate –i). As a consequence, you can keep large extents and still get excellent I/O throughput
by using striped logical volumes.
20