public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* readdir request re-requests entries
@ 2018-10-19 22:11 Mkrtchyan, Tigran
  2018-10-20 18:22 ` Trond Myklebust
  2018-10-20 18:57 ` Frank Sorenson
  0 siblings, 2 replies; 4+ messages in thread
From: Mkrtchyan, Tigran @ 2018-10-19 22:11 UTC (permalink / raw)
  To: linux-nfs


Dear NFS fellows,

we have notice a behavior of nfs client when iterating over a big
directory. The client re-requests entries that already has been. For
example, a client issues READDIR on a directory with 1k files. Initial cookie
is 0, maxcount 32768.

c -> s cookie 0
s -> c last cookie 159
c -> s cookie 105
s -> c last cookie 259
c -> s cookie 207

...

and so on. The interesting thing is, if I mount with rsize 8192 (maxcount 8192), then first couple
or requests are asking for correct cookies - 0, 43, 81, 105. Again 105 as with maxcount 32678. To
me it looks like that there is some kind of internal page (actually NFS_MAX_READDIR_PAGES) alignment
and entries which do not fit into initially allocated PAGE_SIZE * NFS_MAX_READDIR_PAGES memory
just get dropped.

As 30% of each reply is thrown away, listing of large directories may produce much more requests
than required.

Is it an expected behavior?

Thanks in advance,
   Tigran.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-21  3:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19 22:11 readdir request re-requests entries Mkrtchyan, Tigran
2018-10-20 18:22 ` Trond Myklebust
2018-10-20 18:22   ` Trond Myklebust
2018-10-20 18:57 ` Frank Sorenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox