Hi everyone,
I resolved or circumvented all issues I had in recent days regarding my 2.5Gbps network connection between storage server and desktop.
The disk array is a striped zpool that does 350 to 450MB/s easily. Both computers are connected with 2.5G NICs with a 2.5G switch in between and have plenty resources available. I tested iperf3 into both directions and receive stable ~2.36Gbps. I also copied a file over the network using rsync over ssh and received a stable transfer speed of ~230MBs:
rsync -r -v --progress -h -e ssh sapiens@server:/mnt/files/water.mkv /home/sapiens
receiving incremental file list
water.mkv
1.86G 2% 252.13MB/s 0:03:53
The problem is Samba. I created a very simple share not doing any big modifications to the configuration. I mounted the share on the client using the file manager and when copying a file using the file manager I only get a little above 100MB/s. Using rsync
I only get about 70MB/s.
/etc/samba/smb.conf
:
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
server string = %h server (Samba)
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB).
max log size = 1000
# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
logging = file
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
####### Authentication #######
# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
server role = standalone server
obey pam restrictions = yes
# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
unix password sync = yes
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<[email protected]> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
pam password change = yes
# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user
############ Misc ############
# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = no
server min protocol = SMB3
#======================= Share Definitions =======================
[storage]
path = /mnt/files
writeable = yes
mangled names = no