2011-10-17 08:10:34

by Harald Dunkel

[permalink] [raw]
Subject: nfs3 30% faster than nfs4?

Hi folks,

I did a brief test on a local nfs server: Extracting the
linux kernel sources on a nfs partition it seems that nfs3
is 30% faster than nfs4. For nfs3 I got 5.2MB/sec. Nfs4
gave me just 3.8MB/sec. The server was idle except for this
test.

Client and server were running 2.6.39 from the Debian backports
repository. I just changed the mount option on the client to
select nfs3 or nfs4.

I don't want to complain, but I did not expect this huge loss
in performance for moving to nfs4. Any helpful comment would be
highly appreciated.

Harri


2011-10-17 13:39:02

by J. Bruce Fields

[permalink] [raw]
Subject: Re: nfs3 30% faster than nfs4?

On Mon, Oct 17, 2011 at 09:53:37AM +0200, Harald Dunkel wrote:
> Hi folks,
>
> I did a brief test on a local nfs server: Extracting the
> linux kernel sources on a nfs partition it seems that nfs3
> is 30% faster than nfs4. For nfs3 I got 5.2MB/sec. Nfs4
> gave me just 3.8MB/sec. The server was idle except for this
> test.
>
> Client and server were running 2.6.39 from the Debian backports
> repository. I just changed the mount option on the client to
> select nfs3 or nfs4.
>
> I don't want to complain, but I did not expect this huge loss
> in performance for moving to nfs4. Any helpful comment would be
> highly appreciated.

It might be worth looking at /proc/self/mountstats and seeing if you can
figure out where the time's going in the v4 case. (Probably
open/close?)

That workload is unlikely to be bandwidth-limited so total time is
probably the better number to look at instead of bandwidth.

--b.