public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "tigran.mkrtchyan@desy.de" <tigran.mkrtchyan@desy.de>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: readdir request re-requests entries
Date: Sat, 20 Oct 2018 18:22:07 +0000	[thread overview]
Message-ID: <f9f24f44266292dc5fa41f633344b11cf84cc4f8.camel@hammerspace.com> (raw)
In-Reply-To: <174380207.12564567.1539987095714.JavaMail.zimbra@desy.de>

T24gU2F0LCAyMDE4LTEwLTIwIGF0IDAwOjExICswMjAwLCBNa3J0Y2h5YW4sIFRpZ3JhbiB3cm90
ZToNCj4gRGVhciBORlMgZmVsbG93cywNCj4gDQo+IHdlIGhhdmUgbm90aWNlIGEgYmVoYXZpb3Ig
b2YgbmZzIGNsaWVudCB3aGVuIGl0ZXJhdGluZyBvdmVyIGEgYmlnDQo+IGRpcmVjdG9yeS4gVGhl
IGNsaWVudCByZS1yZXF1ZXN0cyBlbnRyaWVzIHRoYXQgYWxyZWFkeSBoYXMgYmVlbi4gRm9yDQo+
IGV4YW1wbGUsIGEgY2xpZW50IGlzc3VlcyBSRUFERElSIG9uIGEgZGlyZWN0b3J5IHdpdGggMWsg
ZmlsZXMuDQo+IEluaXRpYWwgY29va2llDQo+IGlzIDAsIG1heGNvdW50IDMyNzY4Lg0KPiANCj4g
YyAtPiBzIGNvb2tpZSAwDQo+IHMgLT4gYyBsYXN0IGNvb2tpZSAxNTkNCj4gYyAtPiBzIGNvb2tp
ZSAxMDUNCj4gcyAtPiBjIGxhc3QgY29va2llIDI1OQ0KPiBjIC0+IHMgY29va2llIDIwNw0KPiAN
Cj4gLi4uDQo+IA0KPiBhbmQgc28gb24uIFRoZSBpbnRlcmVzdGluZyB0aGluZyBpcywgaWYgSSBt
b3VudCB3aXRoIHJzaXplIDgxOTINCj4gKG1heGNvdW50IDgxOTIpLCB0aGVuIGZpcnN0IGNvdXBs
ZQ0KPiBvciByZXF1ZXN0cyBhcmUgYXNraW5nIGZvciBjb3JyZWN0IGNvb2tpZXMgLSAwLCA0Mywg
ODEsIDEwNS4gQWdhaW4NCj4gMTA1IGFzIHdpdGggbWF4Y291bnQgMzI2NzguIFRvDQo+IG1lIGl0
IGxvb2tzIGxpa2UgdGhhdCB0aGVyZSBpcyBzb21lIGtpbmQgb2YgaW50ZXJuYWwgcGFnZSAoYWN0
dWFsbHkNCj4gTkZTX01BWF9SRUFERElSX1BBR0VTKSBhbGlnbm1lbnQNCj4gYW5kIGVudHJpZXMg
d2hpY2ggZG8gbm90IGZpdCBpbnRvIGluaXRpYWxseSBhbGxvY2F0ZWQgUEFHRV9TSVpFICoNCj4g
TkZTX01BWF9SRUFERElSX1BBR0VTIG1lbW9yeQ0KPiBqdXN0IGdldCBkcm9wcGVkLg0KPiANCj4g
QXMgMzAlIG9mIGVhY2ggcmVwbHkgaXMgdGhyb3duIGF3YXksIGxpc3Rpbmcgb2YgbGFyZ2UgZGly
ZWN0b3JpZXMgbWF5DQo+IHByb2R1Y2UgbXVjaCBtb3JlIHJlcXVlc3RzDQo+IHRoYW4gcmVxdWly
ZWQuDQo+IA0KPiBJcyBpdCBhbiBleHBlY3RlZCBiZWhhdmlvcj8NCg0KWWVzLg0KDQotLSANClRy
b25kIE15a2xlYnVzdA0KTGludXggTkZTIGNsaWVudCBtYWludGFpbmVyLCBIYW1tZXJzcGFjZQ0K
dHJvbmQubXlrbGVidXN0QGhhbW1lcnNwYWNlLmNvbQ0KDQoNCg==

WARNING: multiple messages have this Message-ID (diff)
From: Trond Myklebust <trondmy@hammerspace.com>
To: "tigran.mkrtchyan@desy.de" <tigran.mkrtchyan@desy.de>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: readdir request re-requests entries
Date: Sat, 20 Oct 2018 18:22:07 +0000	[thread overview]
Message-ID: <f9f24f44266292dc5fa41f633344b11cf84cc4f8.camel@hammerspace.com> (raw)
Message-ID: <20181020182207.QvfxEttc6zzbvvulpHM8sj33TW29FqfyDxZ4DLcimKo@z> (raw)
In-Reply-To: <174380207.12564567.1539987095714.JavaMail.zimbra@desy.de>

On Sat, 2018-10-20 at 00:11 +0200, Mkrtchyan, Tigran wrote:
> 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?

Yes.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2018-10-21  2:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19 22:11 readdir request re-requests entries Mkrtchyan, Tigran
2018-10-20 18:22 ` Trond Myklebust [this message]
2018-10-20 18:22   ` Trond Myklebust
2018-10-20 18:57 ` Frank Sorenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9f24f44266292dc5fa41f633344b11cf84cc4f8.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tigran.mkrtchyan@desy.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox