[Gluster-devel] Question about EC locking
xhernandez at datalab.es
Mon Nov 28 08:17:58 UTC 2016
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
> Gluster-devel mailing list
> Gluster-devel at gluster.org
More information about the Gluster-devel