Thread View: comp.client-server
4 messages
4 total messages
Started by Rob Weltman
Wed, 30 Dec 1992 15:59
NFS and RPC
Author: Rob Weltman
Date: Wed, 30 Dec 1992 15:59
Date: Wed, 30 Dec 1992 15:59
43 lines
2011 bytes
2011 bytes
Why is NFS so slow? ------------------- I followed the initial discussion in this group about RPC, TCP, and UDP with great interest. At about the same time, a friend did a series of benchmarks in a network of Sparcstation 2's, to compare the file transfer performance using TCP sockets, NFS (write to remote-mounted disk), and RPC using TCP. The files were large (around 2 MB or larger). RPC using TCP was slightly slower than straight sockets using TCP, as expected. What was surprising was that it was so slow to just do a large write to the open file descriptor of a remote mounted file. It turned out to be much faster to: - have a small server process on the remote machine open a file there - transfer the file to the remote process with RPC or socket - have the remote process write to the file Some improvement over the open/write to the remote file was obtained by mmapping the remote file instead, but this is still slower than using the remote process. Can NFS be tweaked for better performance? Are there other settings that affect NFS performance this drastically? Thanks for any clues! Rob --- --------------------------------------------- | Rob Weltman | | Xerox | | 3400 Hillview Ave, building 5 | | Palo Alto, CA 94303 | | | | weltman@adoc.xerox.com | | phone (415)-813-7477 fax (415)-813-6792 | ---------------------------------------------
Re: NFS and RPC
Author: Tad Marshall
Date: Thu, 07 Jan 1993 03:05
Date: Thu, 07 Jan 1993 03:05
18 lines
1347 bytes
1347 bytes
In article <1992Dec30.155939.13344@spectrum.xerox.com> weltman@adoc.xerox.com writes: > > I followed the initial discussion in this group about RPC, TCP, and >UDP with great interest. At about the same time, a friend did a series >of benchmarks in a network of Sparcstation 2's, to compare the file >transfer performance using TCP sockets, NFS (write to remote-mounted >disk), and RPC using TCP. The files were large (around 2 MB or larger). >RPC using TCP was slightly slower than straight sockets using TCP, as >expected. What was surprising was that it was so slow to just do a >large write to the open file descriptor of a remote mounted file. > >Why is NFS so slow? NFS is "stateless", which means that each "write" from the client side will result in an open/write/close on the server. The opens/closes slow it down quite a bit over the file-transfers you were comparing it to. -- Tad
Re: NFS and RPC
Author: Guy Harris
Date: Thu, 07 Jan 1993 05:40
Date: Thu, 07 Jan 1993 05:40
25 lines
1706 bytes
1706 bytes
>NFS is "stateless", True (modulo debate about the meaning of "stateless"). >which means that each "write" from the client side >will result in an open/write/close on the server. The opens/closes slow >it down quite a bit over the file-transfers you were comparing it to. False, at least in the UNIX NFS servers I've seen. In those, there aren't any "open"s or "close"s done by the NFS server. Instead, the NFS server takes the file handle it was given by the client, asks the underlying file system to cough up a vnode (or moral equivalent, in systems that decided to be perversely different) for the file with that file handle, asks the underlying file system to perform the write (or whatever) on the file referred to by the vnode, releases the vnode if it was held, and returns the result. The "get a vnode" and "release the vnode" operations may be what you're thinking of as the "open" and "close" operations, but they are *NOT* what's slowing the writes down; they're relatively cheap, especially if the file system's data for the vnode in question (inode, or whatever) is cached. The writes are slowed down by being done synchronously; see the summary of responses to the original question for a more detailed discussion.
Re: NFS and RPC
Author: Gijs J. Mos
Date: Thu, 07 Jan 1993 10:41
Date: Thu, 07 Jan 1993 10:41
25 lines
1541 bytes
1541 bytes
guy@Auspex.COM (Guy Harris) writes: >>NFS is "stateless", >True (modulo debate about the meaning of "stateless"). >>which means that each "write" from the client side >>will result in an open/write/close on the server. The opens/closes slow >>it down quite a bit over the file-transfers you were comparing it to. >False, at least in the UNIX NFS servers I've seen. In those, there >aren't any "open"s or "close"s done by the NFS server. Instead, the NFS [stuff describing UNIX implementations deleted] On Stratus NFS the NFS server regularly opens the file. This is indeed a very slow operation that involves directory access. To make things usable the NFS server doesn't close files immediately after each write or read. Instead the files are kept open for a certain period. The time files are kept open is an installation parameter for the NFS server. It is normally 30 seconds or so. This means that a write/read benchmark that writes/reads a stream of blocks as fast as it can incurs only one open. Gijs Mos gjm@dasc.nl #include <stddisclaimer.h> This might not be the view of my employer.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads