Linux NFS (libnfs) Performance
#1
I am deliberately not posting additional info, because I want to understand if this is a known issue/feature first.

I have a Xubuntu 12.04 64bit server, AMD E-350, 4GB RAM. This runs Samba (default config+added shares) and NFS (nfs-kernel-server) from standard repositories.

XBMC client runs on Kununtu 12.04 64bit, Core i5-2400 3.10GHz, 24GB RAM. XBMC version v12 Frodo from team xbmc stable PPA.

Gigabit LAN network.


NFS is supposed to be much faster than Samba and it is, but only if I mount using "mount -t ntfs", if I access the share using XBMC (libnfs), it is actually slower. Interestingly XBMC's internal Samba implementation is faster than what I get with KDE...


Below are results of tests I performed. Each time I copied different large HD movie file to a tmpfs memory mount on client (to make sure cache is out of question). Tests performed several times. I coped files using XBMC file manager using either internal NFS(libnfs) or dir mounted using "mount -t nfs". I also tried samba with KDE's Dolphin using smb://.

NFSv4 mount: 61Mb/sec (default options: rsize=1,048,576)
NFSv4 mount: 88Mb/sec (best performance rsize=65,536)
NFSv3 mount: 47Mb/sec (default options: rsize=1,048,576)
NFSv3 mount: 53Mb/sec (best performance rsize=131,072)
XBMC NFSv3: 14Mb/sec (default m_readChunkSize=1,048,576)
XBMC NFSv3: 14Mb/sec (m_readChunkSize=65,556, recompiled NFSFile.cpp:m_readChunkSize=65556)

XBMC SMB: 33Mb/sec
Dolphin SMB: 18Mb/sec


May be it is simply kernel space vs user space? But 6x difference, seams a bit high?
Reply
#2
What exactly is your problem? Raw throughput should be enough for any kind of media around? Beside that i don't know the reason for your results.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
(2013-02-02, 00:02)Memphiz Wrote: What exactly is your problem? Raw throughput should be enough for any kind of media around? Beside that i don't know the reason for your results.

I agree about throughput, it is definitely more than enough. It is mostly curiosity. I am just wondering about results other people might have had, since I don't know much about NFS so far.
Reply
#4
@Memphiz I been compiling with libnfs 1.5.0 its much better than 1.3.0 more stable? Do you have plans to bump the makefile and .gitignore to use the new files in XBMC now that frdo is out?

Heres the file http://pastebin.com/raw.php?i=fsLnGmhb tht should do it no? I cant do gitty stuff.

uNi
Reply
#5
If you are running Gigabit you should easily be able to hit 90+ MB/s <-- MByte/s that is - for a server to tmpfs test.

I've never used the libnfs mounts...always stick with autofs for NFSv4 mounting.

Full details on server + client are in this post: http://forum.xbmc.org/showthread.php?tid...pid1308706

I can easily saturate the Gigabit using these Linux-Linux tests...Linux-FreeBSD are also very good....real-world file transfers are about 90 MB/s or so too - depending on hardware on both ends of course.
If I helped out pls give me a +

A bunch of XBMC instances, big-ass screen in the basement + a 20TB FreeBSD, ZFS server.
Reply
#6
(2013-02-02, 04:04)thethirdnut Wrote: If you are running Gigabit you should easily be able to hit 90+ MB/s <-- MByte/s that is - for a server to tmpfs test.

I've never used the libnfs mounts...always stick with autofs for NFSv4 mounting.

Full details on server + client are in this post: http://forum.xbmc.org/showthread.php?tid...pid1308706

I can easily saturate the Gigabit using these Linux-Linux tests...Linux-FreeBSD are also very good....real-world file transfers are about 90 MB/s or so too - depending on hardware on both ends of course.

Thanks for the info!

I do get 88Meg/sec if I mount with usual mount. I will probably go with autofs as well, it is just much easier to configure all clients using advancedsettings.xml Wink



(2013-02-02, 03:13)uNiversal Wrote: @Memphiz I been compiling with libnfs 1.5.0 its much better than 1.3.0 more stable? Do you have plans to bump the makefile and .gitignore to use the new files in XBMC now that frdo is out?

Heres the file http://pastebin.com/raw.php?i=fsLnGmhb tht should do it no? I cant do gitty stuff.

uNi

By better, do you mean faster or something else?

I will try compiling it later on. Can do a git pull request if needed.
Reply
#7
More stable and a little faster, I only mount my shares via XBMC and from 60MB/sec to 80+
I also make uninstall on 1.3.0 version since I compile XBMC from source anyway, before using that make file.

A git PR would be nice, I dont have account or know anything about git tbh not really interested since I cant code anyway.

uNi
Reply
#8
@flaterichd - good to hear.

The big versus little 'B' makes quite a difference ;-) ... yes, go with autofs and you'll never go back.

FYI as well..you won't see any mounts in /mnt until XBMC or something else similar to a 'ls /mnt/<mountpoint>' ... its self-explanatory with the 'auto' part, but I didn't think it was working first time either...it mounts as needed.
If I helped out pls give me a +

A bunch of XBMC instances, big-ass screen in the basement + a 20TB FreeBSD, ZFS server.
Reply
#9
(2013-02-02, 03:13)uNiversal Wrote: @Memphiz I been compiling with libnfs 1.5.0 its much better than 1.3.0 more stable? Do you have plans to bump the makefile and .gitignore to use the new files in XBMC now that frdo is out?

Heres the file http://pastebin.com/raw.php?i=fsLnGmhb tht should do it no? I cant do gitty stuff.

uNi

Yes i plan to do it - but its not only updating to libnfs1.5 - their is a lot of code in XBMC to workaround issues we had since libnfs1.0 - with libnfs1.5 i'm looking forward to remove most of those workarounds. But i have to do a lot of testing for ensuring that everything is really fine then. So libnfs1.5 will happen - but not soo quick.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#10
(2013-02-02, 15:16)uNiversal Wrote: More stable and a little faster, I only mount my shares via XBMC and from 60MB/sec to 80+
I also make uninstall on 1.3.0 version since I compile XBMC from source anyway, before using that make file.

A git PR would be nice, I dont have account or know anything about git tbh not really interested since I cant code anyway.

uNi

Finally got a chance to compile and test with libnfs 1.5. No difference, from 12MB/sec to 14.9MB/sec maximum...
Reply
#11
Smile 
Quote:Finally got a chance to compile and test with libnfs 1.5. No difference, from 12MB/sec to 14.9MB/sec maximum...

How's about with autofs?
If I helped out pls give me a +

A bunch of XBMC instances, big-ass screen in the basement + a 20TB FreeBSD, ZFS server.
Reply
#12
(2013-02-06, 00:32)thethirdnut Wrote:
Quote:Finally got a chance to compile and test with libnfs 1.5. No difference, from 12MB/sec to 14.9MB/sec maximum...

How's about with autofs?

As I said autofs (well mount command) gives me 80+ Meg/sec...

I will end up using it, I was just curious why there is such a big difference.

Never mind, I give up. Smile
Reply
#13
Smile 
Quote:Never mind, I give up. Smile

That's the spirit! After all the beer isn't going to drink itself...

If I helped out pls give me a +

A bunch of XBMC instances, big-ass screen in the basement + a 20TB FreeBSD, ZFS server.
Reply
#14
(2013-02-07, 23:29)thethirdnut Wrote:
Quote:Never mind, I give up. Smile

That's the spirit! After all the beer isn't going to drink itself...

I am willing to test other libnfs options, but I am out of ideas myself.. Smile
Reply
#15
Some more things:

OPTIMIZE NFS =
have you tried stuff here, id start with the r and wsize
you can start here there is a ton of stuff:
http://nfs.sourceforge.net/nfs-howto/ar01s05.html

NETWORKING AND FRAME SIZE =
also on your xbmc box and your file server figure out the best MTU to use
make sure your nics are using jumbo frames:
http://www.cyberciti.biz/faq/rhel-centos...iguration/

testing jumbo is working:
http://serverfault.com/questions/234311/...ly-working

some info here mainly talks about checking also(there are probably better sources of info):
http://www.bestyoucanget.com/optimizemtu.htm

Reply



Logout Mark Read Team Forum Stats Members Help
NFS (libnfs) Performance0
This forum uses Lukasz Tkacz MyBB addons.