This is a discussion on Poor NFS performance between 2 Linux boxes within the Linux Networking forums, part of the Linux Forums category; Hi, I am having some weird performance problems with NFS under Linux. Here is my configuration: - NFS Server: Ultra2 running ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I am having some weird performance problems with NFS under Linux. Here is my configuration: - NFS Server: Ultra2 running Debian unstable with kernel 2.4.24 SMP and nfs-kernel-server 1.0.6-3. The NFS server uses the following options for the exported filesystem: rw,no_root_squash,async . - NFS Client: Intel Pentium 3 running Debian unstable with kernel 2.6.5-1. The NFS filesystems are mounted with the following options: rsize=8192,wsize=8192,ti meo=14,retry=1,bg,hard,intr The problem is that even though the NFS server and the NFS client are connected to the network using 100Mbits network cards, I am only getting between 300KB and 400KB per second transfer rate when doing a "dd if=/dev/zero of=./test". I have tried playing with the bs size on the dd and with the rsize and wsize on the mount options without much difference. I have the same directory exported from the NFS server using Samba and if I mount it on the NFS client as a smbfs filesystem, I get around 3MB transfer rate on the same dd. Also, while I am doing the dd on the NFS client, in the /var/log/messages file, I get lots of "nfs: server not responding, still trying" followed by "nfs: server OK" a few seconds later. I have tried playing with the timeo, rsize, wsize options on the server to no avail. I would rather use NFS to share those filesystems between my Linux clients than Samba, but at the moment, the performance is so bad, that I don't have much choice. I am looking for any advice on what I can do to get the NFS performance on par with the Samba one. Thanks a lot in advance for yyour help, Bertrand Sirodot. |
|
|||
|
"Bertrand Sirodot" <bertrand_sirodot@yahoo.co.uk> wrote in message news:c9ac67eb.0407011109.58bccc4e@posting.google.c om... > Hi, > > I am having some weird performance problems with NFS under Linux. > Here is my configuration: > - NFS Server: Ultra2 running Debian unstable with kernel 2.4.24 > SMP and nfs-kernel-server 1.0.6-3. The NFS server uses the following > options for the exported filesystem: rw,no_root_squash,async . > - NFS Client: Intel Pentium 3 running Debian unstable with kernel > 2.6.5-1. The NFS filesystems are mounted with the following options: > rsize=8192,wsize=8192,ti > meo=14,retry=1,bg,hard,intr > > The problem is that even though the NFS server and the NFS client are > connected to the network using 100Mbits network cards, I am only > getting between 300KB and 400KB per second transfer rate when doing a > "dd if=/dev/zero of=./test". I have tried playing with the bs size on > the dd and with the rsize and wsize on the mount options without much > difference. I have the same directory exported from the NFS server > using Samba and if I mount it on the NFS client as a smbfs filesystem, > I get around 3MB transfer rate on the same dd. > > Also, while I am doing the dd on the NFS client, in the > /var/log/messages file, I get lots of "nfs: server not responding, > still trying" followed by "nfs: server OK" a few seconds later. > > I have tried playing with the timeo, rsize, wsize options on the > server to no avail. I would rather use NFS to share those filesystems > between my Linux clients than Samba, but at the moment, the > performance is so bad, that I don't have much choice. > > I am looking for any advice on what I can do to get the NFS > performance on par with the Samba one. > > Thanks a lot in advance for yyour help, > Bertrand Sirodot. See: http://nfs.sourceforge.net Lots of performance information there. Enjoy, Mangled&Munged |
|
|||
|
Hi Mangled&Munged,
thanks a lot for your reply. I had a look at the page you indicated and thanks to it, I managed to get rid of the "server not responding" message. I have configured nfs to use TCP instead of UDP and it did the trick. On the performance side, still no changes. I had a look at everything there and there is nothing I can do that will improve the performance. Any other ideas? Thanks a lot, Bertrand. "Mangled&Munged" <postmaster@127.0.0.1> wrote in message news:<kyfFc.286$qw1.21@nwrddc01.gnilink.net>... > "Bertrand Sirodot" <bertrand_sirodot@yahoo.co.uk> wrote in message > news:c9ac67eb.0407011109.58bccc4e@posting.google.c om... > > Hi, > > > > I am having some weird performance problems with NFS under Linux. > > Here is my configuration: > > - NFS Server: Ultra2 running Debian unstable with kernel 2.4.24 > > SMP and nfs-kernel-server 1.0.6-3. The NFS server uses the following > > options for the exported filesystem: rw,no_root_squash,async . > > - NFS Client: Intel Pentium 3 running Debian unstable with kernel > > 2.6.5-1. The NFS filesystems are mounted with the following options: > > rsize=8192,wsize=8192,ti > > meo=14,retry=1,bg,hard,intr > > > > The problem is that even though the NFS server and the NFS client are > > connected to the network using 100Mbits network cards, I am only > > getting between 300KB and 400KB per second transfer rate when doing a > > "dd if=/dev/zero of=./test". I have tried playing with the bs size on > > the dd and with the rsize and wsize on the mount options without much > > difference. I have the same directory exported from the NFS server > > using Samba and if I mount it on the NFS client as a smbfs filesystem, > > I get around 3MB transfer rate on the same dd. > > > > Also, while I am doing the dd on the NFS client, in the > > /var/log/messages file, I get lots of "nfs: server not responding, > > still trying" followed by "nfs: server OK" a few seconds later. > > > > I have tried playing with the timeo, rsize, wsize options on the > > server to no avail. I would rather use NFS to share those filesystems > > between my Linux clients than Samba, but at the moment, the > > performance is so bad, that I don't have much choice. > > > > I am looking for any advice on what I can do to get the NFS > > performance on par with the Samba one. > > > > Thanks a lot in advance for yyour help, > > Bertrand Sirodot. > > See: http://nfs.sourceforge.net > Lots of performance information there. > > Enjoy, > Mangled&Munged |
|
|||
|
As I've done NFS on solaris and linux, I don't think there shouldn't
be too much trouble with the performance. Can you please print the output of rpcinfo -p here? You must know how to start the Portmapper correctly because NFS depend on it heavily. If everything works fine please read these links ... http://nfs.sourceforge.net/nfs-howto/performance.html and http://www.spec.org/sfs97r1/ Believe me, NFS is lot better than SAMBA to be used inside corporate intranet when you have *nix machines as peer. raqueeb hassan bangladesh |
|
|||
|
On Thu, 01 Jul 2004 12:09:15 -0700, Bertrand Sirodot wrote:
> I am having some weird performance problems with NFS under Linux. > Here is my configuration: > - NFS Server: Ultra2 running Debian unstable with kernel 2.4.24 > SMP and nfs-kernel-server 1.0.6-3. The NFS server uses the following > options for the exported filesystem: rw,no_root_squash,async . I know this is a Linux newsgroup and all, but I feel I must point out (as many others have done in other groups) that Sun gear (including Ultra2, or which I have several) tends to run better using Solaris. I think that is because the kernel is better tuned for SPARC instructions and Sun H/W. I run Solaris on Suns (other than some experiments with Debian, etc.), and Linux on PCs. I find that the combination achieves the best "performance". -- Juhan Leemet Logicognosis, Inc. |
|
|||
|
"Bertrand Sirodot" <bertrand_sirodot@yahoo.co.uk> wrote in message news:c9ac67eb.0407032233.340fe608@posting.google.c om... > Hi Mangled&Munged, > > thanks a lot for your reply. I had a look at the page you indicated > and thanks to it, I managed to get rid of the "server not responding" > message. I have configured nfs to use TCP instead of UDP and it did > the trick. > > On the performance side, still no changes. I had a look at everything > there and there is nothing I can do that will improve the performance. > > Any other ideas? > > Thanks a lot, > Bertrand. > Bertrand, If your kernel supports it.... you might try: mount options.... -o nfsver=3, wsize=32768, rsize=32768. If your client, and server support NFS Version 3, then the above will enable the client side cache, as well as enable larger transfers over the net. ( less overhead, more data movement) Hints: You'll need a fairly new Linux kernel to get 32k transfers working on the server side, and you'll need a kernel that is built with NFS Version 3 support, on both the client and the server. The client kernel would like to be 2.5 or later, and the server would like to be 2.6 ish. The 2.5 kernel on the client gets rid of the sync flush on 1 Mbyte boundaries, and the 2.6ish kernel on the server fixes the 32k block size support. I know, it appears to work in earlier kernels, but it doesn't actually. If you sniff the wire you'll see that pre-2.6ish kernels actually only support a max of 8k wsize, and rsize. The kernel lies to the client during the negotiation and some clients will believe they have mounted with 32k, but the actual transfers are 8k. The real 32k transfers work, for real, in the 2.6 ish kernels. If I send you any more hints, I'll have to send you bill :-) Enjoy, Mangled&Munged |