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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gpfsDataShipStart_t Structure<br />

Name<br />

gpfsDataShipStart_t – Initiates data shipping mode.<br />

Library<br />

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

Structure<br />

typedef struct<br />

{<br />

int structLen;<br />

int structType;<br />

int numInstances;<br />

int reserved;<br />

} gpfsDataShipStart_t;<br />

Description<br />

The gpfsDataShipStart_t structure initiates data shipping mode.<br />

Once all participating threads have issued this directive for a file, <strong>GPFS</strong> enters a mode where it logically<br />

partitions the blocks of the file among a group of agent nodes. The agents are those nodes on which one<br />

or more threads have issued the <strong>GPFS</strong>_DATA_SHIP_START directive. Each thread that has issued a<br />

<strong>GPFS</strong>_DATA_SHIP_START directive <strong>and</strong> the associated agent nodes are referred to as the data shipping<br />

collective.<br />

In data shipping mode:<br />

v All file accesses result in <strong>GPFS</strong> messages to the appropriate agents to read or write the requested<br />

data.<br />

v The <strong>GPFS</strong>_DATA_SHIP_START directive is a blocking collective operation. That is, every thread that<br />

intends to access the file through data shipping must issue the <strong>GPFS</strong>_DATA_SHIP_START directive<br />

with the same value of numInstances. These threads all block within their gpfs_fcntl() subroutines<br />

until all numInstances threads have issued the <strong>GPFS</strong>_DATA_SHIP_START directive.<br />

v The number of threads that issue the <strong>GPFS</strong>_DATA_SHIP_START directive does not have to be the<br />

same on all nodes. However, each thread must use a different file h<strong>and</strong>le. The default agent mapping<br />

can be overridden using the <strong>GPFS</strong>_DATA_SHIP_MAP directive.<br />

v Applications that perform a fine-grained write, sharing across several nodes, should benefit most from<br />

data shipping. The reason for this is that the granularity of <strong>GPFS</strong> cache consistency is an entire file<br />

block, which rarely matches the record size of applications. Without using data shipping, when several<br />

nodes simultaneously write into the same block of a file, even non-overlapping parts of the block, <strong>GPFS</strong><br />

serially grants, <strong>and</strong> then releases, permission to write into the block to each node in turn. Each<br />

permission change requires dirty cached data on the relinquishing node to be flushed to disk, yielding<br />

poor performance. Data shipping avoids this overhead by moving data to the node that already has<br />

permission to write into the block rather than migrating access permission to the node trying to write the<br />

data.<br />

However, since most data accesses are remote in data shipping mode, clients do not benefit from<br />

caching as much in data shipping mode as they would if data shipping mode were not in effect. The<br />

cost to send a message to another instance of <strong>GPFS</strong> to fetch or write data is much higher than the cost<br />

of accessing that data through the local <strong>GPFS</strong> buffer cache. Thus, whether or not a particular<br />

application benefits from data shipping is highly dependent on its access pattern <strong>and</strong> its degree of block<br />

sharing.<br />

v Another case where data shipping can help performance is when multiple nodes must all append data<br />

to the current end of the file. If all of the participating threads open their instances with the O_APPEND<br />

Chapter 9. <strong>GPFS</strong> programming interfaces 349

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

Saved successfully!

Ooh no, something went wrong!