• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Photography Life

PL provides various digital photography news, reviews, articles, tips, tutorials and guides to photographers of all levels

  • Reviews
  • News
  • Lenses
    • Lens Index
  • Forum
  • About Us
    • Contact Us
    • Workshops
    • Support Us
    • Submit Content
  • My Account
    • Log In
    • Sign Up
  • Search
Home → Storage Hardware and Software

AFP vs NFS vs SMB Performance on macOS Mojave

By Nasim Mansurov 43 Comments
Last Updated On April 25, 2020

If you are a Mac user, you might be wondering which file-sharing protocol gives the best performance when using a network-attached storage device (NAS) such as Synology, or a NAS / Thunderbolt over Ethernet device such as QNAP. With macOS allowing one to choose between AFP, NFS, SMB and CIFS protocols, it is sometimes tough to make the proper choice, especially considering that some of these protocols have different versions that might perform differently. Add to this the fact that macOS itself might behave differently depending on which version of it you are running, and it can get quickly aggravating for many photographers out there who are simply trying to get the best out of their equipment.

I am currently in the process of reviewing another QNAP device, and while at it, I decided to test out all these protocols on the latest version of macOS Mojave 10.14.3 on my iMac Pro that has a built-in 10 GbE connection. The 4-bay QNAP device offers both Thunderbolt over Ethernet and 10 GbE connectivity options, so I tested both, although it turned out that Thunderbolt offered better overall performance, which is why I decided to stick with it instead of 10 GbE. In order to make sure that the 4-bay QNAP device performs at its maximum potential, I used fast 7200 RPM 4x WD Red drives configured in RAID 0 configuration. File System Analyzer within QNAP Diagnostic Tool showed that the volume’s potential was roughly 680 MB/sec read speed and 570 MB/sec write speed, which is pretty decent for four drives in RAID 0 configuration (with each drive potentially being able to do up to 180-190 MB/sec, according to HDD Analyzer). Nothing was changed on the iMac Pro from the configuration standpoint, with default /etc/nfs.conf, /etc/nsmb.conf and /etc/sysctl.conf files (if you are running an older version of macOS, you should edit the /etc/nsmb.conf file and make sure to add “signing_required=no” to the file or your transfer speeds with the SMB protocol will suffer greatly).

To make sure that my data is a bit more accurate and not just localized to a single NAS system, I also ran a similar test on an 8-bay Synology DS1817+ NAS with 10 Gbit connectivity that I reviewed last year. The Synology drives are in RAID 6 configuration, using 6 TB HGST 7200 RPM drives. Since Synology DS1817+ does not have a Thunderbolt connection, all tests were performed over 10 Gbit network. To make sure that I can get the maximum potential network speed, the iMac Pro, the Synology DS1817+, as well as the 10 GbE network switch were configured for 9000 MTU Jumbo frames. Let’s do a quick overview of each file sharing protocol and we will get down to comparisons and conclusions right after.

Table of Contents

  • What is AFP?
  • What is NFS?
  • What is SMB / CIFS?
  • AFP vs NFS vs SMB / CIFS Performance Comparison
  • Conclusion

What is AFP?

AFP, which stands for Apple Filing Protocol, is a proprietary network protocol that was developed as part of the Mac Operating System. It was originally known as AppleTalk, but was later changed and renamed to AFP. Because it is native to macOS, it is the most compatible and the most feature-rich among all supported network protocols. It has built-in support for “Spotlight” search, Time Machine, Mac Aliases and Bonjour Services, which other protocols are not compatible with.

What is NFS?

Network File System (NFS) is a distributed file system protocol that was developed for use in Unix / Linux operating system environments. It is based on an open standard and has gone through a number of revisions and contributions from the Unix / Linux community over the years, from version 2 (NFS v2) all the way to the latest NFS version 4.2 that was published in 2016. Most modern implementations of NFS are based on version 3 and 4 of the protocol, with some systems providing support for 4.1 and now 4.2. macOS natively supports NFS v3 and NFS v4, although the support for version 4 needs to be manually enabled through the /etc/nfs.conf file, since the operating system connects to version 3 by default.

What is SMB / CIFS?

The Server Message Block (SMB) is a network file sharing protocol that was developed by Microsoft, while Common Internet File System (CIFS) is one of its versions. Similar to AFP, SMB / CIFS were developed as native protocols for the parent operating system Microsoft Windows. SMB also provides some specific features, such as network printing, shared folder authentication, file locking, etc. macOS has built-in support for SMB 1 / CIFS, SMB 2, as well as SMB 3.

In short, think of the three as Apple, Unix and Windows protocols. Each has its list of pros and cons, but for Mac users, AFP is typically the route to take.

AFP vs NFS vs SMB / CIFS Performance Comparison

Now that you understand the main differences between these protocols, let’s take a look at how they all compare when dealing with a lot of network and Thunderbolt traffic. Take a look at the below table that summarizes performance results I got from the 4-bay QNAP NAS / DAS:

ProtocolVersionSeq Read SpeedSeq Write Speed
AFPN/A649 MB/sec306 MB/sec
NFSv3 / v4551 MB/sec121 MB/sec
SMBv1161 MB/sec169 MB/sec
SMBv3652 MB/sec624 MB/sec

I ran a total of 5 tests for each protocol and version and picked the best result.

As you can see, the worst performer here is NFS. While it did a decent job with read speeds, averaging around 551 MB/sec over 3 tests using a 4 GB file (with AJA System Test Lite benchmark tool), its write speed was quite terrible at 121 MB/sec. Despite the fact that AFP is a native macOS protocol, it was also disappointing in terms of write performance on the QNAP, although reading speeds were excellent. The top performer here is SMB v3 – I was able to get 652 MB/sec read and 624 MB/sec write speeds using this protocol, which was quite impressive. SMB v1 / CIFS is quite terrible overall, showing very poor read and write speeds, so it should be avoided at all costs.

Here is the screenshot from AJA System Test Lite for the above SMB v3 result:

Benchmark Results SMB v3 QNAP

And here is the screenshot for the AFP result:

Benchmark Results AFP with QNAP

After running these tests, I realized that perhaps the QNAP implementation of AFP was just poor, so I decided to repeat the same tests on a Synology NAS. Below is the summary of results from running the same test on the Synology DS1817+:

ProtocolVersionSeq Read SpeedSeq Write Speed
AFPN/A1105 MB/sec506 MB/sec
NFSv3 / v4590 MB/sec156 MB/sec
SMBv175 MB/sec173 MB/sec
SMBv31108 MB/sec547 MB/sec

The Synology DS1817+ was able to get faster read speeds due to having more physical drives and as you can see from the above table, I was able to get over 1.1 GB/sec speeds using both AFP and SMB v3 protocols. However, the situation is a bit different when it comes to write speeds. Similar to the first table, the top performer was again SMB v3, demonstrating excellent read and write performance. AFP performed better on the Synology NAS compared to QNAP, but still lagged behind by between 50-75 MB/sec. I re-ran the tests several times with both 4 GB and 8 GB sequential read / write operations and the results were still pretty consistent, placing SMB v3 above AFP in general. SMB v1 should be avoided like a plague on the Synology – I could not get more than 75 MB/sec read speeds, which basically demonstrates that the implementation of this version is probably buggy.

Conclusion

Based on what I see from two different NAS vendors, it looks like SMB v3 is the best network protocol one can use in terms of overall performance on macOS, with AFP being the second best. Both SMB v1 and NFS should be avoided – they demonstrated rather disappointing write performance. If specific macOS features that AFP provides are important to you, then you should test both SMB v3 and AFP on your NAS device and see how each does on its own. For Synology, it looks like the performance differences are not very noticeable, but for anyone who uses a QNAP device, AFP robs almost half of the write speed, which is just too much…

I know this article is probably a bit too technical for our readers, but I still wanted to share it, as I believe one should use the best tool for the job. If you use a NAS in your environment, it would be great if you could share your results using similar tools in the comments section below.

Subscribe to Our Newsletter

If you liked this article, please subscribe below to our weekly email to get more great content like this!

Related Articles

  • Nikon Lens Bokeh Performance
  • Sony A7
    Sony A7 vs Nikon D600 ISO Performance
  • Nikon TC-14E III
    Nikon TC-14E III vs TC-14E II Performance Comparison
  • Adobe-Photoshop-Lightroom-6-and-CC
    Lightroom 6 Bugs and Performance Issues
  • NVMe vs SSD vs HDD
    NVMe vs SSD vs HDD Performance
  • Nikon D4 vs D3s vs D3
    Nikon D4 vs D3s vs D3 ISO Performance Comparison
Disclosures, Terms and Conditions and Support Options
Filed Under: Storage Hardware and Software Tagged With: Storage, Direct-Attached Storage, Network-Attached Storage, macOS

About Nasim Mansurov

Nasim Mansurov is the author and founder of Photography Life, based out of Denver, Colorado. He is recognized as one of the leading educators in the photography industry, conducting workshops, producing educational videos and frequently writing content for Photography Life. You can follow him on Instagram and Facebook. Read more about Nasim here.

guest
guest
43 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Arturo
Arturo
June 26, 2020 11:46 am

“I know this article is probably a bit too technical for our readers” Never think that, lots of us are actually into more in deep technical stuff, and casual readers will educate themselves if they want or pass it. Thanks for the test

8
Reply
Jon P
Jon P
April 25, 2019 10:56 am

This article is lacking a time stamp. It is rather irritating when articles lack a timestamp as then it is hard to assess their validity. Luckily, the comments are recent, so probably this article is pretty current.

3
Reply
Jeff
Jeff
Reply to  Jon P
July 18, 2019 2:22 pm

First, Nasim, THANK YOU for this article. It was exactly the type of information I was looking for as I set up my new/first NAS.

To: Jon P: agreed about timestamps, always bugs me too; but there are a few clues at least: like you say, the comments are recent (oldest is March 5, 2019) and if you look at en.wikipedia.org/wiki/…e#Releases you’ll see that 10.14.3, which the author mentions and calls “the latest”, was released Jan 22, 2019 and replaced by 10.14.4 on March 25, 2019, so a relatively narrow window, especially once you apply the comment cutoff of March 5. So between Jan 22 and Mar 5, 2019. If you look at the source (yes, I’m that crazy) or open one of the pictures in the article in a new window/tab, you’ll see in the URL of the picture that it was uploaded in “2019/03”, so I suspect the article was released between March 1 and March 5, 2019.

0
Reply
DARYL DAVIS
DARYL DAVIS
November 25, 2019 12:00 am

Many thanks for the test!

My household runs a mix of Apple, Windows, Linux and Android clients. I wanted a centralized storage repository, so today I converted my old desktop CPU to a FreeNAS server. With the mix of clients, AFP was out so I set up shares on SMB2: as I write this, AFP officially is deprecated (not yet dead, but going away) and replaced by SMB2.

I have two, 4TB WD Red drives in a ZFS pool in Raid 1 configuration. Once I’ve migrated over the data from two more 4TB Reds, I’ll add them to the pool for a Raid 10. I’ve a few 2TB drives laying about, one (or two in Raid 1) of which I’ll probably use in a separate volume for Time Machine. I’ll have to wire the place for 10Gb Ethernet, if only because the Nikon Z 7’s files are no joke!

1
Reply
Chris Fletcher
Chris Fletcher
Reply to  DARYL DAVIS
April 28, 2020 7:02 am

Yes thank you for the test. This is all confirming my findings as well. Built a Freenas system with ryzen cpu, and a direct 10gbe connection to my Mac. Was getting 750 read, 350 write speeds. Had to “tune” it, and I’m now able to get about 850 MB/s read/write to 6 x 12 TB drives in RAID Z2 config. I think there’s a little more to go, as I’m also getting similar bottleneck to an nvme2 drive in the server as well. My next question is how do I get file searching on SMB? Spotlight does not work.

0
Reply
Dennis Ng
Dennis Ng
Reply to  Chris Fletcher
May 6, 2020 3:55 pm

Wonder what is your configuration. Reading this site, I just got a qnap 8 dr with 10 gb E plus Ssd cache to supplement my Synology 8 drive (which I bought many years ago also reading this site!). But in the long term I would like to try zfs nas, thinking about 3900. Any view?

0
Reply
Neil
Neil
August 13, 2019 2:15 pm

thanks for this article that helps.. I have a QNAP TVS-882ST2 (8 bay SSD)
Migrating to High Sierra, I stumbled over writing speed close to 0 .. whatever protocol I used. All 3 are activated on the shares.. I’m trying to figure out if AFPS is the problem.

1
Reply
Thor
Thor
December 28, 2020 8:13 am

NFS settings can be tweaked to increase performance. I have a thunderbolt (v2) bridge between two imacs, and NFS is giving me about 4Gb/s write speed. This was almost double my SMB test.

The problem with NFSv3 is that it is not very secure by default. So you really have to “trust” your network. Or go through the hassle of setting up NFSv4 and Kerberos.

Since I’m paranoid and lazy I use SMB because of the built in user auth.

0
Reply
John
John
December 20, 2020 7:07 am

good article, thanks for sharing your findings.

0
Reply
another QNAP user
another QNAP user
November 8, 2020 2:39 pm

Actually this article was fantastic. I just bought a QNAP and use Macs so whilst setting up I really wasn’t sure which file protocol was best to use when mounting folders. Thanks for posting this v.much appreciated.

0
Reply
Justin
Justin
September 7, 2020 7:03 pm

Thank you Nasim for your post.

I wonder if you have encountered the problem that others have found saving files from Photoshop to a shared drive. There’s lots of discussion about Adobe’s lack of support for shared drives. “Save” from Photoshop fails (although “Save As” works) and apparently Adobe’s position is that they do not support network shares.

I encountered the problem with SMB, but find that everything works (so far) with NFS. Too bad if the only shared filesystem that works also turns out to be the slowest.

0
Reply
Alperto
Alperto
May 6, 2020 10:30 am

Be careful with RAID devices guys. A RAID server is not a backup device by itself, specially using things like FreeNAS, where you can miss EVERYTHING if you store files just there (a power failure, a thief, a bad software update, can destroy EVERYTHING inside the server). A system with UnRAID is a bit more safe, but still not a backup. Investigate the 3-2-1 backup solutions to understand better what a backup should look like. In very short, it stands for:

3 copies of each file you want to protect.
2 different (at least) devices.
1 one of them on a different location.

0
Reply
D@rkw3bma$t3r
D@rkw3bma$t3r
Reply to  Alperto
August 31, 2020 6:00 pm

You can snap freenss to get to the 3 2 1 and replicate to get to 3 2 1. 3 2 1is 3 total copies 2 backup copies and 1 production. Unraid scale Is inferior compared to freenas. As always you need to know how to set up protection otherwise your data may not be protected as thought.

0
Reply
D@rkw3bma$t3r
D@rkw3bma$t3r
Reply to  D@rkw3bma$t3r
August 31, 2020 6:00 pm

Some typos there but you get my point

0
Reply
Henrique Vicente
Henrique Vicente
April 5, 2020 10:35 am

Thank you for sharing this post. I’m finishing setting up my Intel NUC i7 server with a Lacie d2 8TB external storage, running ESXi with FreeNAS on top of it. I’m going to use it mostly for storing my photos (about 2TB so far), videos, and more with my MacBook Pro but also for a few other stuff (mostly, programming) and I was wondering what file-sharing protocol to use.

0
Reply
herb
herb
Reply to  Henrique Vicente
December 19, 2020 12:06 pm

I ended up using netatalk (apf) for better performance. netatalk.sourceforge.net

0
Reply

Primary Sidebar

Learn

  • Beginner Photography
  • Landscape Photography
  • Wildlife Photography
  • Portraiture
  • Post-Processing
  • Advanced Tutorials
  • Best Cameras and Lenses

Reviews

  • Camera Reviews
  • Lens Reviews
  • Other Gear Reviews

Photography Tutorials

Photography Basics
Landscape Photography
Wildlife Photography
Macro Photography
Composition & Creativity
Black & White Photography
Night Sky Photography
Portrait Photography
Street Photography
Photography Videos

Support Us

B&H Photo Video Banner

Recent Topics

  • Can’t access account settings
  • How to appraise used gear
  • Price of ai-s lenses seems to have skyrocketed!
  • Unable to download tutorials I purchased
  • Photgraphic Journey
  • Nikon D5100 Macro photo with flash issues
  • Kasimedu sunrise
  • Missing Comments on Articles ?
  • Nikon Z5 recommended Nikon Z5 Settings
  • A7R IV and the gel stick

Footer

Site Menu

  • Beginner Photography
  • Lens Database
  • Photo Spots
  • Search
  • Submit Content
  • Subscribe

Reviews

  • Camera Reviews
  • Lens Reviews
  • Other Gear Reviews

Copyright © 2021 · Photography Life

You are going to send email to

Move Comment