You are not logged in.

#1 2013-10-17 20:25:26

ratchet
Member
From: New York, NY
Registered: 2009-11-14
Posts: 10

writing to NFS mount very slow

EDIT: This turned out not to be an NFS issue.

I apologize in advance if this belongs in the Newbie Corner. This is my first time using NFS.

I have followed the directions on the Archwiki NFS page to set up some shared folders on my home network. I can read and write remotely to the folder, but writing goes very slowly (~500kb/s). The file browser on the client side seems to hang when I try to open any of the shared folders. Even mousing over the shared folders or trying to open the xfce directory panel applet can freeze the desktop. Running ls in a terminal is notably slow.

The server is running 3.11.4-1-ARCH x86_64.

Ouput of lspci |grep -i net is:

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 03)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 03)

lsmod shows the r8169 module is loaded.

/etc/fstab on server:

#music partition on non-SSD harddrive
UUID=85c48b6d-2d0b-48dc-be34-327353e718e6    /mnt/music    ext4        user,auto,rw,exec,async,dev,suid    0     2
#video partition
UUID=97a1f911-d4f4-4a0a-8481-ca53a4983235    /mnt/videos    ext4        user,auto,rw,exec,async,dev,suid    0     2
#pictures partition
UUID=201aac10-3df5-4322-8a09-5f1d5d25667e    /mnt/pictures    ext4        user,auto,rw,exec,async,dev,suid    0     2
#games partition
UUID=4eb1b410-f11c-4eef-88de-4072da86ee16    /mnt/games    ext4        user,auto,rw,exec,async,dev,suid    0    2


#mount music,etc partitions to server
/mnt/music                     /srv/nfs4/music        none    bind                    0     0
/mnt/videos                    /srv/nfs4/videos     none    bind                    0     0
/mnt/pictures                    /srv/nfs4/pictures     none    bind                    0     0
/mnt/games                    /srv/nfs4/games        none    bind                    0     0

/etc/exports :

/srv/nfs4/        192.168.1.96/27(rw,fsid=root,no_subtree_check)
/srv/nfs4/music        192.168.1.96/27(rw,no_subtree_check,all_squash,anonuid=1001,anongid=100,nohide)
/srv/nfs4/videos    192.168.1.96/27(rw,no_subtree_check,all_squash,anonuid=1001,anongid=100,nohide)
/srv/nfs4/pictures    192.168.1.96/27(rw,no_subtree_check,all_squash,anonuid=1001,anongid=100,nohide)
/srv/nfs4/games        192.168.1.96/27(rw,no_subtree_check,all_squash,anonuid=1001,anongid=100,nohide)

On the server side, nfsd, ntpd,rpc-idmapd, rpc-mountd.service, rpcbind are reported loaded active and running by systemctl.

The client machine is running 3.8.10-1-ARCH x86_64.

lspci :
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)
07:00.0 Network controller: Qualcomm Atheros AR93xx Wireless Network Adapter (rev 01)

The client is connecting wirelessly using the Atheros card (ath9k module loaded).

/etc/fstab on client:

192.168.1.101:/music           /home/dave/shared-music           nfs4           rsize=4096,wsize=65536,timeo=600,intr,_netdev    0 0
192.168.1.101:/games        /home/dave/shared-games            nfs4        rsize=4096,wsize=65536,timeo=600,intr,_netdev    0 0

192.168.1.101:/pictures        /home/dave/shared-pictures        nfs4        rsize=4096,wsize=65536,timeo=600,intr,_netdev    0 0
192.168.1.101:/videos        /home/dave/shared-video            nfs4        rsize=4096,wsize=65536,timeo=600,intr,_netdev    0 0

ntpd is loaded on client machine.

Output of nfsstat:

Server rpc stats:
calls      badcalls   badclnt    badauth    xdrcall
0          0          0          0          0       

Client rpc stats:
calls      retrans    authrefrsh
10291      0          10291   

Client nfs v4:
null         read         write        commit       open         open_conf    
0         0% 2829     27% 0         0% 0         0% 1435     13% 1         0% 
open_noat    open_dgrd    close        setattr      fsinfo       renew        
0         0% 0         0% 1419     13% 0         0% 12        0% 7         0% 
setclntid    confirm      lock         lockt        locku        access       
2         0% 2         0% 0         0% 0         0% 0         0% 33        0% 
getattr      lookup       lookup_root  remove       rename       link         
1418     13% 1523     14% 4         0% 0         0% 0         0% 0         0% 
symlink      create       pathconf     statfs       readlink     readdir      
0         0% 0         0% 8         0% 2         0% 0         0% 157       1% 
server_caps  delegreturn  getacl       setacl       fs_locations rel_lkowner  
20        0% 1418     13% 0         0% 0         0% 0         0% 0         0% 
secinfo      exchange_id  create_ses   destroy_ses  sequence     get_lease_t  
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
reclaim_comp layoutget    getdevinfo   layoutcommit layoutreturn getdevlist   
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
(null)       
0         0% 

I have the same problems using a linux mint laptop as a client.

What I have tried:
1) Loading rpc-gssd service, although wiki says it is not necessary in NFSv4.
2) Various values for rsize and wsize, with some improvement going up to 65536, though still very slow
3) changed value of timeo to 600 (from 14), without improvement.
4) Increasing value of NFSD_COUNT in /etc/conf.d/nfs-server.conf.

Thanks in advance for any suggestions.

Last edited by ratchet (2013-10-19 03:55:35)

Offline

#2 2013-10-17 22:04:01

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,604

Re: writing to NFS mount very slow

Have you ruled out the possibility that your network "infrastructure" is the problem? Ie. do samba, sshfs, or such not display the same behaviour?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2013-10-19 03:53:18

ratchet
Member
From: New York, NY
Registered: 2009-11-14
Posts: 10

Re: writing to NFS mount very slow

Thanks for your reply, alphaniner. You were right. Writing to a samba share is just as slow. So it's not a problem with my NFS setup.

It seems strange to me that I can download files off the internet much faster than I can transfer data from one computer to another on my network.

Offline

#4 2013-10-21 13:29:27

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,604

Re: writing to NFS mount very slow

Are you sure downloading is faster than transfering locally? That would indeed be strange if you download directly to the server. If you only download to a client, check the strength/quality* of the server's connection.

*Or whatever; I know next to nothing about wireless. But in the case of Ethernet, if the server were only connected at 10Mb for some reason, that would limit speeds to and from the server to ~1MB/s. Maybe signal characteristics can cause something similar in the case of wireless.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2013-10-24 02:23:46

ratchet
Member
From: New York, NY
Registered: 2009-11-14
Posts: 10

Re: writing to NFS mount very slow

I think that my expectation of how fast I should be able to move files from client to server was wrong.

This post on superuser is about the same complaint (transfers within LAN slower than downloading):
http://superuser.com/questions/528386/l … -downloads

If anyone can confirm that this is normal behavior, I'd be grateful.

This is my setup:

cable modem ---> router -----[wireless connection] ---->client
                                |
                                |
                                -------------{wired connection]------->server

Downloading from internet to the client over wireless is about 1 MB/s. Moving files from client to server is about 500kb/s.

Offline

#6 2013-10-24 04:56:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,419

Re: writing to NFS mount very slow

ratchet wrote:

Downloading from internet to the client over wireless is about 1 MB/s. Moving files from client to server is about 500kb/s.

Can you clarify this a bit.  I read that as 1 MegaBytes/second versus 500 kiloBits/second
500 kb/s will turn into about 50kB/s.  Is that what you meant?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#7 2013-10-24 13:34:24

ratchet
Member
From: New York, NY
Registered: 2009-11-14
Posts: 10

Re: writing to NFS mount very slow

sorry. I meant that downloads over wireless go at around 1 megabyte per second and transfers from client to server go at 500 kilobytes per second (in other words, 8 megabits per second v 4 megabits per second).

Offline

#8 2013-10-24 13:41:32

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,604

Re: writing to NFS mount very slow

The Superuser answer said "When both clients are wireles" (emphasis mine). So it doesn't seem to apply to your case.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB