IBM Books

IBM General Parallel File System for AIX: Administration and Programming Reference


Communicating file access patterns to GPFS

GPFS attempts to recognize the pattern of accesses that an application makes to an open file, and optimizes its behavior accordingly. For example, GPFS can recognize sequential reads and therefore prefetch blocks in advance of when they are required by the application. However, in many cases GPFS does not recognize the access pattern of the application, or cannot optimize its data transfers. In these situations, performance may improve if the application explicitly discloses aspects of its access pattern to GPFS via the gpfs_fcntl( ) library call. These calls are exploited by MPI Version 2.0.

The gpfs_fcntl( ) library call allows application programs to pass two classes of file access information giving GPFS an opportunity to improve throughput and latency of file system requests:

  1. Hints
  2. Directives

Hints allow an application to disclose its future accesses to GPFS. Hints are always optional. Adding or removing hints from a program, even incorrectly specified hints, will never alter the meaning of a program. Hints can only affect the performance of an application. The hints that may be passed to GPFS are:

  1. gpfsAccessRange_t
  2. gpfsFreeRange_t
  3. gpfsMultipleAccessRange_t
  4. gpfsClearFileCache_t
Note:
GPFS is free to silently ignore a hint if system resources do not permit the hint to be processed.

In contrast, directives are stronger than hints. They may affect program semantics and must be either carried out by GPFS or return an error. The directives which may be passed to GPFS are:

  1. gpfsCancelHints_t
  2. gpfsDataShipStart_t
  3. gpfsDataShipMap_t
  4. gpfsDataShipStop_t

To communicate hints and directives to GPFS, an application program builds a data structure in memory, then passes it to GPFS. This data structure consists of:

The header and hints and directives that follow it are defined as C structures.

The gpfs_fcntl( ) library call takes the handle of the opened file as its first parameter and the address of the data structure as its second parameter. For complete definitions of the gpfs_fcntl( ) library call, the header, hints, and directives, see gpfs_fcntl( ) Subroutine.


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