[Gluster-users] cluster.readdir-optimize
Xavi Hernandez
jahernan at redhat.com
Thu Feb 18 08:15:43 UTC 2021
Hi Zenon,
On Wed, Feb 17, 2021 at 11:33 AM Zenon Panoussis <oracle at provocation.net>
wrote:
>
> I am trying to understand how cluster.readdir-optimize works
> on a full replica N volume.
>
> https://lists.gluster.org/pipermail/gluster-devel/2016-November/051417.html
>
> suggests that this setting can be useful on distributed
> volumes. On full replica volumes, every brick has 100% of
> the information required by readdir, so logically every
> request should be satisfied locally without any network
> traffic between bricks even if cluster.readdir-optimize
> is off. Is that not the case?
>
cluster.readdir-optimize is an option for the distribution layer, not the
replication layer.
On a distributed-replicated volume, each replicated subvolume has a full
copy of the entire directory structure. Only files are created on one of
the subvolumes. When the distribution layer wants to read one directory it
needs to scan the directory contents of each replicated subvolume to locate
all available files, but the list of subdirectories will be the same on all
subvolumes (when everything is healthy). For this reason, once the
directory contents of the first subvolume are read, there's no need to
retrieve the subdirectories from the other subvolumes, only files are
needed.
This option tells bricks to only return file entries when reading a
directory (except for the first subvolume), reducing the number of disk
accesses in some cases and the amount of data sent through the network.
This is specially useful for big volumes with many subvolumes and very big
directory structures.
Regards,
Xavi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20210218/11e465bd/attachment.html>
More information about the Gluster-users
mailing list