public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* NFS readdir problem
@ 2006-05-15 15:36 Xin Zhao
  2006-05-15 16:18 ` Richard Mittendorfer
  2006-05-15 19:10 ` Matthew Wilcox
  0 siblings, 2 replies; 3+ messages in thread
From: Xin Zhao @ 2006-05-15 15:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-fsdevel

Hi,

I use NFS to read a remote directory, which contains 56 entries. But
after the read, "ls -al" only show 26, 31, or 51 entries in three test
runs.

I have read the NFS  code "encode_entry" and related "nfs_readdir",
"nfs3_proc_readdir"..., but haven't find the right place that can
cause this problem.

Is there anyone has similar experience? Please help!

Thanks,
-x

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

* Re: NFS readdir problem
  2006-05-15 15:36 NFS readdir problem Xin Zhao
@ 2006-05-15 16:18 ` Richard Mittendorfer
  2006-05-15 19:10 ` Matthew Wilcox
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Mittendorfer @ 2006-05-15 16:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Xin Zhao

Also sprach "Xin Zhao" <uszhaoxin@gmail.com> (Mon, 15 May 2006 11:36:53
-0400):
> Hi,

Hello,

> I use NFS to read a remote directory, which contains 56 entries. But
> after the read, "ls -al" only show 26, 31, or 51 entries in three test
> runs.
> 
> I have read the NFS  code "encode_entry" and related "nfs_readdir",
> "nfs3_proc_readdir"..., but haven't find the right place that can
> cause this problem.
> 
> Is there anyone has similar experience? Please help!

There is a note in the performance section from the NFS-HOWTO[1]. It
suggests adjusting the r- and wsize mount parameters:

_._. .._ _  .... . ._. .  __..__  _._. .._ _  .... . ._. .

Directly after mounting with a larger size, cd into the mounted file
system and do things like ls, explore the filesystem a bit to make sure
everything is as it should. If the rsize/wsize  is too large the
symptoms are very odd and not 100% obvious. A typical symptom is
incomplete file lists when doing ls, and no error messages, or reading
files failing mysteriously with no error messages. After establishing
that the given rsize/ wsize works you can do the speed tests again.
Different server platforms are likely to have different optimal sizes.
_._. .._ _  .... . ._. .  __..__  _._. .._ _  .... . ._. .

[1] http://www.tldp.org
> Thanks,
> -x

sl ritch

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

* Re: NFS readdir problem
  2006-05-15 15:36 NFS readdir problem Xin Zhao
  2006-05-15 16:18 ` Richard Mittendorfer
@ 2006-05-15 19:10 ` Matthew Wilcox
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2006-05-15 19:10 UTC (permalink / raw)
  To: Xin Zhao; +Cc: linux-kernel, linux-fsdevel

On Mon, May 15, 2006 at 11:36:53AM -0400, Xin Zhao wrote:
> I use NFS to read a remote directory, which contains 56 entries. But
> after the read, "ls -al" only show 26, 31, or 51 entries in three test
> runs.
> 
> I have read the NFS  code "encode_entry" and related "nfs_readdir",
> "nfs3_proc_readdir"..., but haven't find the right place that can
> cause this problem.
> 
> Is there anyone has similar experience? Please help!

I don't know the answer ... but you could do a little more to help:

 - What's the server?
 - What's the client?
 - Exact versions of OS/kernel running on each

If you're really enthusiastic, you could run tcpdump and look at the
traces to see what filenames are actually being transported across.

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

end of thread, other threads:[~2006-05-15 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-15 15:36 NFS readdir problem Xin Zhao
2006-05-15 16:18 ` Richard Mittendorfer
2006-05-15 19:10 ` Matthew Wilcox

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