Access to smb:// slow

Hello,
I bought a NAS (Synology DS220j) and I am very happy with it.
Copying an 500 MB video from Windows 8 to the NAS (all connected with LAN cable) is done with 110 MB/s. Same Computer via WLAN with 60 MB/s.

But my Fedora computer shows only 23 MB/s (LAN cable).

When I login to the NAS using the brower UI the file is copied within 3 or 4 seconds.
After that I tried a Ubuntu 20.04 live installation on SSD drive. There copying that file is done with 80 MB/s (LAN cable)

Can somebody help me?
NAS is connected to router via LAN cable.
Fedora computer is connected to router also with LAN cable.
Network: 1Gbit/s

Please use “simple english” so I can understand it :wink:

This is my smb.conf (/etc/samba/smb.conf):

Zusammenfassung
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
#
# Note:
# SMB1 is disabled by default. This means clients without support for SMB2 or
# SMB3 are no longer able to connect to smbd (by default).

[global]
	workgroup = WORKGROUP
	security = user

	passdb backend = tdbsam

	printing = cups
	printcap name = cups
	load printers = yes
	cups options = raw
	
	wins support = no
	socket options = TCP_NODELAY

[homes]
	comment = Home Directories
	valid users = %S, %D%w%S
	browseable = No
	read only = No
	inherit acls = Yes

[printers]
	comment = All Printers
	path = /var/tmp
	printable = Yes
	create mask = 0600
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = @printadmin root
	force group = @printadmin
	create mask = 0664
	directory mask = 0775
1 Like

If you search the web, you find many posts of people with the same performance issues using samba on GNU Linux.

https://www.google.com/search?q=samba+slow+on+linux

I would go ahead and so little research but first of all, try this:

EDIT: There is a lengthy, recent piece on Fedora Magazine, unfortunately it doesn’t talk about performance at all: Fedora 32: Simple Local File-Sharing with Samba - Fedora Magazine

1 Like

The cause of the problem might be unrelated to network protocol, e.g. it can be kernel/driver-specific.
That’s why to isolate the issue, you need to properly measure peak and average performance.

1 Like

I did a test in terminal with iperf -c <IP-Adress NAS>
Thats the result:

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   926 MBytes   777 Mbits/sec

I also tried to add this to smb.conf (did a relogin everytime):

socket options = TCP_NODELAY SO_RCVBUF=524288 SO_SNDBUF=524288 IPTOS_LOWDELAY

or

read raw = Yes
write raw = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384

or

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536

But without a change.

1 Like

It it possible to use other protocols like SFTP?
It typically works with the same credentials as SSH.
And GIO/GVFS should provide seamless workflow for both SMB and SFTP.

2 Likes

Not really. My skills are not the greatest. And adding a smb folder in Files is easy for me.
As I tried to add NFS I didn´t get it working.

I will take a look at SFTP.
EDIT:

Adding FTP is done.

Setting up FTP was very easy! For example I can copy that file above (500MB video) with 92 MB/s. Thats crazy. But is is secure?

Do I need SFTP in my local and privat network? Is FTP not okay?

1 Like

SFTP is an up-to-date secure protocol that is typically served by the same service as SSH.
FTP is an old unencrypted protocol which may have issues traversing NAT.
Although it should not be a problem as long as you use it inside a LAN.

3 Likes

Thank you. Maybe in future I will take a look configuring SFTP. At the moment I am very happy with working FTP in GNOME Files.

So this problem with smb is solved for me :+1:

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.