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

2010-03-05 Thread Jagga Soorma
Hi Guys,

Thanks Andreas for pointing me to the flock options.  However, I see the
following caution statement for the consistent mode:

--
CAUTION: This mode has a noticeable performance impact and may affect
stability, depending on the Lustre version used. Consider using a newer
Lustre version which is more stable.
--

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?

Thanks in advance,
-J
___
Lustre-discuss mailing list
Lustre-discuss@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss


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

2010-03-05 Thread Andreas Dilger
On 2010-03-05, at 15:18, Jagga Soorma wrote:
 Thanks Andreas for pointing me to the flock options.  However, I see  
 the following caution statement for the consistent mode:

 --
 CAUTION: This mode has a noticeable performance impact and may  
 affect stability, depending on the Lustre version used. Consider  
 using a newer Lustre version which is more stable.
 --

 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.

It used to be that we defaulted to localflock behaviour, which has  
minimal performance impact, but that was confusing to applications.   
The noflock default now reports an error as you saw and it is up to  
the administrator to pick either localflock (fastest, low impact,  
not coherent between nodes) or flock (slower, performance impact for  
use, coherent between nodes).

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

___
Lustre-discuss mailing list
Lustre-discuss@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss


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

2010-03-05 Thread Oleg Drokin
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
___
Lustre-discuss mailing list
Lustre-discuss@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss