You are not logged in.
Hi there!
I'm using Arch several years but never need to ask until now. My samba server is on Arch, client is on Arch as well. Both are sitting on 1Gb network. Transfer rates for writing files bigger than 4GB is 50MiBps which is maximum capability of the disk in server. But rates for smaller files are stuck at 9.5MiBps. I don't know where exact threshold is but 1.6GB file and smaller goes at 9.5MiBps and 4.5GB file and bigger goes at 50MiBps. I have tried to play with smb.conf, searched internet of course but did not found the reason of this behavior. Maybe it is something obvious but I can not see it. Could anyone help me please?
My smb.conf is:
[global]
workgroup = MYGROUP
netbios name = %H
server string = Samba Server
map to guest = Bad User
guest account = player
log file = /var/log/samba/%m.log
max log size = 50
load printers = No
printing = bsd
printcap name = /dev/null
disable spoolss = Yes
show add printer wizard = No
dns proxy = No
#============================ Performance tuning ============================
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_SNDBUF=262144 SO_RCVBUF=262144
keepalive = 60
strict allocate = Yes
min receivefile size = 16384
aio read size = 16384
aio write size = 16384
#============================ Share Definitions ==============================
[share]
path = /srv/share
read only = No
guest ok = Yes
I'm mounting share with this command:
sudo mount -t cifs -o guest,x-systemd.automount,uid=luser,gid=users,file_mode=0777,dir_mode=0777,cache=none -v //192.168.1.100/share/ /mnt/share/
Last edited by Aleš (2015-05-29 18:44:26)
Offline
What are you transferring your files with? The file managers on linux often struggle with smaller files, worst offender so far being dolphin. See my test here.
I'm using a smaller send/receive buffers and my transfer speeds are around 60MiB/s for ~200Mb files and up. The 13k small files as tested in the thread linked above take a long time even when copying via console, 935KiB/s.
My settings:
socket options=SO_RCVBUF=131072 SO_SNDBUF=131072 IPTOS_LOWDELAY TCP_NODELAY
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline
Wow, it seems you hit the nail on the head. Thank you very much for your response!
I'm using krusader for transferring my files normally. I have just tried to use pcmanfm and the result was slow rates (9.5MiBps) for both mentioned file sizes. Then I tried cp in command line and it was fast (50MiBps) even for 400MB file. It seems to me that krusader use another algorithm for extremely big files.
I have tried settings you posted earlier but sendfile option does not have any effect in my case and smaller socket buffer size caused slightly lower transfer rates for those "extremely" big files.
Offline
You can use the script I wrote and do some time tests (just mod it to vary the file size to your liking): https://bbs.archlinux.org/viewtopic.php?id=188613
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Mistery solved.
Thank You everybody involved!
I used option cache=none for cifs year or two ago for a reason which I do not remember yet :-). I underrated my disk also - it has about 120MBps write rates according to tests on the net. I ended up with settings below and I'm seeing transfer rates about 90MiBps for file sizes from 400MB (I didn't tested smaller). This is close to gigabit network limit and it is absolutely perfect for me!
smb.conf:
[global]
workgroup = MYGROUP
netbios name = %H
server string = Samba Server
map to guest = Bad User
guest account = player
log file = /var/log/samba/%m.log
max log size = 50
load printers = No
printing = bsd
printcap name = /dev/null
disable spoolss = Yes
show add printer wizard = No
dns proxy = No
#============================ Performance tuning ============================
socket options = TCP_NODELAY IPTOS_LOWDELAY
min receivefile size = 16384
aio read size = 16384
aio write size = 16384
#============================ Share Definitions ==============================
[share]
path = /srv/share
read only = No
guest ok = Yes
mount command:
sudo mount -t cifs -o guest,x-systemd.automount,uid=1000,gid=1000,file_mode=0660,dir_mode=0770 -v //192.168.1.100/share/ /mnt/share/
Last edited by Aleš (2015-05-29 18:42:43)
Offline