Name
gpfsMultipleAccessRange_t - Defines prefetching and write-behind file access for an application.
Structure
typedef struct
{
offset_t blockNumber; /* data block number to access */
int start; /* start of range (from beginning of block) */
int length; /* number of bytes in range */
int isWrite; /* 0 - READ access 1 - WRITE access */
char padding[4];
} gpfsRangeArray_t;
typedef struct
{
int structLen;
int structType;
int accRangeCnt;
int relRangeCnt;
gpfsRangeArray_t accRangeArray[GPFS_MAX_RANGE_COUNT];
gpfsRangeArray_t relRangeArray[GPFS_MAX_RANGE_COUNT];
} gpfsMultipleAccessRange_t;
Description
The application defines prefetching and write-behind access where the application will soon access the portions of the blocks specified in accRangeArray and has finished accessing the ranges listed in relRangeArray. (The size of a block is returned in the st_blksize field of the stat command, so the offset, OFF, of a file is in the block, OFF/st_blksize.)
GPFS already recognizes sequential and strided file access patterns. Applications that use such patterns should not need to use this hint, as GPFS will automatically recognize the pattern and perform prefetching and write-behind accordingly. In fact, using the multiple access range hint in programs having a sequential or strided access pattern may actually degrade performance due to the extra overhead to process the hints.
Notice that the units of prefetch and release are file blocks, not file offsets. If the application intends to make several accesses to the same block, it will generally get better performance by including the entire range to be accessed in the GPFS_MULTIPLE_ACCESS_RANGE hint before actually doing a read or write. A sample program gpfsperf, which demonstrates the use of the GPFS_MULTIPLE_ACCESS_RANGE hint, is included in the GPFS product and installed in the /usr/lpp/mmfs/samples/perf directory.
Members
On output, the number of processed ranges, the first n, of the given ranges.