HomeAboutMailing ListList Chatter /0/0 34.228.30.69

Samba slow transfer speeds (Ubuntu 16.04)

2018-09-12 by: Andy Burnett
From: Andy Burnett 
------------------------------------------------------
So I built a freeNAS box, set up a RaidZ2 volume for my drives, and then
created a SMB share.  I'm clocking sustained speeds of 110-115 MB/s over a
gigabit connection (moving around a 2gb test file) on my Windows machine,
but moving around the same file on my daily driver running Ubuntu 16.04
crawls along at 4-5 MB/s.  I've had this problem with samba on Linux, but
never got serious about fixing it until now.  Has anyone else encountered
this behavior before?  My Googling for answers hasn't yielded much, so I'm
coming to the knowledge well for help.  Any tips?



--
Sent from: http://chugalug.1100489.n5.nabble.com/

=============================================================== From: David White ------------------------------------------------------ Stupid question: Have you tried different cables, to rule out the possibility of a bad patch cable? Tried a different switch and/or a different port on the switch? Is it possible to test that same file over http(s) and/or rsync? SMB, HTTP and rsync are three fundamentally different ways to transfer files (SMB and HTTP are two different protocols), and HTTP typically has better performance than SMB. I'm not at all suggesting that this is a long term option, but what I am suggesting is that you could use it to help track down the problem. On Wed, Sep 12, 2018 at 2:04 PM Andy Burnett wrote:

=============================================================== From: Billy ------------------------------------------------------ Also, are you using smb:// or cifs:// end point? Cifs is deprecated, typically uses the slower Smb1 protocol. SMB is the better option and should select the higher protocol supported. For slow speeds, make sure you=E2=80=99re using smb protocol 3. Also, there=E2=80=99s a bug in some switches if you=E2=80=99re using jumbo f= rames, if one eth card supports it and one doesn=E2=80=99t, then you end up w= ith faster speeds in one direction than the other. Was weird. Also, there=E2=80=99s a lot of improvements to the network stack in later ve= rsions. Not saying it could cause that big of an issue, but there=E2=80=99s a= lot of stuff that can go wrong with connection negotiation and window sizin= g. Netperf is your friend!! https://hewlettpackard.github.io/netperf/ --b ity of a bad patch cable? Tried a different switch and/or a different port o= n the switch? and rsync are three fundamentally different ways to transfer files (SMB and= HTTP are two different protocols), and HTTP typically has better performanc= e than SMB. uggesting is that you could use it to help track down the problem. rote: m

=============================================================== From: Andy Burnett ------------------------------------------------------ Tried connecting though the desktop first using the GUI, which asks for "smb://," but was unable to connect (connection timed out). My daily driver is a laptop, so this is all over wifi. I dual boot MacOS on the laptop and don't seem have the same problems under it. I don't think there's a cabling issue because I'm hitting 30+ MB/s in MacOS over 802.11n (AP is a Ubiquiti Dual Radio Pro AC). Switch is the Ubiquiti US-8 Unifi unmanaged PoE. I don't know much about jumbo frames, packet sizes, and the like, but I have a feeling I'm about to learn... What's strange is that I can't seem to connect to the share under SMB3/SMB2 on Ubuntu, but if I set the "min protocol = LANMAN1" parameter in FreeNAS to allow SMB1, it connects just fine. I've added a line in /etc/fstab that looks something like this: //192.168.x.xxx/mainshare /media/share cifs username=andy,domain=workgroup,noauto,rw,users 0 0 I use the following command to connect, which prompts me for my password and then connects: mount.cifs //192.168.x.xxx/mainshare /media/share I guess this means I'm connecting through CIFS. I hadn't really separated the two protocols in my mind. Would posting netperf or wireshark data here help (I've heard both names before, but am not really familiar with either), or am I just going about connecting in the wrong way? Thanks for all the help so far! -- Sent from: http://chugalug.1100489.n5.nabble.com/

=============================================================== From: Billy ------------------------------------------------------ There’s a good possibility that your older version of Ubuntu didn’t include support for the newer SMB protocols. I think this is more related to connecting st smb1 protocol in Ubuntu and at smb2-3 with the Mac and Windows. That’s the most likely culprit of your slowness. And easiest to fix - upgrade your OS! --b

=============================================================== From: Jason Brown ------------------------------------------------------ While you are trying to troubleshoot it can be difficult to tell what actually changed (editing protocols etc). https://www.samba.org/samba/docs/current/man-html/smbstatus.1.html Particularly to determine which protocol got negotiated. =E2=80=99t I t d s ut