You are not logged in.
Hi All,
I am turning to you guys, because after several weeks or trying to sort out the slow streaming from my arch desktop from samba share I am out of ideas.
The home setup -
Desktop: Archlinux (Asus P5Q Turbo motherboard) - cabled connection
Router: Virgin Media SuperHub 2
Nas: GoFlex Home - running archlinux ARM - cabled connection
Now I have samba shares setup on both my desktop and my goflex (on same network) While accessing video files from either phone (LG G3) or tablet (Nexus 10) the videos load instantly from the NAS - however the videos from the desktop load slowing and keep stoping to buffer every 30 secondes or so.
Checking the smb.conf from the NAS, no tweaks were needed so no tweaks can be taken from there.
Please see below desktop smb.conf
Looking forward for your suggestion or hopefully solution.
Many thanks,
[global]
workgroup = MYGROUP
server string = Samba Server
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = No
wins support = Yes
idmap config * : backend = tdb
valid users = sweetth
admin users = sweetth
read raw = yes
write raw = yes
strict locking = No
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
oplocks = true
Read size = 16384
Offline
If you're streaming, then samba has nothing to do with it.
Offline
Thank you for your answer.
If samba has nothing to do with it then what has? And how to resolve the issue?
Offline
I don't know what's installed on your NAS for streaming media. On my server, I'm using a highly modified version of MediaTomb. There are a few other servers out there, the one coming most readily to mind is Plex.
Offline
I think there is been an misunderstanding. I connect to my desktop through samba share using ES File Explorer on my phone/tablet. Same principle on my Nas. However on my Nas I have minidlna running to allow my xbox one to read the files.
So unless I am mistaking it is samba which is at fault there.
Offline
Ah, ok.... You aren't streaming, you're sharing. Have you checked the download rates/speeds between your NAS and wireless (tablet and phone) and you speeds between NAS and wired (desktop)? Also, your socket options seem a tad high. Have you tried lowering them to 65532 instead of 131072? I found that change to speed up my samba sharing from about 3-4 MB/s to 6-8 MB/s (still drops to 4-5 MB/s every now and again, depends on the format/compression of the file I'm moving) .
Offline
Thanks again for the reply, just tried the suggested changed but it's still the same.
Any other suggestion?
Offline
I'm having decent speeds (~80MB/s) via my gigabit link with these settings, was much lower (~50MB/s) before, so give them a try:
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
A good place to start for configuring and optimizing samba would be here: https://calomel.org/samba.html
Offline
Thanks for the replies.
Tried the configs - that didn't change anything. download file at 330kb/s but uploading at 3.5mb/s
Also looked at calomel before but I have tried most and nothing works neither. Any other idea?
Offline
Offline
God that was a very quick reply!
Many thanks
Offline
Hmm that's weird really. If you were running windows (:P), I'd recommend looking at driver settings of your network card, especially the TCP offloading setting. No idea if there is something like that on linux.
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline
Well I have joined the samba mailing list and asked the question there. Hopefully will get it sorted.
Cheers
Offline
Well I have joined the samba mailing list and asked the question there. Hopefully will get it sorted.
Cheers
Hello i know it's an old discussion and apologize for this but i have the same issue with both Arch and Debian and i was wondering if you have found a solution for this problem.
Thank you for your help
Offline
Well yes the issue is sorted, my old trusted pc died and got replaced. Since then i do not have any issue and i think it was done to the network card being old and slow. Hope that help
Offline
Well yes the issue is sorted, my old trusted pc died and got replaced. Since then i do not have any issue and i think it was done to the network card being old and slow. Hope that help
Thank you for your quick answer! ... So i have to kill my old pc!:P
By the way the strange thing is this: if i read the shared directory from a windows machine, and so Arch ---smb---> windows i get an average speed of 120MB/s. I also get the same speed by sending a file to Arch from windows and to Arch server from another linux machine. No idea.
BTW thank for your answer
Offline
ohhh! found the solution!! after spend hours and near to buy a pci card i looked in an old bug report in linux tree where this Ethernet controller corrupt tcp/ip package of ipv6 protocol. After testing some patch with no results and also disabling ipv6 the idea: maybe the TSO of the card is broken also in the ipv4 connectivity and the answare is YES: disabling TCP segmentation offloading also for the ipv4 (the ipv6 was disabled in the driver years ago by linux developers ) fixes all problems of packets corruption. So for everbody that will look to this discussion this is the workaround:
First found the interface name with
ip addr | sed '/^[0-9]/!d;s/: <.*$//'
then check if the TSO is off with
ethtool -k yourcard
My result was
Features for enp2s0:
rx-checksumming: off [fixed]
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: on [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: off [fixed]
as you can see the ipv6 was turned off by linux developers years ago! Now disable completly with
ethtool -K yourcard tso off
now you should see
Features for enp2s0:
rx-checksumming: off [fixed]
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: on [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: off [fixed]
Now every ploblem that causes packets to be resend are gone.
I've also send a bug report to bugzilla.kernel.org
Hope it helps
Offline