Hi Xavier, Thank you very much for your explanation. This helped me to understand more about locking in EC.
Best Regards JK On Mon, Nov 28, 2016 at 4:17 PM, Xavier Hernandez <xhernan...@datalab.es> wrote: > Hi, > > On 11/28/2016 02:59 AM, jayakrishnan mm wrote: > >> Hi Xavier, >> >> Notice that EC xlator uses blocking locks. Any specific reason for this? >> > > In a distributed filesystem like gluster a synchronization mechanism is a > must to avoid data corruption. > > >> Do you think this will affect the performance ? >> > > Of course the need for locks has a performance impact, and we cannot avoid > them to guarantee data integrity. However some optimizations have been > applied, specially the eager locking which allows a lock to be reused > without unlocking/locking again. > > >> (In comparison AFR first tries non blocking locks and if not >> successful, tries blocking locks then) >> > > EC also tries a non-blocking lock first. > > >> Also, why two locks are needed per FOP ? One for normal I/O and >> another for self healing? >> > > The only fop that currently needs two locks is 'rename', and only when > source and destination directories are different. All other fops only take > one lock at most. > > Best regards, > > Xavi > > >> Best regards >> JK >> >> >> _______________________________________________ >> Gluster-devel mailing list >> Gluster-devel@gluster.org >> http://www.gluster.org/mailman/listinfo/gluster-devel >> >> >
_______________________________________________ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel