Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] NFS veery slow
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
triLLy
n00b
n00b


Joined: 02 Apr 2005
Posts: 13

PostPosted: Sun Apr 03, 2005 12:42 pm    Post subject: [solved] NFS veery slow Reply with quote

Hi!

I recently updated my Desktop Computer (Athlon 2400+, 512MB, forcedeth) from Ubuntu Linux to Gentoo, and I really like Gentoo as a Desktop Distribution. I have trouble with NFS though: It is veery slow. The Server (2400+, 512MB) runs on Debian Sarge (Kernel 2.4.27). I tried it via udp and tcp, but with both I have transfer rates of about 200kb/s. Yes, over LAN. NFS works great when I boot Knoppix, Ubuntu or even the Gentoo LiveCD. FTP or HTTP works in every case with about 3-4 Mbyte/s. Here are some Log and Config entries:

/var/log/messages:

Apr 3 18:35:17 shuttle kernel: nfs: server 192.168.0.2 not responding, still trying
Apr 3 18:35:19 shuttle kernel: nfs: server 192.168.0.2 not responding, still trying
Apr 3 18:35:19 shuttle kernel: nfs: server 192.168.0.2 OK
Apr 3 18:35:21 shuttle kernel: nfs: server 192.168.0.2 OK
Apr 3 18:35:22 shuttle kernel: nfs: server 192.168.0.2 not responding, still trying
Apr 3 18:35:22 shuttle kernel: nfs: server 192.168.0.2 OK

(shuttle: client, 192.168.0.2: server)

and:

Apr 3 18:33:45 shuttle kernel: nfs warning: mount version older than kernel

Heres the Kernel Config:

<*> NFS file system support
[*] Provide NFSv3 client support
[ ] Provide NFSv4 client support (EXPERIMENTAL)
[ ] Allow direct I/O on NFS files (EXPERIMENTAL)
<*> NFS server support
[*] Provide NFSv3 server support
[ ] Provide NFSv4 server support (EXPERIMENTAL)
[*] Provide NFS server over TCP support

Portmap is up and running and both computers have these entries in /etc/hosts:

shuttle 192.168.4.2
pulsar 192.168.0.2

Netmask is 255.255.0.0.

I hope somebody can finally help, or I'll have to switch the OS again... :(

trilly


Last edited by triLLy on Tue Apr 05, 2005 2:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45833
Location: 56N 3W

PostPosted: Sun Apr 03, 2005 1:19 pm    Post subject: Reply with quote

triLLy,

Play with the block size options to mount. Heres a line from my /etc/fstab
Code:
eccles:/home            /mnt/eccles     nfs     bg,_netdev,rsize=8192,wsize=8192

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
triLLy
n00b
n00b


Joined: 02 Apr 2005
Posts: 13

PostPosted: Sun Apr 03, 2005 1:25 pm    Post subject: Reply with quote

Hmm.. Nope, still at 200kb/s

192.168.0.2:/home/ralf on /home/ralf/remote type nfs (rw,_netdev,bg,rsize=8192,wsize=8192,addr=192.168.0.2)

Thanks anyways.

triLLy
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45833
Location: 56N 3W

PostPosted: Sun Apr 03, 2005 1:48 pm    Post subject: Reply with quote

triLLy,

Lets find the bottleneck then.

Run a NFS client and server on both PCs. For testing serve and mount a local filesystem using NFS. You can do this but its of no practical value at all.

Do the local mounts on 127.0.0.1 and do read and write speed tests
Do the local mounts on 192..... and repeat the speed tests (this uses more of the network stack)
Post the results. If they are good we need to dig into your network settings on one PC or the other.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
triLLy
n00b
n00b


Joined: 02 Apr 2005
Posts: 13

PostPosted: Sun Apr 03, 2005 6:05 pm    Post subject: Reply with quote

If I understand correctly, I should:

a) Write "/home/ralf *(rw)" in /etc/exports on the client and mount it,
b) with "mount 127.0.0.1:/home/ralf /mnt/test". Then copy something from it. (14-30MB/s)
c) mount "192.168.4.2:/home/ralf" still from the client and do the tests again: 14-30MB/s.

I then mounted CLIENT:/home/ralf on the Server and got speeds of about 1130kb/s (according to KDE), still much faster than the other way around.

Thanks for the help, BTW.

triLLy
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45833
Location: 56N 3W

PostPosted: Sun Apr 03, 2005 6:10 pm    Post subject: Reply with quote

triLLy,

You need to do the checks on the client and the host.
Make the client NFS mount itself a filesystem using 127.0.0.1 then later its own IP
Make the server NFS mount itself a filesystem using 127.0.0.1 then later its own IP

If you want to do seperate read and write speed tests you can copy a file from /dev/zero and dump one to /dev/null too.
That gives you about 5 speed tests on each end of your NFS link.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
triLLy
n00b
n00b


Joined: 02 Apr 2005
Posts: 13

PostPosted: Sun Apr 03, 2005 6:42 pm    Post subject: Reply with quote

Hi!

Ok, very well. Here are the Results:

Client:

mount 127.0.0.1:/bla -> 14-30MB/s -> quick
mount 192.168.4.2:/bla -> 14-30MB/s -> quick

Server:

(Doesn't have a graphical interface so I dont know the exact transfer-rates)

mount 127.0.0.1:/bla -> 350MB in < 30Secs. -> quick
mount 192.168.0.2:/bla -> 350MB in < 30Secs. -> quick


Both Computers have slow 5400rpm HD's (Don't laugh: Energy is expensive in Germany.), but they surely can transfer more than 200kb/s... :(

triLLy
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45833
Location: 56N 3W

PostPosted: Sun Apr 03, 2005 7:00 pm    Post subject: Reply with quote

triLLy,

It looks like your network setup then because self to self does not use much of the network stack.
I guess you need to fiddle with your MTU and the way the kerenl talks to the network hardware.
What network cards are involed in the machine to machine transfer?

I don't know how to set the MTU
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
triLLy
n00b
n00b


Joined: 02 Apr 2005
Posts: 13

PostPosted: Mon Apr 04, 2005 1:07 pm    Post subject: Reply with quote

Hi!

Here is the ifconfig output for both Computers:

Client:

eth0 Link encap:Ethernet HWaddr 00:30:1B:B3:CF:11
inet addr:192.168.4.2 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:66349 errors:0 dropped:0 overruns:0 frame:0
TX packets:21511 errors:19 dropped:0 overruns:0 carrier:19
collisions:0 txqueuelen:1000
RX bytes:84186929 (80.2 Mb) TX bytes:3642705 (3.4 Mb)
Interrupt:11 Base address:0x6000

(Note the error count on TX.) Using the "forcedeth" module.

Server:

eth0 Protokoll:Ethernet Hardware Adresse 00:11:2F:82:23:F3
inet Adresse:192.168.0.2 Bcast:192.168.255.255 Maske:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:157718517 errors:0 dropped:0 overruns:0 frame:0
TX packets:212844934 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:153985145 (146.8 MiB) TX bytes:302927603 (288.8 MiB)
Interrupt:5 Speicher:e8000000-0

(Partially German, but should be understandable.) Using "sk98lin" module with this NIC:

0000:01:04.0 Ethernet controller: Marvell Technology Group Ltd. Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (rev 13)


Should I take the output of ifconfig when Im under Knoppix/GentooLiveCD, too?

Thanks,

triLLy
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45833
Location: 56N 3W

PostPosted: Mon Apr 04, 2005 8:55 pm    Post subject: Reply with quote

triLLy,

Thats not the info thats needed. You need to find out how to set the MTU and if the network drivers at each end support verious speed up options like DMA, Memory Mapped I/O, full duplex operation.

I don't know how you set the MTU but
Code:
modinfo <module_name>
or looking at the code, will tel you what optioms the modules support. Play with modprobe and the options, this requires that the network modules are not built in. Ask around about MTU too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
somasekh
n00b
n00b


Joined: 05 Apr 2005
Posts: 4

PostPosted: Tue Apr 05, 2005 7:41 am    Post subject: Reply with quote

Check https://forums.gentoo.org/viewtopic-t-318987-highlight-forcedeth.html?sid=90f12f51dd26ebf4541961b7a5c2304f

Seems to be a similar problem with the forcedeth modules. Do you have a Gig-E switch by any chance?

--
Dinesh
Back to top
View user's profile Send private message
triLLy
n00b
n00b


Joined: 02 Apr 2005
Posts: 13

PostPosted: Tue Apr 05, 2005 2:33 pm    Post subject: Reply with quote

Hi!

Great! Success.. I compiled forcedeth into the kernel (gentoo-2.6.11-r4) directly and it worked, thanks to everybody involved.

I don't understand it enitirely though, because I tried another kernel (linux-2.6.11) with built-in forcedeth and it didn't work, but hey, it works now. 8)

triLLy :lol:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum