13

So I'm setting up a NAS server with my Raspberry-Pi, and I'm trying to figure out what type of file sharing I want to implement. Between NFS and Samba shares, I've read that NFS is faster than Samba, however Samba is easier to set up on Windows. My question is, does the speed increase is significant enough to go through the hassle of setting it on Windows?

My network consists of 2x Ubuntu and 1x Windows computers and 1x Android mini-pc.

joaocandre
  • 369
  • 2
  • 3
  • 6
  • Also note that NFS has no password protection, like samba. Bottleneck for the both would be the CPU of the Pi. When I use NFS on my Pi, CPU goes to 100%. – Gerben Aug 05 '13 at 11:53
  • @Gerben Actually, I've set up a NFS share following this tutorial here and I actually don't find it eating up much of the Pi's CPU, I was just wondering if there is any gain in changing the share to samba. – joaocandre Aug 05 '13 at 14:25
  • What is your throughput over NFS? I've heard of people getting less that 1Mbps, so CPU would be low in that case. I myself am using NFS and an external USB harddrive. With this setup I'm getting 6.3MB/s (50.4Mbps) download, and around 8MB/s (64Mbps) upload to the Pi. (Quite weird that it's slower to reading from HDD and send, then it is to receive and write to HDD) – Gerben Aug 06 '13 at 15:29
  • So I was checking, and indeed the mount.ntfs process on the Pi seems to eat from 60-80% of the CPU. How exactly do you measure the throughput (I am only getting around 3 Mb/s when copying files from the client to the server)? Do you notice any improvements over samba? – joaocandre Aug 06 '13 at 20:30
  • I've never used samba. Also my HDD is ext3 formatted. I measured from my Mac (Activity Monitor) that was uploading/downloading a 1GB file. – Gerben Aug 07 '13 at 10:43
  • Why not both? Setup NFS and Samba server. NFS capable clients can then choose NFS over CIFS. – Mohnish Sep 01 '17 at 00:35

1 Answers1

15

If you want a share to use in windows, forget NFS, go to samba...

NFS can work in windows, but every time i tried i had problems with it (with external tools, with MS Windows Services for UNIX or with more recent windows server 2012). All are really just hacks to windows, not even MS gave me enough support when a NFS start failing on a server after 1 year of use.

Samba just works, windows know how to work with it, no problem ahead.

Performance, a tuned samba can be as fast as a NFS. Many small files is always a problem with samba/cifs, but that is a protocol limitation.

higuita
  • 684
  • 5
  • 6
  • 1
    And how exactly do I "tune" a samba share? – joaocandre Aug 05 '13 at 14:26
  • 2
    @joaocandre /etc/samba/smb.conf is your friend: http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html – Arda Aug 05 '13 at 21:49
  • 3
    @joaocandre for samba performance tips, check https://calomel.org/samba_optimize.html. You should read all and think on what you might need. Some optimization for one usage might give problems for other usage. Test then if you can. – higuita Aug 12 '13 at 17:49