LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NFS mount very slow (https://www.linuxquestions.org/questions/linux-networking-3/nfs-mount-very-slow-239820/)

Toxe 10-07-2004 09:39 AM

NFS mount very slow
 
Hello world!

I was installing an nfs server the other day and got a strange problem with mounting. When I try mounting an nfs file system from another linux box it takes nearly two minutes to complete. mount just sits there doing nothing and then all of a sudden it returns and the file system is successfully mounted. Only problem is that the mount takes ages to complete.

I allready tried tcpdump and watching the traffic but the problem seems to have nothing to do with the server because the server sends all packages to the client. (At least I suppose that the client got all packages - after all I am no NFS expert.) After it got all the packages the client just sits there for two minutes before it finishes the mount. So it seems to be a client-only problem.

But none the less I'll post the output of tcpdump here anyways, maybe it may provide some help:

Code:

16:22:55.653648 IP 192.168.32.2.707 > 192.168.32.4.111: S 4120504710:4120504710(0) win 5840 <mss 1460,sackOK,timestamp 5605645[|tcp]>
16:22:55.653871 IP 192.168.32.4.111 > 192.168.32.2.707: S 1544562152:1544562152(0) ack 4120504711 win 5792 <mss 1460,sackOK,timestamp 10294968[|tcp]>
16:22:55.653704 IP 192.168.32.2.707 > 192.168.32.4.111: . ack 1 win 46 <nop,nop,timestamp 5605645 10294968>
16:22:55.653767 IP 192.168.32.2.707 > 192.168.32.4.111: P 1:45(44) ack 1 win 46 <nop,nop,timestamp 5605645 10294968>
16:22:55.653775 IP 192.168.32.4.111 > 192.168.32.2.707: . ack 45 win 46 <nop,nop,timestamp 10294968 5605645>
16:22:55.654147 IP 192.168.32.4.111 > 192.168.32.2.707: P 1:401(400) ack 45 win 46 <nop,nop,timestamp 10294968 5605645>
16:22:55.654289 IP 192.168.32.2.707 > 192.168.32.4.111: . ack 401 win 54 <nop,nop,timestamp 5605646 10294968>
16:22:55.654301 IP 192.168.32.4.111 > 192.168.32.2.707: P 401:437(36) ack 45 win 46 <nop,nop,timestamp 10294968 5605646>
16:22:55.654369 IP 192.168.32.2.707 > 192.168.32.4.111: . ack 437 win 54 <nop,nop,timestamp 5605646 10294968>
16:22:55.654397 IP 192.168.32.2.707 > 192.168.32.4.111: F 45:45(0) ack 437 win 54 <nop,nop,timestamp 5605646 10294968>
16:22:55.654437 IP 192.168.32.4.111 > 192.168.32.2.707: F 437:437(0) ack 46 win 46 <nop,nop,timestamp 10294968 5605646>
16:22:55.654484 IP 192.168.32.2.708 > 192.168.32.4.808: UDP, length: 84
16:22:55.654499 IP 192.168.32.2.707 > 192.168.32.4.111: . ack 438 win 54 <nop,nop,timestamp 5605646 10294968>
16:22:55.691438 IP 192.168.32.4.808 > 192.168.32.2.708: UDP, length: 56
16:22:55.691580 IP 192.168.32.2.710 > 192.168.32.4.111: UDP, length: 56
16:22:55.691849 IP 192.168.32.4.111 > 192.168.32.2.710: UDP, length: 28
16:22:55.694038 IP 192.168.32.2.900084490 > 192.168.32.4.2049: 88 fsinfo [|nfs]
16:22:55.694107 IP 192.168.32.4.2049 > 192.168.32.2.900084490: reply ok 80 fsinfo [|nfs]
16:22:55.694222 IP 192.168.32.2.916861706 > 192.168.32.4.2049: 88 getattr [|nfs]
16:22:55.694248 IP 192.168.32.4.2049 > 192.168.32.2.916861706: reply ok 112 getattr [|nfs]

On the other hand, taking a look at the dump again I wonder what those strange port numbers (900084490, 916861706) at the end are?

I tried mounting the file system with:

Code:

mount -t nfs 192.168.32.4:/home foo -o rw,hard,intr
Allthough it doesnt really matter what options I use cause I allways get the same slow mounting.

Some further information:
- NFS server = 192.168.32.4
- NFS client = 192.168.32.2
- Server and client kernel: 2.6.8.1
- nfs-utils: 1.0.6
- util-linux: 2.12

Any ideas or suggestions?

Cedrik 10-07-2004 10:43 AM

I use these options to mount nfs partition :

Code:

mount -t nfs 192.168.32.4:/home foo -o rw,sync,rsize=8192,wsize=8192,intr
try them as nfs works well on my machine this way
Also I recompiled kernel with nfs feature as built-in, I dunno if it helps though...

Toxe 10-07-2004 10:44 AM

Looks like I could solve the mystery: I have to start portmap on the other box first. After that mount is as fast as it is supposed to be. :)

Who would have guessed...

LinuxRam 10-24-2004 01:40 PM

@Toxe

Did starting portmap worked or not !


-Akshat

ugge 10-24-2004 02:35 PM

Portmapp is needed for NFS to work properly.
The portmapper maps a RPC program number with a TCP service port.
Without this mapping there are no way for the client to reach the server.
The RPC service is a solution used to make certain services available remotely through the TCP/IP protocol.

Toxe 10-25-2004 10:26 AM

Quote:

Originally posted by akshatyadav
@Toxe

Did starting portmap worked or not !

Yes, it worked.


All times are GMT -5. The time now is 11:24 AM.