Slow wifi connection - buffer is losing the fight

Hello,

I’m suffering from very slow Wifi transfer speed. It’s definitely slow for 4k content and sometimes it’s even slow for 1080p content when the scene is hard and the buffer is not filled because of previous seeking. Can you help me investigate what’s wrong please?

The thing is that I have quite powerful router and it is even in the same room as my Vero 4K only like 4 meters away. I play movies from my NAS that can easily deliver 100 MB/s over wired network. I have tested the speed over wireless network from my laptop and it’s like 30 MB/s as seen on the screenshot attached.

However Vero 4K is losing the buffer when the bitrate is like 38 Mbps which is nearly 5 MB/s. Check the video below. I use 5G network for both laptop and Vero 4K. Bluetooth is turned off in Vero 4K network manager.

https://www.youtube.com/watch?v=j9B7Fdu_yCM

We’ve just been discussing this in the team. How good are you with linux and the commandline?

What we would like is for you to edit your .kodi/userdata/advancedsettings.xml and change the line that says <buffermode>1</buffermode> to <buffermode>0</buffermode> and see if that improves the situation.

Thanks for lightning fast reply. I don’t have the advancedsettings.xml file in /home/osmc/.kodi/userdata directory and not even in /home/osmc/.kodi/system directory.
I did the firmware reset according to Reinstalling OSMC - Vero 4K - OSMC a month ago so that may be the reason.

According to https://kodi.wiki/view/HOW-TO:Modify_the_video_cache#Cache_settings zero is the default value.

These settings are actually in /usr/share/kodi/system/advancedsettings.xml.

But the correct way to change it is to make a new file advancedsettings.xml in ~/.kodi/userdata looking like this:

<advancedsettings>
    <cache>
       <buffermode>0</buffermode>
       <memorysize>524880000</memorysize>
       <readfactor>5.0</readfactor>
    </cache>
</advancedsettings>

Then restart kodi (Power->Exit)

1 Like

I have tried to change it according your example. Forward value in the video statistics is now always 0. Percentages next to it always starts on non-zero value and drops down to 0% very quickly (like 2 or 3 seconds) and that the playback stops. It’s not better than before.

Another thing to notice, pause is not instant anymore. Instead it’s like to show one frame per second for another 5 seconds.

Thanks for that. Could you try setting it to

<advancedsettings>
    <cache>
       <buffermode>1</buffermode>
       <memorysize>131220000</memorysize>
       <readfactor>4</readfactor>
    </cache>
</advancedsettings>

and see what that does. A reboot is required after changing the file.

Can you do some iperf tests from/to vero and NAS?

I have tried. It is almost the same like it was before I started this topic. The only difference is that buffer is very small so it only takes a few seconds to fill if I pause on start. But then it drops very quickly to zero after 10 or 20 seconds of playback.

I will try that, thanks.

Wow I did the iperf3 -c <IP of your iperf3-server> and my Vero 4K froze. I will have to reboot, it’s not event listening on SSH port :slight_smile:

osmc@osmc:~$ iperf3 -R -c 192.168.1.4
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.3 port 54311 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  25.0 MBytes   210 Mbits/sec
[  4]   1.00-2.00   sec  30.5 MBytes   256 Mbits/sec
[  4]   2.00-3.00   sec  31.6 MBytes   265 Mbits/sec
[  4]   3.00-4.00   sec  31.8 MBytes   267 Mbits/sec
[  4]   4.00-5.00   sec  31.3 MBytes   262 Mbits/sec
[  4]   5.00-6.00   sec  30.7 MBytes   257 Mbits/sec
[  4]   6.00-7.00   sec  31.4 MBytes   263 Mbits/sec
[  4]   7.00-8.00   sec  31.1 MBytes   261 Mbits/sec
[  4]   8.00-9.00   sec  31.6 MBytes   265 Mbits/sec
[  4]   9.00-10.00  sec  31.4 MBytes   263 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   307 MBytes   258 Mbits/sec   47             sender
[  4]   0.00-10.00  sec   307 MBytes   258 Mbits/sec                  receiver

iperf Done.
osmc@osmc:~$ iperf3 -c 192.168.1.4
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.3 port 54313 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  27.9 MBytes   234 Mbits/sec    0    437 KBytes
[  4]   1.00-2.00   sec  30.6 MBytes   257 Mbits/sec    0    485 KBytes
[  4]   2.00-3.00   sec  31.0 MBytes   261 Mbits/sec    0    564 KBytes
[  4]   3.00-4.00   sec  31.0 MBytes   259 Mbits/sec    0    587 KBytes
[  4]   4.00-5.00   sec  30.8 MBytes   259 Mbits/sec    0    636 KBytes
[  4]   5.00-6.00   sec  30.7 MBytes   257 Mbits/sec    0    675 KBytes
[  4]   6.00-7.00   sec  30.9 MBytes   260 Mbits/sec    0    724 KBytes
[  4]   7.00-8.00   sec  30.9 MBytes   259 Mbits/sec    0    773 KBytes
[  4]   8.00-9.00   sec  30.8 MBytes   259 Mbits/sec    0    829 KBytes
[  4]   9.00-10.00  sec  31.0 MBytes   260 Mbits/sec    0    875 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   306 MBytes   256 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   304 MBytes   255 Mbits/sec                  receiver

iperf Done.

How is the drive attached, fstab?

I use QNAP NAS that is connected using ethernet cable to the wireless router. It is shared to the Vero 4k by SMB protocol.

This is likely the problem.
Consider an fstab mount. See File sharing with a NAS, media server, windows share or other device

Thanks! Would you recommend to switch to NFS when mounting using FSTAB? Does that also matter?

This has me stumped. You have plenty of bandwidth, it looks stable, and the issue seems to be outside of the buffer. I would try the fstab as Sam suggests if you wanted to continue trying this with the wireless. To test to see if it fixes the problem you would try playing your file from the new mount accessed through the file manager in the settings.

If the router is in the same room a short distance away the most ideal setup would be to run an ethernet cable though.

And NFS should be faster if available.

The problem is caused by the fact that libsmbclient doesn’t read ahead.

SMB via fstab should work well enough without you needing to switch to NFS.

Thanks. I will try autofs, it looks cool.

Wow it’s so much faster now. This support is awesome. Problem solved in 1 hour even after the midnight (at least here) :slight_smile: Thanks again.

3 Likes