WiFi vs Wired Performance - huge difference

Maybe it has to do with the AP’s security protocol, I will try again tonight with an Open AP and see it there are problems. The thing that worries me is why can I only run in “secure” mode over WiFi.

Are you talking about WPA2?

This is my log:
http://paste.osmc.io/sudehukado

You need to upload a debug log.
You should also run an iperf test if possible.
You should avoid using hostnames in your shares and you should try an fstab based mount for the best SMB performance.
You may have an environmental issue (crowded 2.4Ghz channels)

You say you tried another USB dongle, but you don’t say what model it was. I closed your GitHub issue as the information provided is not sufficient to prove that there is a bug.

I also mounted the shares via fstab and had the same issues. I use the IP and not hostnames.
And no I do not have crowded 2,4Ghz channel.

Debug Log:
http://paste.osmc.io/lupekobeye.coffee

edit:

I am the only one who is using channel 8:

The external Antenna:
TP-Link TL-WN722N (Atheros AR9002U)

Please stick to one thread. I just found five threads with posts from you and it’s very hard to keep track of what you have and haven’t tried.

GetMovieId (smb://NAS12TB/Videos/Spielfilme/Ben Hur/d-benhur-1080p.mkv

Shows that you are still using Kodi’s built-in SMB client and hostnames.

It is still unclear which WiFi adapter you are using. Some people have said that the Pi’s internal antenna is a bit weak, but realistically, it is probably compounded by 2.4Ghz overcrowding. An optimal real world performance speed would be 35-40Mbps for a 1x1 (tx/rx) antenna.

Sam

At the moment I am using the internal antenna. The debug log did not use the shares from fstab.
I copied files from the mounted shared and checked the performance with iftop.

The only thing I could really suggest would be to use speedtest-cli if you are unfamiliar with iperf (this will vary a bit however).

You can run it on OSMC and you could put the dongle in a computer, in the same position in the house and go to speedtest.net and compare the results.

SMB has protocol overhead. You won’t get the full speed. There are also other factors, like whether you are using SMBv2, SMB authentication and things like HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters on Windows systems.

If you want to get better throughput, you will benefit from NFS, but I cannot say that this will resolve the issue. If you don’t have enough bandwidth, it won’t work miracles but it may give you a little more headroom.

Also make sure when you tested the external dongle that you disabled the internal one in /boot/configt.txt.

I disabled the internal one :slight_smile:
I just tested iperf:

root@osmcwohn:~# iperf3 -c 192.168.0.102 -p 5201
Connecting to host 192.168.0.102, port 5201
[  4] local 192.168.0.108 port 55280 connected to 192.168.0.102 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  3.84 MBytes  32.2 Mbits/sec    0   97.6 KBytes
[  4]   1.00-2.00   sec  3.58 MBytes  30.1 Mbits/sec    0    102 KBytes
[  4]   2.00-3.00   sec  4.23 MBytes  35.5 Mbits/sec    0    115 KBytes
[  4]   3.00-4.00   sec  4.12 MBytes  34.6 Mbits/sec    0    120 KBytes
[  4]   4.00-5.00   sec  4.02 MBytes  33.7 Mbits/sec    0    127 KBytes
[  4]   5.00-6.00   sec  4.15 MBytes  34.8 Mbits/sec    0    127 KBytes
[  4]   6.00-7.00   sec  4.14 MBytes  34.7 Mbits/sec    0    127 KBytes
[  4]   7.00-8.00   sec  3.91 MBytes  32.8 Mbits/sec    0    127 KBytes
[  4]   8.00-9.00   sec  3.97 MBytes  33.3 Mbits/sec    0    127 KBytes
[  4]   9.00-10.00  sec  4.08 MBytes  34.2 Mbits/sec    0    127 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  40.0 MBytes  33.6 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  39.8 MBytes  33.4 Mbits/sec                  receiver

iperf Done.

Looks much faster.

This looks correct for single band 802.11n in a reasonably clear environment. This is pretty much the best you’ll get for 802.11n

What would be fine but its just iperf which gets this performance.
Wget gets this:

root@osmcwohn:~# wget http://mirror.global-layer.com/speedtest/100mb.bin
converted ‘http://mirror.global-layer.com/speedtest/100mb.bin’ (ANSI_X3.4-1968) -> ‘http://mirror.global-layer.com/speedtest/100mb.bin’ (UTF-8)
–2017-01-09 17:26:12-- http://mirror.global-layer.com/speedtest/100mb.bin
Resolving mirror.global-layer.com (mirror.global-layer.com)… 109.202.98.200, 2a00:1678:0:2003::1337
Connecting to mirror.global-layer.com (mirror.global-layer.com)|109.202.98.200|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 100000000 (95M) [application/octet-stream]
Saving to: ‘100mb.bin.1’

100mb.bin.1 2%[ ] 2.13M 193KB/s eta 5m 13s

I just mounted the sahres via fstab AND IP Adress and started copying a file:

Still slow.
Its really strange, only iperf gets full speed in my network, every other applicatin (smb / wget) seems to be slow.

You are getting a speed test from that server, so it can be influenced by other networks. I don’t get a great speed with that URL either. It appears to be a NL web host.

All I can really suggest is trying something like NFS, FTP etc and check for QoS in your router.

Nfs with fstab and IP adress:

Still slow. QoS is off.

edit:

copied file with scp (sftp):

Also slow…

iperf between NAS and Raspi 3:

[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 37.7 MBytes 31.6 Mbits/sec 1 sender
[ 4] 0.00-10.00 sec 37.5 MBytes 31.4 Mbits/sec receiver

Looks fine. Every other protocol is slow only iperf is fast…
I tried copying a file to /dev/null but also in this case the speed is slow.
(to avoid that the SD is slow)

edit:
SD is not slow:
200000000 bytes (200 MB) copied, 21.3628 s, 9.4 MB/s
=75,2Mbit/s

edit:
I checked the CPU of router, nas and rpi and they are all fine (under 10%)

Ok now I have a constant good wifi performance but Kodi still stutters while playing a 1080p video. If I take a look at iftop in this moment the speed is 10Mbit/s and this seems to low. If the stuttering happens one cpu core is at 100%.
At the same time if I try other speedtests like wget this is also slow. If I stop the playback wifi is instantly fast again.

My assumption is that kodi is using the cpu that much that the os is not able to get proper wifi speeds. My idea is to change the nice value of kodi.
Is this possible and if yes how?

I followed this posting:

But the problem remained,

Hi,

I am not an expert at all, I m basically trying everything I m getting my hand on so don’t take my post as “the way to go”. That being said have you tried the next link in the exact post you quoted ( the changes to kodi advancedsettings.xml ? ) It helped a lot.

However, I still think the results I get are not normal. I m still investigating it. Maybe is it my Pi 3 integrated chip that’s causing all of this…