[Chugalug] Samba slow transfer speeds (Ubuntu 16.04)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Chugalug] Samba slow transfer speeds (Ubuntu 16.04)

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/
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Samba slow transfer speeds (Ubuntu 16.04)

David White-2
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 <[hidden email]> wrote:
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/
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug


--
David White

_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Samba slow transfer speeds (Ubuntu 16.04)

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’re using smb protocol 3.

Also, there’s a bug in some switches if you’re using jumbo frames, if one eth card supports it and one doesn’t, then you end up with faster speeds in one direction than the other.

Was weird.

Also, there’s a lot of improvements to the network stack in later versions. Not saying it could cause that big of an issue, but there’s a lot of stuff that can go wrong with connection negotiation and window sizing.

Netperf is your friend!!


--b

On Sep 12, 2018, at 8:05 PM, David White <[hidden email]> wrote:

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 <[hidden email]> wrote:
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/
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug


--
David White
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug

_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Samba slow transfer speeds (Ubuntu 16.04)

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/
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Samba slow transfer speeds (Ubuntu 16.04)

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

> On Sep 13, 2018, at 8:53 AM, Andy Burnett <[hidden email]> wrote:
>
> 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/
> _______________________________________________
> Chugalug mailing list
> [hidden email]
> http://chugalug.org/cgi-bin/mailman/listinfo/chugalug

_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Samba slow transfer speeds (Ubuntu 16.04)

Jason Brown-2
While you are trying to troubleshoot it can be difficult to tell what actually changed (editing protocols etc).

From the server side,  smbstatus can help quite a bit:  https://www.samba.org/samba/docs/current/man-html/smbstatus.1.html

Particularly to determine which protocol got negotiated.

On Thu, Sep 13, 2018 at 9:16 AM, Billy <[hidden email]> wrote:
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

> On Sep 13, 2018, at 8:53 AM, Andy Burnett <[hidden email]> wrote:
>
> 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/
> _______________________________________________
> Chugalug mailing list
> [hidden email]
> http://chugalug.org/cgi-bin/mailman/listinfo/chugalug

_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug



--
Jason Brown

_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug