Poor SMB performance using gvfs
Using gvfs-smb writing from my local laptop to my next room SMB server I get ~20MB/s whereas using smbclient directly and using a manually mounted -t cifs mountpoint delivers 50MB/s+.
Setup:
Locally:
- arch linux
- extra/gvfs 1.46.2-1 (gnome) [installed]
- using a usb-c attached network interface
Network:
- Gigabit
- 3 switches in between
- all low-end hardware / unsure about cable quality
Server:
- helios64
- armbian buster
- lvm+md spinning disks backed target
- untweaked (i.e. just added a few shared) standard samba
What I did/tested:
Preparations:
dd if=/dev/urandom of=1g.img bs=1 count=0 seek=1G
gio mount -u smb://192.168.178.92/filme
mkdir peng
mkdir peng2
sudo mount -t cifs //192.168.178.92/filme /home/mop/peng -o username=X,password=Y,iocharset=utf8,vers=3.1.1,uid=1000
sudo mount -t cifs //192.168.178.92/filme /home/mop/peng2 -o username=X,password=Y,iocharset=utf8,uid=1000
Test 1:
time rsync --progress 1g.img /run/user/1000/gvfs/smb-share\:server\=192.168.178.92\,share\=filme/
1g.img
1,073,741,824 100% 18.82MB/s 0:00:54 (xfr#1, to-chk=0/1)
real 0m54.627s
user 0m0.907s
sys 0m3.610s
Test 2 (don't let rsync rate confuse you. look at the time):
[mop@ludwig-otto ~]$ time rsync --progress 1g.img peng/
1g.img
1,073,741,824 100% 1021.92MB/s 0:00:01 (xfr#1, to-chk=0/1)
real 0m18.623s
user 0m0.342s
sys 0m9.099s
Test 3 (again. rsync reports broken numbers for "small" files. my real issue is transferring 30GB+ files ;) ):
[mop@ludwig-otto ~]$ time rsync --progress 1g.img peng2/
1g.img
1,073,741,824 100% 1.02GB/s 0:00:00 (xfr#1, to-chk=0/1)
real 0m21.230s
user 0m0.378s
sys 0m8.447s
Test 4:
[mop@ludwig-otto ~]$ time gio copy 1g.img smb://192.168.178.92/filme/ -p
Transferred 1.1?GB out of 1.1?GB (21.1?MB/s)
real 0m51.182s
user 0m0.131s
sys 0m1.033s
Test 5 (took a moment to enter password):
[mop@ludwig-otto ~]$ time smbclient //192.168.178.92/filme/ -c 'put 1g.img'
smbclient: Can't load /etc/samba/smb.conf - run testparm to debug it
Enter WORKGROUP\mop's password:
putting file 1g.img as \1g.img (50526.5 kb/s) (average 50526.5 kb/s)
real 0m23.428s
user 0m2.761s
sys 0m0.570s