NFS over tcp

Thomas Pornin (pornin@bolet.ens.fr)
Wed, 6 Jan 1999 11:31:49 +0100


In article <13969.63992.935848.171752@aspc9.imsc.ernet.in> you write:
> Client: Linux version 2.0.36 / Pentium NFS compiled as a module
> Server: Solaris 2.6 / Ultra I 170
>
> Read from the Server to the Client is quite fast but
> Write from Client to Server is about *5 times slower*.

>From previous discussions, I got the following information, that I think
is exact (but who can claim 100% correctness ?)(the last guy who did was
crucified 2 thousands years ago):

** True NFS v2 (as defined by Sun) implies the following two things:
a. UDP is used, no TCP thingies
b. writes are synchronous: the server does not report a succesful
write until the data has been commited to a permanent storage
(hard disk) which effectively limits drastically NFS write
performance (typically 300 Kbytes/s at most on a 10 Mbits
ethernet and with a Ultra1 Sun server)

** Two extensions have been applied to the NFS implementation of Linux:
a. a TCP connexion might be used (extension also present in FreeBSD)
b. the knfsd linux server may be configured to perform writes
asynchronously: this reduces reliability (server crashes are no
more transparents) but increases write performances (I got
940 Kbytes/s with a linux-2.1.72 alpha server and a 2.0.34 i386
client over 10 Mbits ethernet)
The Solaris NFS server does not know these extentions when running in
NFS v2 mode.

** In NFS v3, TCP may be used, and the asynchronous writes option is
enabled when the client asks for it (using a specific NFS v3 RPC call),
not by a priori server configuration. This means that you must have
a NFS v3 client in order to ask for this useful feature.

Therefore you must have a NFS v3 compliant client in order to ask for
the asynchronous writes, and the linux one is only v2. Moreover, if
you initiate a TCP connexion with a Solaris server, the server thinks
that the client is v3 (according to Sun, TCP for v2 does not exist) and
starts sending v3 messages, that the client does not understand.

Olaf Kirch developped a v3 client implementation and Alan Cox announced
a few weeks ago that he had begun to merge it into the standard tree.
This will probably appear in the 2.3.x kernels, and maybe later
backported to 2.2.x. I for one am impatient to see and use it.

By the way, I think (but I am not sure) that the knfsd server does
support NFS v3, and therefore the other combination (linux 2.2.0 server
[with knfsd] and Solaris client) should have God's own speed.

If I am wrong flame me: I really prefer a good burning than remaining
with incorrect information.

--Thomas Pornin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/