Slow network speed to SMB/NFS. Wget Fails

Hello

I am having buffering issue when playing videos from my SMB/NFS Share. I have done few tests to troubleshoot and hope you guys could help me out!

  • playback from USB drive is fine.

  • Accessing Files from SMB is slow.

  • Accessing Files from NFS is slow.

  • Windows10 access speed to SMB share working fine.

  • CP command from SMB/NFS share to sd card speed is 27.2 KiB/s

  • I tried adjusting advancedsettings.xml as recommended.

  • Tried using LAN/Wifi.

  • Tried using speedtest-cli. results
    Testing download speed…
    Download: 92.89 Mbit/s
    Testing upload speed…
    Upload: 47.98 Mbit/s

  • wget command fails to download. stuck at resolving then connecting. but wget works fine on my other linux boxes.

    wget --output-document=/dev/null http://speedtest.wdc01.softlayer .com/downloads/test500.zip
    –2020-05-05 01:46:49-- http:// speedtest.wdc01.softlayer .com/downloads/test500.zip
    Resolving speedtest. wdc01.softlayer .com (speedtest. wdc01.softlayer .com)… 158.85.230.20, 2607:f0d0:3006:6c::4
    Connecting to speedtest. wdc01.softlayer .com (speedtest. wdc01.softlayer .com)|158.85.230.20|:80…

  • wget google.com looks fine to me
    osmc@osmc:~$ wget google .com
    –2020-05-05 01:49:43-- http://google. com/
    Resolving google .com (google .com)… 216.58.207.14, 2a00:1450:4019:802::200e
    Connecting to google .com (google .com)|216.58.207.14|:80… connected.
    HTTP request sent, awaiting response… 301 Moved Permanently
    Location: $$$http://www.google .com/ [following]
    –2020-05-05 01:49:43-- http://www. google .com/
    Resolving www. google .com (www. google .com)… 172.217.19.164, 2a00:1450:4019:802::2004
    Connecting to www. google .com (www.google .com)|172.217.19.164|:80… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: unspecified [text/html]
    Saving to: ‘index.html.2’

    index.html.2 [ <=> ] 14.87K --.-KB/s in 0.002s

    2020-05-05 01:49:43 (9.61 MB/s) - ‘index.html.2’ saved [15225]

  • etc/host and etc/resolve looks normal compared to my home server.

not sure what else to try!

/etc/resolv.conf
nameserver 192.168.0.1

/etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 192.168.0.129
192.168.0.129 osmc

Can you show us how you mounted the share?
Also post full system logs

Hello

-SMB mount from osmc gui and also from /etc/fstab

-NFS using command
sudo mount -t nfs -o hard,intr 192.168.0.167:/storage/virtual/ /mnt/nfs/

I will attach logs when I reach home. Had to install syslog-ng package.

Surely not needed.
Just upload logs with grab-logs -A

Also provide iperf3 results (both directions) between OSMC and your Server

https://paste.osmc.tv/kaqegexedu

Iperf Centos(client) to OSMC(server)
Connecting to host 192.168.0.129, port 5201
[ 4] local 192.168.0.167 port 35484 connected to 192.168.0.129 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 287 KBytes 2.35 Mbits/sec 39 2.83 KBytes
[ 4] 1.00-2.00 sec 157 KBytes 1.29 Mbits/sec 19 5.66 KBytes
[ 4] 2.00-3.00 sec 158 KBytes 1.30 Mbits/sec 17 2.83 KBytes
[ 4] 3.00-4.00 sec 238 KBytes 1.95 Mbits/sec 19 5.66 KBytes
[ 4] 4.00-5.00 sec 153 KBytes 1.25 Mbits/sec 17 2.83 KBytes
[ 4] 5.00-6.00 sec 158 KBytes 1.30 Mbits/sec 20 2.83 KBytes
[ 4] 6.00-7.00 sec 158 KBytes 1.30 Mbits/sec 16 2.83 KBytes
[ 4] 7.00-8.00 sec 157 KBytes 1.29 Mbits/sec 20 2.83 KBytes
[ 4] 8.00-9.00 sec 156 KBytes 1.27 Mbits/sec 16 2.83 KBytes
[ 4] 9.00-10.00 sec 156 KBytes 1.27 Mbits/sec 20 2.83 KBytes


[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 1.74 MBytes 1.46 Mbits/sec 203 sender
[ 4] 0.00-10.00 sec 1.68 MBytes 1.41 Mbits/sec receiver

Iperf Centos(server) OSMC (client)
Accepted connection from 192.168.0.129, port 57916
[ 5] local 192.168.0.167 port 5201 connected to 192.168.0.129 port 57918
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 10.8 MBytes 90.7 Mbits/sec
[ 5] 1.00-2.00 sec 11.2 MBytes 94.1 Mbits/sec
[ 5] 2.00-3.00 sec 11.2 MBytes 94.1 Mbits/sec
[ 5] 3.00-4.00 sec 11.2 MBytes 94.2 Mbits/sec
[ 5] 4.00-5.00 sec 11.2 MBytes 94.1 Mbits/sec
[ 5] 5.00-6.00 sec 11.2 MBytes 94.1 Mbits/sec
[ 5] 6.00-7.00 sec 11.2 MBytes 94.1 Mbits/sec
[ 5] 7.00-8.00 sec 11.2 MBytes 94.2 Mbits/sec
[ 5] 8.00-9.00 sec 11.2 MBytes 94.1 Mbits/sec
[ 5] 9.00-10.00 sec 11.2 MBytes 94.1 Mbits/sec
[ 5] 10.00-10.04 sec 474 KBytes 93.9 Mbits/sec


[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.04 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.04 sec 112 MBytes 93.8 Mbits/sec receiver

Well here is the problem.
What is the Pi connected to?
Have you tried another cable?

Also I see you are running iptables how does the test look like with all iptables cleared?

PI3 connected to CentOS Linux 7.8.2003
I have tested it with another cable just now. same speed.

I was playing with iptables to allow port 5201.

osmc@osmc:~$ sudo iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination

I mean which hardware? A switch, router,…

Well if you not have configured iptables then no need to allow anything.

Connected to a Dlink router DIR-853/ET

Well hard to say.
As a first step would try with Raspbian on another SD Card and see if you get proper iperf3 speeds in both directions there.

Brand new card. the speeds look fine if I do pref on windows to osmc.

pref3 on windows 10 wifi (client) OSMC (server)
Accepted connection from 192.168.0.116, port 51544
[ 5] local 192.168.0.129 port 5201 connected to 192.168.0.116 port 51545
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 5.56 MBytes 46.6 Mbits/sec
[ 5] 1.00-2.00 sec 6.13 MBytes 51.4 Mbits/sec
[ 5] 2.00-3.00 sec 6.14 MBytes 51.5 Mbits/sec
[ 5] 3.00-4.00 sec 6.13 MBytes 51.4 Mbits/sec
[ 5] 4.00-5.00 sec 6.15 MBytes 51.6 Mbits/sec
[ 5] 5.00-6.00 sec 6.17 MBytes 51.7 Mbits/sec
[ 5] 6.00-7.00 sec 6.13 MBytes 51.4 Mbits/sec
[ 5] 7.00-8.00 sec 6.22 MBytes 52.2 Mbits/sec
[ 5] 8.00-9.00 sec 6.03 MBytes 50.6 Mbits/sec
[ 5] 9.00-10.00 sec 6.07 MBytes 50.9 Mbits/sec
[ 5] 10.00-10.05 sec 293 KBytes 52.9 Mbits/sec


[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.05 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.05 sec 61.0 MBytes 50.9 Mbits/sec receiver

Edit:

Swapped with old sd card with plain debian on it. same issue iperf3 speeds

That is not “fine” you need to get >90Mbit

Something wrong with either the ethernet port, the cable, the switch port or the negotiation

It’s 10 year old wifi card that I’m currently using haha. Same ftp speed when I transfer small files.

I would say the negotiation since the port works fine but doesn’t get along with centos. How would you go about fixing it?

image

That’s your problem…

1 Like

you didnt get what I am trying to say! wifi card on windows box (no issue here!). my issue is the slow speed between rpi3 and centos server.

I am not having any issues with windows + rpi speeds or windows + centos speed. my issue is rpi and centos are not getting along (both connected by Ethernet!)

So to clarify your setup:

Pi -> CAT5/6 cable -> DLINK -> CAT5/6 cable -> CentOS Server
Windows -> WIFI ---------^

Is that correct?

Yes! the only speed issue I am having is with centos and rpi3. This doesnt seem osmc issue. as I am having the same issue with ubuntu server and plain Debian installation.

Please show us the iperf3 speeds between Windows and CentOS.

Based on the data supplied, my own reading of this thread is that every time the CentOS server is part of a test, the performance is poor.

No. the connect between windows and centos is fine. but currently limited to my old wifi card. I get the same speed if I connect from windows to rpi3 or centos regardless.

windows wifi (client) centos (server)
Connecting to host 192.168.0.167, port 5201
[ 4] local 192.168.0.116 port 59750 connected to 192.168.0.167 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 5.88 MBytes 49.2 Mbits/sec
[ 4] 1.00-2.00 sec 4.88 MBytes 40.9 Mbits/sec
[ 4] 2.00-3.00 sec 5.75 MBytes 48.2 Mbits/sec
[ 4] 3.00-4.00 sec 6.00 MBytes 50.4 Mbits/sec
[ 4] 4.00-5.00 sec 6.12 MBytes 51.4 Mbits/sec
[ 4] 5.00-6.00 sec 6.25 MBytes 52.4 Mbits/sec
[ 4] 6.00-7.00 sec 6.25 MBytes 52.4 Mbits/sec
[ 4] 7.00-8.00 sec 6.12 MBytes 51.4 Mbits/sec
[ 4] 8.00-9.00 sec 6.25 MBytes 52.5 Mbits/sec
[ 4] 9.00-10.00 sec 6.12 MBytes 51.3 Mbits/sec


[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 59.6 MBytes 50.0 Mbits/sec sender
[ 4] 0.00-10.00 sec 59.6 MBytes 50.0 Mbits/sec receiver

iperf Done.

the only issue here is when rpi3 (server) and centos (client). the speed when RPI3(client) centos (server) is 94.5 Mbits/sec.