LTG and max_transfer on AIX
One of the characteristics of pre-AIX 5L volume management was that no disk I/Os were passed from the LVM to any device driver in sizes greater than the LTG size of 128k bytes. Large disk I/O requests made by applications were broken up by the LVM on LTG alignments. So, a one million byte (1MB) disk I/O request resulted in at least eight discrete requests to the disk device driver. For the case of a single reader or writer thread operating on a disk, this was not a performance limiting problem. However, if a number of threads were doing I/O to the disk, the breaking up of I/O requests could result in additional seeks, reducing aggregate throughput.
Starting in AIX 5.2, the maximum size of an I/O passed from an application to the underlying disk device driver is tunable. Throughput can be optimized by setting LVM’s LTG to match the disk’s max_transfer size.
The configurable maximum transfer size per hdisk setting allows the maximum size of an I/O to the disk to reach up to 1MB using an LVM LTG size of 1MB. This enables an application to issue an I/O the size of an LTG and have that I/O passed as a single request to the underlying disk, as long as it does not cross an LVM partition boundary. If the max_transfer size is not changed then the default setting is 256K.
The max_transfer size can be changed on a per hdisk device using the following commands.
To view the allowable range use the following command:
lsattr -R -a max_transfer -l hdiskx
Which should return the following:
0×20000 0×40000 0×80000 0×100000 0×200000 0×400000 0×800000 0×1000000
The following command will only give you the current max_transfer setting of hdiskx:
lquerypv -M hdiskx
Which should return something like:
256
To change the disk max_transfer size, to for example 512KB, use the following series of commands:
rmdev -l hdiskx chdev -l hdiskx -a max_transfer=0×80000 mkdev -l hdiskx
No problem if the disk is used in a volume group and has data, you can still change its max_transfer size. For these disks you must use the following procedure:
varyoffvg vg_name exportvg vg_name rmdev -l hdiskx chdev -l hdiskx -a max_transfer=0×80000 mkdev -l hdisk importvg -y vg_name hdiskx
Use the following command to view your changes.
lquerypv -M hdiskx
Which should return:
512
The value of the LTG size parameter on AIX 5.2 must be 128, 256, 512, or 1024. In addition, it should be less than or equal to the max_transfer size of all disks in the volume group. The default size of LTG is 128 kilobytes. For changing the LTG size of a VG, to for example 512, run the following command by root user:
chvg -L 512 VG_name
Reference: http://flickerdown.com/2009/04/powerpath-aix-53-and-ltg-solutions