RPI4 SMB server, slow transfer

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
dikato
Posts: 3
Joined: Sat May 23, 2020 4:45 am

RPI4 SMB server, slow transfer

Post by dikato »

Anyone have advice on how to speed up my SMB configuration?
I have a usb3 hard drive connected to my RPI4, I enabled the cmdline.txt quirk for the USB hard drive.
transfer speeds seem to range between 1.2 and 3.8 MB/s to both the SDcard and the Hard drive.
The speed ranges when I try various smb.conf settings. 1.2 is at minimalist configuration.
3.8 MB/s is when I provide a config I found on the net.
[global]
server multi channel support = yes
server role = auto
server min protocol = SMB3_11
workgroup = WORKGROUP
logging = systemd
log level = 1 auth:5 winbind:5
max log size = 1000
guest account = nobody
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
show add printer wizard = no
disable netbios = yes
dns proxy = no
deadtime = 1800
invalid users = root
##smb encrypt = off
security = user
##socket options = TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_RCVBUF=131072$
##socket options = TCP_NODELAY IPTOS_LOWDELAY
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
min receivefile size = 16384
use sendfile = yes
write cache size = 262144
strict locking = no
aio read size = 16384
aio write size = 16384
ntlm auth = yes
workgroup = WORKGROUP
server string = %h server
log file = /var/log/samba/log.%m
syslog only = no
syslog = 0

panic action = /usr/share/samba/panic-action %d

security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword$
pam password change = yes
map to guest = bad user

User avatar
Joulinar
Posts: 1542
Joined: Fri Nov 15, 2019 11:49 pm

Re: RPI4 SMB server, slow transfer

Post by Joulinar »

Hi,

many thanks for your request. It might not 100% fitting but maybe you can have a look to this community tutorial

viewtopic.php?f=15&t=7611
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

dikato
Posts: 3
Joined: Sat May 23, 2020 4:45 am

Re: RPI4 SMB server, slow transfer

Post by dikato »

Hi !

Thanks for the tip, I switched my smb.conf to the one used by openmediavault that people report has high throughput in smb ith RPI4. It includes the socket options from the thread you recommended.

I now get 3.3 MB/s to the SDcard and 5.2 MB/s to the usb3 drive. the wired eth0 connection reports speed as 1000mb.

Any suggestions from here?

[global]
workgroup = HOME
server string = %h server
dns proxy = no
log level = 0
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = yes
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = no
unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY
guest account = nobody
load printers = no
disable spoolss = yes
printing = bsd
printcap name = /dev/null
unix extensions = yes
wide links = no
create mask = 0777
directory mask = 0777
use sendfile = yes
aio read size = 16384
aio write size = 16384
null passwords = no
local master = yes
time server = no
wins support = no

User avatar
Joulinar
Posts: 1542
Joined: Fri Nov 15, 2019 11:49 pm

Re: RPI4 SMB server, slow transfer

Post by Joulinar »

hmm I searched the web and did find quite some messages about slow samba performance. However there did not seems to be the one and only solution. Most of the time same recommendation are given but it did not fix it for everybody.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

dikato
Posts: 3
Joined: Sat May 23, 2020 4:45 am

Re: RPI4 SMB server, slow transfer

Post by dikato »

Just an update, It did seem to be the RPI4, I moved the SD card to a new pi4 and got fullspeed with SMB.

Thanks!

User avatar
Joulinar
Posts: 1542
Joined: Fri Nov 15, 2019 11:49 pm

Re: RPI4 SMB server, slow transfer

Post by Joulinar »

to bad that it seems your board. Can you share your final smb.conf file. I would like to have a check in my RPi4 to see how it behave. ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team

Post Reply