On 08/22/2011 11:12 AM, Giovanni Tirloni wrote:
> On Sat, Aug 20, 2011 at 12:03 AM, Doug Hughes <[email protected]> wrote:
>> Ah, I think I know exactly what this (above) is. Linux (CentOS) does not
>> fully implement the READDIRPLUS NFS RPC call, but Solaris does. When the
>> client asks for READDIRPLUS, the server fills in the packet with a large
>> number of replies and sends them in bulk. When the client asks for READDIR,
>> every single entry is enumerated as a single RPC which means 7000 RTTs. If
>> you are using ls -l or ls -color, automatically double that to 14000 RTTs
>> because it will be doing getxattr and/or stat calls for every entry. ouch!
>
> What do you mean Linux doesn't fully implement READDIRPLUS? It works
> just fine for us and the behavior you describe is how it normally
> works.
>
Linux implements READDIRPLUS just fine.
If you want to use READDIRPLUS (NFSv3), use the appropriate mount option:
mount -o nfsvers=3 server:/dir /there
On RHEL5, by default the NFS client will use NFSv2 (READDIR only) if the
NFS server exports in NFSv2 even if it also exports in NFSv3 (and v4) as
well.
There is no need to hack anything in the kernel or "downgrade" anything
either.
If you want to disable NFSv2 exports on Solaris, modify
"/etc/default/nfs" ("NFS_SERVER_VERSMIN=3") and restart the NFS service.
The equivalent file on RHEL based Linux distributions like CentOS os
Scientific Linux is "/etc/sysconfig/nfs" ("MOUNTD_NFS_V2=no").
All of this is documented in the relevant man pages.
Loïc.
_______________________________________________
Tech mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
http://lopsa.org/