Network share: Performance differences between NFS & SMB

You may also like...

34 Responses

  1. Jacky says:

    >>> “Sadly most Windows users are forced to use SMB.”

    SMB is more efficient than NFS protocol-wise. SMB is a stateful protocol, NFS is a stateless protocol. Once a connection is established, SMB has less overhead than NFS. However, SMB is more or less a Microsoft protocol. To get the best performance, you need to use Windows servers and clients. For Windows users, SMB is native and performs better than NFS, no real sadness.

    • Dear Jacky, you may be right that you get the best performance with SMB in a pure Windows only environment. In my opinion this is not realistic. Mixed environments like having Windows clients and Linux file servers or vice versa is not uncommon. In that case NFS shows a better performance.

    • Helena says:

      I’m not sure this is a valid argument. I believe NFS has been stateful for 20 years now (since v4 came out).

    • khash says:

      Please … NFS can be stateful too! check NFS manual, you can switch to TCP.

    • Seb says:

      I’ve always found SMB to be slow on every Windows Server I used; 20% network utilisation was the norm and could never figure out why. When using Synology servers, they always appear to consistently transfer files at 100% network speed. The only time it didn’t is if it was working with lots of tiny files. Maybe the biggest NFS gains is when transferring small files?

  2. Synology! Benchmark! NFS and SMB!
    That’s just the information I’ve been looking for! Thank you!

  3. On ubuntu 14.04 I had the opposite experience, samba performed roughly 10% faster than nfs when reading a single (large) file. The network is 1GB/s, wired locally.

    I use the default configs for both, any idea why I don’t get 200% speedup by using nfs like your numbers say?

    • Did you see that the performance for large files is nearly the same with NFS and SAMBA?
      There is no big advantage. NFS is only better for small or medium sized files.

      Ferhat

  4. Janusz Kossek says:

    At our work, we regularly run tons of the tests involving SMB and NFS shares and SSD disks. We use these results to design very fast NAS applications for data recording (1GbE, 10GbE and 40GbE). In each of these tests for sequencial disks access (writes or reads or both) SMB each time outperforms NFS by 10%-20% depending on the test case. We use it with single, multiple streams, and IP aliasing to maximize storage throughput.

  5. Mike-EEE says:

    Would be useful to know how this stacks up now with SMB3.

  6. fnordprod says:

    Would you mind if I took a screen shot of the benchmark itself for some project documentation I have to write for school? Of course, your name will be attached to the source’s section properly, but it would help a lot for the reasoning part. Not that we had a real choice in our fake project, though .. ? best wishes from .de,
    a going-to-be admina in training ?

  7. Joseph says:

    Hi Ferhat, nice article ?
    If you are still in this game, and have the time, maybe an update with SMBv3 and NFS 3/4 would be a great follow-up to see if the VERY thorough testing is still valid ?
    NIce work, especially testing the different file sizes, very much appreciated!

  8. Dima says:

    Thanks for the article.
    A few days ago I installed Windows Server 2019 Standart on my NAS. And 2 days I tested the speed on apple tv 4k (1Gb network).
    And as I can see its no big difference between NFS and smb share. In my case, smb has a more stable speed when test on big files.

  9. Sasha says:

    Good article, and without any question, NFS, specifically NFS 4.x is super fast and better than any MS trash protocol.
    SMB is not a shared network file system but ratter protocol definition. NFS is actually a network based shared file system.
    stateful vs. stateless is totally wrong assumption …
    There is reason why MS file systems are slow .. everything is tracked within protocol …

  1. April 9, 2016

    […] file performance? – some threads suggest NFS is more efficient or serves faster with smaller files <= a few MB (which is […]

  2. October 10, 2016

    […] Network share: Performance differences between NFS & … – Both SMB and NFS are network protocols of the application layer, used mainly for accessing files over the network. Since SMB is supported by Windows, many … […]

  3. October 25, 2016

    […] Network share: Performance differences between NFS & SMB – Create folders inside /mnt (e.g. /mnt/smb and /mnt/nfs) before mounting. With the following commands you will mount an SMB share into /mnt/smb and an NFS share … […]

  4. November 23, 2016

    […] Network share: Performance differences between NFS & SMB – Network share: Both SMB and NFS are network protocols of the application layer, used mainly used for accessing files. See my performance comparison! […]

  5. August 4, 2017

    […] ferhatakgun.com […]

  6. June 12, 2020

    […] now, Pure positions them for different use cases. FlashArray is recommended for databases over NFS or SMB file protocols and other enterprise file-sharing use cases. FlashBlade, which also supports object […]

  7. August 28, 2020
  8. August 28, 2020

    […] file server。效能部分幾年前看是比 SAMBA 還要好,不過最近也是有看到文章是 SMB 與 AFP 屌打 NFS […]

  9. September 14, 2020

    […] to Pro or Server to avoid having to use for file sharing. And according to data gathered over at Furhatakgun, I am drawing my own conclusion that SMB has more overhead per file than […]

  10. January 30, 2022

    […] Use NFS for better performance. See the article Network share: Performance differences between NFS & SMB. […]

  11. May 13, 2022

    […] Use NFS for better performance. See the article Network share: Performance differences between NFS & SMB. […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WordPress Cookie Notice by Real Cookie Banner