[gpfsug-discuss] GPFS API

Jonathan Buzzard jonathan.buzzard at strath.ac.uk
Mon Dec 17 23:04:15 GMT 2018


On 17/12/2018 17:35, Simon Thompson wrote:
> Indeed.
> 
> Actually this was exactly what we were trying to work out. We'd set
> the buf size to 0 hoping it would tell us how much we need, but we
> kept getting EINVAL back - which the docs states is invalid path, but
> actually it can be invalid bufsize as well apparently (the header
> file comments are different again to the docs).

Forgot to say performance wise calling with effectively a zero buffer 
size and then calling again with precisely the right buffer size is not 
sensible plan. Basically you end up having to do two API calls instead 
of one to save less than 1KB of RAM in 99.999% of cases. Let's face it 
any machine running GPFS is going to have GB of RAM.

That said I am not sure even allocating 1KB of RAM is sensible either. 
One suspects allocating less than a whole page might have performance 
implications.

What I do know from testing is that, two API calls when iterating over 
millions of files has a significant impact on run time over just 
allocating a bunch of memory up front on only making the one call.

JAB.

-- 
Jonathan A. Buzzard                         Tel: +44141-5483420
HPC System Administrator, ARCHIE-WeSt.
University of Strathclyde, John Anderson Building, Glasgow. G4 0NG



More information about the gpfsug-discuss mailing list