NFS performance

Discussion about using NAS on Linux and Unix OS.
Post Reply
easydisk
New here
Posts: 2
Joined: Mon Nov 03, 2014 3:48 am

NFS performance

Post by easydisk »

Hi,

I have a Qnap TS-119P+ and I notices that in Windows I can make up to a 50-55 Mbyte/second file transfer to the QNap, also if I mount the share in Linux as cifs it makes up to 50-55 Mbyte/seconde, but if I mount the shares in Linux with NFS it reach a maximimum of 40Mbyte/second.
After Googling a lot of pages tell me that the NFS performance of the Qnap are slower than the Samba performances, often because of the reason of the 8Kbyte read/write buffer size.

However I didn't find any FAQ/Howto how to change these settings and/or tune the performance of the NFS in Qnap.

Where can I find a tutorial for Qnap NFS performance tuning ?
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: NFS performance

Post by pwilson »

easydisk wrote:Hi,

I have a Qnap TS-119P+ and I notices that in Windows I can make up to a 50-55 Mbyte/second file transfer to the QNap, also if I mount the share in Linux as cifs it makes up to 50-55 Mbyte/seconde, but if I mount the shares in Linux with NFS it reach a maximimum of 40Mbyte/second.
After Googling a lot of pages tell me that the NFS performance of the Qnap are slower than the Samba performances, often because of the reason of the 8Kbyte read/write buffer size.

However I didn't find any FAQ/Howto how to change these settings and/or tune the performance of the NFS in Qnap.

Where can I find a tutorial for Qnap NFS performance tuning ?
Why would you even want to? You have already provided your own solution. Simply use CIFS instead. I have been using CIFS between Linux machines for 23 years. I recommend it. I don't run NFS on any of my devices. All my PC's run Linux. None of them run NFS.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
dsmithdewarcom
Easy as a breeze
Posts: 251
Joined: Wed Oct 29, 2014 1:14 am

Re: NFS performance

Post by dsmithdewarcom »

I don't run NFS on any of my devices
Did NFS kick your puppy?

http://www.helios.de/web/EN/news/AFP_vs_SMB-NFS.html
http://searchstorage.techtarget.com/answer/NFS-vs-CIFS

Lots more where that came from. Google is your friend!
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: NFS performance

Post by schumaku »

dsmithdewarcom wrote:
I don't run NFS on any of my devices
Did NFS kick your puppy?
The problem is that NFS runs massively different from the NAS users, groups, shared folder access rights. As >99% (sorry to say) of the people asking about NFS here don't understand the major difference, are not willing or able to bring uid, gid, default protections in sync over all NFS systems and the NAS, don't have enterprise class LDAP or AD infrastructures helping, ... I can't wait to hear people reporting troubles NFS created/modified folders and files when accessing by SAMBA, AFP, FTP, File Station, ... or complain why user and group access doe snot work on NFS shares, and so on.

Native protocol - ah, that's why Apple did use AFP over TCP and is defaulting to SAMBA for OS X based services for example - and OS X _is_ an U**x-like OS, too.

For this we don't need Google.

So I fully agree with Patrick's simplified approach.
dsmithdewarcom
Easy as a breeze
Posts: 251
Joined: Wed Oct 29, 2014 1:14 am

Re: NFS performance

Post by dsmithdewarcom »

As >99% (sorry to say) of the people asking about NFS here don't understand the major difference, are not willing or able to bring uid, gid, default protections in sync over all NFS systems and the NAS, don't have enterprise class LDAP or AD infrastructures
I don't have any of those things. I just turned it on and it worked out of the box (it doesn't broadcast like SMB/AFP, which suits me fine, I just point [servername/ip]:share at it).
enable.gif
permissions.gif
My advice is to google up a tutorial and figure out how you want to make it work for you. Or not. Whatever. It's not rocket science.
You do not have the required permissions to view the files attached to this post.
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: NFS performance

Post by schumaku »

As long as you just make use of NFS, and don't care about interoperability with any of the many other services - no problem.
magpiper
First post
Posts: 1
Joined: Wed Sep 07, 2016 2:52 pm

Re: NFS performance

Post by magpiper »

NFS is ALWAYS faster than CIFS/SMB. CIFS by nature is chatty and has lots of overhead. It's really a terrible protocol for file transfer. NFS has been around forever and is a very efficient and lean protocol. I too experience high CPU util on QNAP and 5-7MB/s transfer with NFS. As I am new to QNAP products (TS-419P), I am troubleshooting NFS performance. One thing that I did was to change /etc/exportfs lines from 'async' to 'sync'. But ONLY do this if you have a battery backup as it can corrupt data during a transfer when power is lost.

Also when mounting a NFS export. Use something like the following for performance: "rw,rsize=8192,wsize=8192,intr,async 0 0" You can tweak these settings and see what your results are. Lastly, when making the changes to exportfs, you need to restart NFS server. And for fstab a unmount/mount will need to occur for the changes to take affect.

And I just found this KB article from QNAP: https://helpdesk.qnap.com/index.php?/Kn ... nce-tuning
ink
Know my way around
Posts: 136
Joined: Mon Aug 03, 2009 7:08 pm
Location: London

Re: NFS performance

Post by ink »

NFS (as @shumaku points out) is a tricky one for many people in a home environment, mainly because of username<->UID mapping problems.

Internally, the NFS packets reference the owner of the files/directories with just a number, and it's down to the OS at the receiving end to map that number back to a username. Where the receiving OS is unable to find a matching username it will use a default like 'nobody'. This quite obviously screws up file ownership and permissions badly.

The way most implementations deal with this is by having all NFS client and servers use the same 'directory service' like LDAP / NIS to ensure all usernames are mapped to the same numbers.
Without a common directory service, you forced into the folly of manually maintaining local 'passwd' files to attempt to match username to numeric ID's across all systems (this is bad).

All of which is quite a shame, because like others have pointed out NFS can be very fast, and NFSv4 has even more advantages (single port number, consolidation of protocol daemons - no more statd/mountd/lockd, and my favourite, compound RPCs).

As a result of all the above, I would struggle to recommend NFS for any home user who isn't also already an experienced systems administrator.
TS-453S-Pro - 4* 2TB - RAID10(ish) [Devuan ZFS] 16GB RAM
Post Reply

Return to “Linux & Unix (NFS)”