[Bugs] [Bug 1478411] New: Directory listings on fuse mount are very slow due to small number of getdents () entries

bugzilla at redhat.com bugzilla at redhat.com
Fri Aug 4 13:56:14 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1478411

            Bug ID: 1478411
           Summary: Directory listings on fuse mount are very slow due to
                    small number of getdents() entries
           Product: GlusterFS
           Version: 3.10
         Component: core
          Assignee: bugs at gluster.org
          Reporter: nh2-redhatbugzilla at deditus.de
                CC: bugs at gluster.org



I have a GlusterFS 3.10 volume and mounted it with the fuse mount (`mount -t
glusterfs`), both on Linux.

On it I have a directory with 1 million files in it.

It takes very long to `find /that/directory`.

Using `strace`, I believe I discovered (at least part of) the reason:

1501854600.235524 getdents(4, /* 20 entries */, 131072) = 1048
1501854600.235727 getdents(4, /* 20 entries */, 131072) = 1032
1501854600.235922 getdents(4, /* 20 entries */, 131072) = 1032

Despite `find` issuing `getdents()` with a large buffer size of 128K, glusterfs
always only fills in 20 directory entries.

Each of those takes a network roundtrip (seemingly).

I also strace'd the brick on the server, where everything seems fine: There
getdents() returns typically 631 entries, filling the 32KB buffer which the
brick implementation uses for getdents().

If the find could also do ~631 per call, my directory listing would probably be
30x faster!

So it seems like _something_ in gluster or fuse caps the number of getdents
results per call to roughly 20.

What could that be?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list