XL Fortran for AIX 8.1

User's Guide


Increasing Throughput with Logical Volume I/O and Data Striping

For performance-critical applications, the overhead of the Journaled File System (JFS) for I/O operations might slow down the program. If your program generates large scratch files, you might find that I/O bandwidth also limits its performance. Performing I/O directly to a logical volume rather than to a file system can eliminate the JFS overhead. Using data striping on the logical volume can further improve throughput or processor utilization or both.

Related Information:
Because data-striped I/O runs much faster for data items that are aligned more strictly than normal, be sure to use the -qalign Option when compiling any programs that perform logical volume I/O or data striping.

Logical Volume I/O

To use a logical volume as a file, do the following:

Attention: Do not perform this kind of I/O with any logical volume that already contains a file system; doing so will destroy the file system. You must also take any precautions necessary to ensure that multiple users or programs do not write to the same logical volume or write to a logical volume while someone else is reading from it.

Notes:

  1. A logical volume can only be opened as a single direct-access file with a record length that is a multiple of the logical volume's sector size (usually 512 bytes).

  2. I/O operations are not guaranteed to detect attempts to read or write past the end of the logical volume. Therefore, make sure that the program keeps track of the extent of the logical volume. The maximum amount of data that can be stored this way on logical volume is the size of the logical volume minus the size of one stripe. The XL Fortran I/O routines use this stripe for bookkeeping.

  3. For optimal performance of data striping, ensure that any data items that you specified in the read or write lists for a logical volume are aligned on 64-byte boundaries. The simplest way to ensure this alignment for large static arrays and common blocks is to specify the option -qalign=4k.

  4. Regardless of any STATUS='SCRATCH' or STATUS='DELETE' specifiers, neither the data in a logical volume nor the special file in /dev is destroyed by an OPEN or CLOSE statement.
Related Information:
See -qalign Option.

Data Striping

Data striping is primarily useful for increasing I/O throughput for large, direct-access scratch files. The performance benefit is greatest when a program reads and writes large objects.

When you make use of data striping, you perform I/O to a logical volume as described in Logical Volume I/O and set up the logical volume especially for high-performance striped I/O through the smit or mklv commands. You can then use the technique that is described in Naming Scratch Files to place a scratch file on a striped logical volume.

For example, consider a Fortran program that contains the following statements:

      OPEN (UNIT=42, STATUS='SCRATCH',
     +      FORM='UNFORMATTED', ACCESS='DIRECT', RECL=131072)
      ...
      OPEN (UNIT=101, STATUS='SCRATCH',
     +      FORM='UNFORMATTED', ACCESS='DIRECT', RECL=131072)

You could place the scratch files for units 42 and 101 on the raw logical volumes /dev/rlv30 and /dev/rlv31 by setting environment variables before running the program, as follows:

XLFRTEOPTS="scratch_vars=yes"
XLFSCRATCH_42="/dev/rlv30"
XLFSCRATCH_101="/dev/rlv31"
export XLFRTEOPTS XLFSCRATCH_42 XLFSCRATCH_101
Related Information:
AIX Performance Management Guide discusses the performance of data striping.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]