29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

gpfsMultipleAccessRange_t Structure<br />

Name<br />

gpfsMultipleAccessRange_t – Defines prefetching <strong>and</strong> write-behind file access for an application.<br />

Library<br />

<strong>GPFS</strong> Library (libgpfs.a for AIX, libgpfs.so for Linux)<br />

Structure<br />

typedef struct<br />

{<br />

offset_t blockNumber; /* data block number to access */<br />

int start; /*start of range (from beginning of block)*/<br />

int length; /* number of bytes in range */<br />

int isWrite; /* 0 - READ access 1 - WRITE access */<br />

char padding[4];<br />

} gpfsRangeArray_t;<br />

typedef struct<br />

{<br />

int structLen;<br />

int structType;<br />

int accRangeCnt;<br />

int relRangeCnt;<br />

gpfsRangeArray_t accRangeArray[<strong>GPFS</strong>_MAX_RANGE_COUNT];<br />

gpfsRangeArray_t relRangeArray[<strong>GPFS</strong>_MAX_RANGE_COUNT];<br />

} gpfsMultipleAccessRange_t;<br />

Description<br />

The gpfsMultipleAccessRange_t structure defines prefetching <strong>and</strong> write-behind access where the<br />

application will soon access the portions of the blocks specified in accRangeArray <strong>and</strong> has finished<br />

accessing the ranges listed in relRangeArray. The size of a block is returned in the st_blksize field of the<br />

stat comm<strong>and</strong>, so the offset, OFF, of a file is in the block, OFF/st_blksize.<br />

v Up to <strong>GPFS</strong>_MAX_RANGE_COUNT, as defined in the header file gpfs_fcntl.h, blocks may be given in<br />

one multiple access range hint. The current value of <strong>GPFS</strong>_MAX_RANGE_COUNT is eight. Depending<br />

on the current load, <strong>GPFS</strong> may initiate prefetching of some or all of the blocks.<br />

v Each range named in accRangeArray that is accepted for prefetching, should eventually be released<br />

with an identical entry in relRangeArray, or else <strong>GPFS</strong> will stop prefetching blocks for this file.<br />

Note: Naming a subrange of a block in relRangeArray that does not exactly match a past entry in<br />

accRangeArray has no effect, <strong>and</strong> does not produce an error.<br />

v Applications that make r<strong>and</strong>om accesses or regular patterns not recognized by <strong>GPFS</strong> may benefit from<br />

using this hint.<br />

<strong>GPFS</strong> already recognizes sequential <strong>and</strong> strided file access patterns. Applications that use such<br />

patterns should not need to use this hint, as <strong>GPFS</strong> automatically recognizes the pattern <strong>and</strong> performs<br />

prefetching <strong>and</strong> write-behind accordingly. In fact, using the multiple access range hint in programs<br />

having a sequential or strided access pattern may degrade performance due to the extra overhead to<br />

process the hints.<br />

Notice that the units of prefetch <strong>and</strong> release are file blocks, not file offsets. If the application intends to<br />

make several accesses to the same block, it will generally get better performance by including the entire<br />

range to be accessed in the <strong>GPFS</strong>_MULTIPLE_ACCESS_RANGE hint before actually doing a read or<br />

360 <strong>GPFS</strong>: <strong>Administration</strong> <strong>and</strong> <strong>Programming</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!