Jagga Soorma
2010-Mar-05 22:18 UTC
[Lustre-discuss] Question regarding caution statement in 1.8 manual for the consistent mode flock option
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lustre.org/pipermail/lustre-discuss/attachments/20100305/7ec7c481/attachment.html
Andreas Dilger
2010-Mar-05 22:25 UTC
[Lustre-discuss] Question regarding caution statement in 1.8 manual for the consistent mode flock option
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.
Oleg Drokin
2010-Mar-06 06:38 UTC
[Lustre-discuss] Question regarding caution statement in 1.8 manual for the consistent mode flock option
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