[Lustre-discuss] programmatic access to parameters

Andreas Dilger adilger at sun.com
Wed Mar 24 16:46:48 PDT 2010


On 2010-03-23, at 14:25, burlen wrote:
> How can one programmatically probe the lustre system an application is
> running on?

Lustre-specific interfaces are generally "llapi_*" functions, from  
liblustreapi.

> At compile time I'd like access to the various lustre system limits ,
> for example those listed in ch.32 of operations manual.

There are no llapi_* functions for this today.  Can you explain a bit  
better what you are trying to use this for?

statfs(2) will tell you a number of limits, as will pathconf(3), and  
those are standard POSIX APIs.

> Incidentally one I didn't see listed in that chapter is the maximum  
> number of OST's a single file can be striped across.

That is the first thing listed:

>> 32.1	Maximum Stripe Count
>> The maximum number of stripe count is 160. This limit is hard- 
>> coded, but is near the upper limit imposed by the underlying ext3  
>> file system. It may be increased in future releases. Under normal  
>> circumstances, the stripe count is not affected by ACLs.
>>
> At run time I'd like to be able to probe the size (number of OSS, OST
> etc...) of the system the application is running on.


One shortcut is to specify "-1" for the stripe count will stripe a  
file across all available OSTs, which is what most applications want,  
if they are not being striped over only 1 or 2 OSTs.

If you are using MPIIO, the Lustre ADIO layer can optimize these  
things for you, based on application hints.

If you could elaborate on your needs, there may not be any need to  
make your application more Lustre-aware.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.




More information about the lustre-discuss mailing list