Slow reads speeds with Samba shares

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Hap

Slow reads speeds with Samba shares

Post by Hap »

Hi,

I'm facing a problem with the reading speeds of samba shares on my Debian Server, whenever I try to copy a file using Mint file explorer on my main computer or on my laptop using LxLE file explorer my download speeds are near 600 ~ 700 kbit/s which is slower than my internet bandwith. The same exercise on my W10 second laptop gave me full speed near 90 Mbit/s. :?:

My research so far :

First, I checked every cable, no problem from this side, tried to switch them, replace them, only brand new Cat 6.

Secondly, my NIC on my main computer is an infamous Realtek 8168 with r8169 drivers. So I successfully changed the drivers to the latest version 8.0.45 but no luck, that's when I had the idea to test another computer, the one with LxLE equipped with a NetXtreme BCM5756ME.

I tested every computer with Iperf and everyone of them ( playing the role of server or client ) gave me the full Gigabit speed sweetness in every scenarios, so I can assume it's not hardware related and what's making me mad is that this damn W10 I didn't use for at least 6 month was giving me good speeds. :shock:

I tried to copy some large file on my server and, to my surprise, it's was quite good with almost 30 Mbit/s.

I checked my smb.conf and it is totally untouched, the only thing I added were the shares, no fancy option or anything else.

I updated everything with the official repo, Debian (Jessie), Mint (Sonya), LxLE ( latest build can't remember the name ).

I tried downloading a large file through Firefox and it gave me a whooping 1.2 Mbit/s, still it's an improvement but the file explorer is not to blame.

Finally, anger came and I reinstalled Mint and Lxle with no success still slow as a snail.

I'm lost... Did I miss something important ? Do I have to install a Samba client on my computer ? Do I have to sacrifice something during a full moon ?

If someone could be so nice to give me pointers cause I don't know where to look anymore.

Thanks in advance.

UPDATE ( 11/19/2017 )

Still no luck, I tried to scan my NIC with Mii-tool and both passed the test with 1000baseT Full Duplex ( flow control ) connection negociation. Again, not hardware related.

My SSD is not the culprit, I transfered a file from an USB stick onto it and got 30Mbit/s.

Tried Altair solution to no avail, and then tried to add socket options = TCP_NODELAY to smb.conf on both sides aaaand... Nope.

I didn't check my DD-WRT router, will try with another one...

UPDATE ( 11/21/2017 )

I tried Ifconfig : No collision, no packet lost in the way.

I swapped my DD-wrt router with another one, a brand new Tp-Link Archer C2, untouched and unmodified, no firewall. Still no luck.

I'm not lost anymore, I'm stranded.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Slow reads speeds with Samba shares

Post by altair4 »

I want you to try an experiment:

Edit /etc/samba/smb.conf in Mint and right under the workgroup = WORKGROUP line add this line:

Code: Select all

client max protocol = SMB3
Save the file.

Two things will happen - one of them not desired:

[1] Your Mint smb client will access the Samba server using version 3 of the smb dialect.
[2] You will lose the ability to "browse" for shares in the file manager so you will have to explicitly ask for the server and share. You could of course implement an avahi service announcement on your Debian server and have the best of both worlds.

Technobable for my suggestion:

All modern samba / smb servers be they Linux, Windows, or macOS can run at SMB3 but all Linux smb clients by default run at SMB1 so that they can browse for shares. SMB1 is considered "chatty" which makes things very slow. SMB2 was an improvement but SMB3 is even better.

For more: Samba Without SMB1
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Hap

Re: Slow reads speeds with Samba shares

Post by Hap »

Hi,

Thanks for your answer.
I tried to add the line to my smb.conf client side first and then server side ( don't know if it's useful but I'm desperate) and in both case it didn't do a thing.
In fact, I can still access my shared directories with Mint file explorer or Firefox and transfers from my server are still utterly slow despite the warning you gave me about not being able to browse anymore.

Anyway, thanks again for the tip, if you have another idea i'll be happy to try it.
User avatar
coffee412
Level 8
Level 8
Posts: 2204
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: Slow reads speeds with Samba shares

Post by coffee412 »

altair4 wrote:I want you to try an experiment:

Edit /etc/samba/smb.conf in Mint and right under the workgroup = WORKGROUP line add this line:

Code: Select all

client max protocol = SMB3
Save the file.

Two things will happen - one of them not desired:

[1] Your Mint smb client will access the Samba server using version 3 of the smb dialect.
[2] You will lose the ability to "browse" for shares in the file manager so you will have to explicitly ask for the server and share. You could of course implement an avahi service announcement on your Debian server and have the best of both worlds.

Technobable for my suggestion:

All modern samba / smb servers be they Linux, Windows, or macOS can run at SMB3 but all Linux smb clients by default run at SMB1 so that they can browse for shares. SMB1 is considered "chatty" which makes things very slow. SMB2 was an improvement but SMB3 is even better.

For more: Samba Without SMB1
Sorry to jump in here but I found this quite interesting. Does this have any bearing on when you run SAMBA as an AD you have no browsing capabilities for shares? You have to have explicit paths - because its using smb3 ?
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Slow reads speeds with Samba shares

Post by altair4 »

@coffee412,

I don't know about AD specifically but SMB1 and network browsing for netbios names are linked. Cannot have one without the other. At least not yet. If this is an all Linux network or a Linux / macOS network an avahi service announcement will fix things but Windows remains the odd man out.

@Hap,

I don't know what to tell you. The change I suggested will at a minimum double file transfer speeds. You also implied that you can still browse for shares in your file manager which will be disabled if the client is set to smb3. My suggestion is to run Ubuntu or Xubuntu in a live session and see if the issue is resolved. Then you will know if it's another Mint fork issue.

If it happens in Ubuntu as well then it suggests a networking issue not a Samba issue.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Hap

Re: Slow reads speeds with Samba shares

Post by Hap »

Ok, I will try that but, as I wrote in my first post, I've got the same issue with my laptop running LxLe ( Ubuntu 16.04.2 ) so you may be right about the networking problem.
I will try another router and see if the problem comes from DD-wrt.

By the way, I've tried to download some files with SCP from my server to my computer running Mint and it worked great, got around 90Mb/s, so one more clue directing to a networking problem.

Thanks for your help.
Locked

Return to “Networking”