LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-23-2014, 04:46 PM   #1
mauromol
Member
 
Registered: Apr 2012
Location: Italy
Distribution: Linux Mint KDE, Debian
Posts: 35

Rep: Reputation: Disabled
SMB vs NFS performance


I have a small NAS, a Western Digital MyBook World Edition, which is a small Linux box with an ARM processor, using Linux Kernel version 2.6.24.4 and 128 MB RAM.

I'm trying to understand what's the best way to connect to the shared folders in the NAS in terms of performance. This NAS has the ability to share folders using either SMB/CIFS, NFS and FTP.
I know for experience that SMB access is "heavy" in terms of CPU and memory utilization on this little NAS: backing up thousands of little files takes ages, also because at a certain point the NAS will start to swap. So I was intrigued by the possibility to use NFS now that I installed Linux on my client PC too. I was expecting NFS to give me better performance and less resource utilization... but I was surprised by my initial tests.

First of all, I didn't try to read/write many small files, but I just tested the performance with the copy of a big file from the NAS. However, the results were quite embarrassing:
  • copying a big file from the NAS using KDE Dolphin and accessing the shared folder by using Dolphin built-in ability to browse the NAS contents using ftp:/ protocol brought a maximum read rate of around 70MB/s
  • copying the same file from the NAS with Dolphin, after having mounted its shared folder using "mount -t cifs //nas/shared-folder /mnt/test" brought a maximum read rate of around 60 MB/s with a CPU utilization on the NAS of more than 70%
  • copying the same file from the NAS with Dolphin, after having mounted its shared folder using "mount nas:/shared-folder /mnt/test" brought a maximum read rate of around 21 MB/s with a CPU utilization on the NAS of more than 90% during the whole transfer

So, in this test, the NFS performance was roughly 1/3 of the SMB performance, which is near the FTP performance. This was surprising.

Any networking expert here can tell me his/her opinion on this? Any suggestion/magic recipe to improve the NFS performance on my setup? Should I give up and stick with SMB and/or FTP?

Thanks in advance.
 
Old 04-24-2014, 02:07 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Without logs and configuration files and options you used for your NFS server and client it's hard to say. I can tell you my experience with NFS has not been that drastic and have always been comparable in speed. On my NAS I get ~130MB/s download/upload on on large files using Samba. Though it should be noted my "NAS" is a custom built machine and the remote filesystem sits on RAID10.

Your 60MB/s limit is because that's the fastest stand alone hard drives can copy data running at 7200RPM (2TB drives for e.g.).
 
Old 04-25-2014, 12:09 PM   #3
mauromol
Member
 
Registered: Apr 2012
Location: Italy
Distribution: Linux Mint KDE, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
Without logs and configuration files and options you used for your NFS server and client it's hard to say. I can tell you my experience with NFS has not been that drastic and have always been comparable in speed.
I can give you all the details you need. Anyway, I used the "defaults" for both client and server.

On the client I mounted the NFS share with just:
Code:
mount myserver:/sharedfolder /mnt/mountfolder
On the server the /etc/exports is:

Code:
/nfs/sharedfolder *(ro,all_squash,sync,insecure,anonuid=65534,anongid=65534)
Quote:
Originally Posted by sag47 View Post
Your 60MB/s limit is because that's the fastest stand alone hard drives can copy data running at 7200RPM (2TB drives for e.g.).
60 MB/s is not a problem (this is a low-end NAS with a small ARM processor), it's the 20 MB/s of NFS that surprises me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SMB/CIFS client performance when connecting to shares tombelcher7 Linux - Desktop 5 01-24-2014 12:09 AM
[SOLVED] NFS vs SMB on NAS gmathisz Linux - Networking 6 12-09-2013 07:22 PM
A performance problem while writing to a shared folder (NFS/SMB) with Windows VM crisostomo_enrico Solaris / OpenSolaris 1 09-22-2008 05:27 AM
Can SMB and NFS get along in Debian? knyghtmaire Linux - Networking 2 06-27-2007 10:28 PM
NFS or SMB? What is the best way? GradyVogt Linux - Networking 4 02-06-2004 11:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration