Re: cluster.readdir-optimize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Zenon,

On Wed, Feb 17, 2021 at 11:33 AM Zenon Panoussis <oracle@xxxxxxxxxxxxxxx> 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
________



Community Meeting Calendar:

Schedule -
Every 2nd and 4th Tuesday at 14:30 IST / 09:00 UTC
Bridge: https://meet.google.com/cpu-eiue-hvk
Gluster-users mailing list
Gluster-users@xxxxxxxxxxx
https://lists.gluster.org/mailman/listinfo/gluster-users

[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux