LVM performance tuning with the lvmo command
You can use the lvmo command to manage the number of LVM pbufs on a per volume group basis.
The tunable parameters for the lvmo command
are the following:
- pv_pbuf_count
- The number of pbufs that will be added when a physical volume is added to the volume group.
- max_vg_pbuf_count
- The maximum number of pbufs that can be allocated for the volume group. For this value to take effect, the volume group must be varied off and varied on again.
- global_pbuf_count
- The minimum number of pbufs that will be added when a physical volume is added to any volume group. To change this value, use the ioo command.
- aio_cache_pbuf_count
- The current total number of pbufs that are available for the aio_cache logical volume in the volume group. The maximum number of aio_cache_pbuf_count that can be allocated to the volume group is specified by the max_vg_pbuf_count parameter.
rootvg
volume
group.# lvmo -a
vgname = rootvg
pv_pbuf_count = 256
total_vg_pbufs = 768
max_vg_pbuf_count = 8192
pervg_blocked_io_count = 0
global_pbuf_count = 256
global_blocked_io_count = 20
aio_cache_pbuf_count = 512
If you want to display the current values for another volume group,
use the following command:
lvmo -v <vg_name> -a
To set the value for a tunable with the lvmo command,
use the equal sign, as in the following example:
Note: In the following
example, the pv_pbuf_count tunable is set
to 257 in the
redvg
volume group.# lvmo -v redvg -o pv_pbuf_count=257
vgname = redvg
pv_pbuf_count = 257
total_vg_pbufs = 257
max_vg_pbuf_count = 263168
pervg_blocked_io_count = 0
global_pbuf_count = 256
global_blocked_io_count = 20
Note: If you increase the pbuf value too much, you might see a degradation
in performance or unexpected system behavior.