[Lustre-discuss] Question regarding caution statement in 1.8 manual for the consistent mode flock option

Oleg Drokin Oleg.Drokin at Sun.COM
Fri Mar 5 22:38:30 PST 2010


Hello!

On Mar 5, 2010, at 5:25 PM, Andreas Dilger wrote:

> On 2010-03-05, at 15:18, Jagga Soorma wrote:
>> Is there an impact if the option is turned on, or only if it is  
>> turned on and used?  Is the impact local to the file being locked,  
>> the machine on which that file is locked, or the entire set of  
>> machines mounting that lustre file system?
> It only affects the performance of the file that is being flocked.  If  
> it is enabled and no applications are using flock then it has no effect.

Actually another side effect is if you have a lot of flock activity going on
that might put a lot of (cpu) load on your MDS esp. if there are a lot of
conflicts.

Another gotcha is some application might try to use flock when they see
functionality as available and this is pretty slow on lustre, every
lock/unlock request directly translates to an RPC.

And lastly speaking of real flock (not posix locking through fcntl) there is
one additional limitation, you can't actually pass on a file descriptor to another
process and inherit the lock there (classic example you can find in any book
is that if you do flock, then fork, your child process can close/unlock the
file and parent process will lose the lock too. Does not happen with Lustre)

Bye,
    Oleg



More information about the lustre-discuss mailing list