Beryl MT1300 smb and ftp performance

Why is the smb transfer performance much lower than the ftp performance? I am connected to WiFi 5g, in the same point and I am trying to transfer the same file using the two different protocols, at different times. There is nothing else that is using the network. The file I am transferring is present in the ssd connected to the USB 3.0 port of the beryl.

Is there any procedure to speed up the samba protocol?

At first you are comparing the simple FTP with the more complex SMB protocol. In general the rabbit will always be faster than the turtle … but okay.
You are comparing FTP, written after a RFC and tested well, with SMB, written by a huge tech company and still ‘only’ some kind of reverse engineered, today.

I am not familiar with the OpenWRT implementation of SMB, but lets try a little in the [global] section of your smb.conf:

  • TCP_NODELAY - Maybe more packet drops at the destination, but also the resended packages will be faster.
  • IPTOS_LOWDELAY - the same, but for the transport.
  • SO_SNDBUF or SO_RCVBUF - Yeah, just try what are suitable values for your setup. Try not essential more than your OS can handle.
  • does OpenWRT Samba knows SO_SNDLOWAT?
  • Samba is using caching (the thing, that drives everybody insane while calculating the ETA for a download) … Mabe oplocks will help.

Something like this should be the outcome:

[global] 
	log level = 0
	socket options = TCP_NODELAY IPTOS_LOWDELAY 
	read raw = yes
	write raw = yes
	oplocks = yes
	max xmit = 65535
	dead time = 15
	getwd cache = yes
	lpq cache = 30
[some share] 
	oplocks = no

But again, I’m not a samba expert, I try to avoid it, whenever possible,

This is the global section of my smb.conf file:

[global]
	netbios name = GL-MT1300 
	display charset = UTF-8
	interfaces = lo br-lan 
	server string = GL-MT1300-212
	unix charset = UTF-8
	workgroup = WORKGROUP
	browseable = yes
	deadtime = 30
	domain master = yes
	encrypt passwords = true
	enable core files = no
	guest account = nobody
	guest ok = yes
	invalid users = root
	local master = yes
	load printers = no
	map to guest = Bad User
	max protocol = SMB2
	min receivefile size = 16384
	null passwords = yes
	obey pam restrictions = yes
	os level = 20
	passdb backend = smbpasswd
	preferred master = yes
	printable = no
	security = share
	smb encrypt = disabled
	smb passwd file = /etc/samba/smbpasswd
	socket options = TCP_NODELAY IPTOS_LOWDELAY
	syslog = 2
	use sendfile = yes
	writeable = yes

First can test in the PC samba client operate, may be the samba client APP read/write affect.

Also can config the /etc/samba/smb.conf.template
set the socket read/wrte cache size, as:

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
read raw = yes
write raw = yes
large readwrite = yes
getwd cache = yes
write cache size = 262144