Pi2B Streaming from LAN performance terrible (Transfer speed & local play work)

Playing direct from LAN unusable on Pi Model 2B - local play fine, FTP/NFS/CIFS xfer speed fine.

Have tried CIFS, NFS, and FTP… all similar.

Tried all buffer/cache combinations… tried disabling hw acceleration, installed MPG2 codec, etc… nothing.

FTP client on Pi CLI maintains 3MB/s download, FTP from source to Pi maintains 10MB/s. iPerf shows 44MB/s.
Monitoring source when playing video or MP3 direct from LAN source show network utilization of between 0.3-0.75mbps - as you can imagine, this is a bit problematic for playing videos. Some MP3 work, some not so much.

All files play just fine when uploaded to pi and played locally.

@ActionA took a look, but wasn’t able to uncover anything…

Logs here: http://paste.osmc.io/uxehurakoy

Assuming this is something related to how the player requests source data (small network frames? Repeated logons?)

Connection is via wifi with 15’ line-of-sight to WAP, WAP is connected via ethernet to source.

So, after some consulting with others within the project, there are a few things here.

Using buffermode 1 and cachemembuffersize 0 is a mistake on pi. You are effectively forcing all media to be cached to the sdcard. You’ve effectively bottlenecked data flow at the card. Changing these from defaults should really never be required, especially if you are just dealing with LAN content. You advised that you made some edits to /usr/share/kodi/…/advancedsettings.xml. As soon as kodi is updated, these will be gone. You need to remove any changes you’ve made here or in ~/.kodi/userdata/advanc…xml so we can get back to a baseline.

After this, you need to find some way to get an ethernet cable to the pi or vice versa… Does your wifi AP not provide LAN ports for ethernet cables? We’ve got to have a way to find if the issue is wifi or something else. This is how to definitively do that.

[Resolved! (Functionally)]
(Possibly indicative of potential issues?)

[I had previously noted having /usr/share/…/advancedsettings.xml wiped on update - no issue]
[As mentioned before - I tried every combination of caching, so also a non-issue]

I stuck with my packet theory and managed to figure out that my gigabit ethernet adapter, which is physically wired to the WAP, did not have Jumbo Frames enabled - I set this to the max 9KB MTU, and voila. Everything streams over like a boss.

This doesn’t totally explain the issue, as again, I could transfer to and from the Pi and source just fine, as long as this was outside of the player itself.

I feel like this may indicate some packet frame negotiation issue somewhere in the Pi stack, and may very well be worth noting as my config is likely fairly common.

Props to @ActionA for all the digging. Props to @sam_nazarko for insane amounts of work on the Pi et al.

For local advancedsettings put it in /home/osmc/.kodi/userdata/advancedsettings.xml. This will take precedence over the system one that we distribute.

I think Jumbo Frames (or lackthereof) are causing issues with SMB too, but haven’t had enough evidence to support this yet

Sam

I have similar problems now, had my Pi3 for around 1-2 years now, the issue is starting to come up in these few month, when my pi was brand new i’m using cifs mount and had no problem streaming 1Gb files of movies HEVC4/5 720 & 1080, and i’m using wifi as a LAN connection it’s a buffalo wifi ap with 3 antenna’s, a cisco modem with built in wifi, and using mikrotik as AC router, I can connect via cisco or buffalo or mikrotik, but it’s all just ending up the same, lagging in playback, so after using samba/cifs on fstab mounted, and runs smoothly for about 1 year, then when it’s start to lagged, I move it to NFS (UDP) and distribute the advancedsettings.xml, but now rather then lagging, it encounters another issue, 1st sometimes it’s slow in performance of UI, hang in the middle of playback, or taking too long to open a movie.

i was thinking to buy the Pi4B but before doing that, i want to make sure a couple of things:

  1. is there issues with the updated version of OSMC, does anyone had bad performance this year? (since last year through around feb i think, i didn’t have any performance issue.
  2. is someone out there has the experienced in measuring the best way when sharing via LAN is using what kind of protocol? CIFS, NFS or FTP mount would be the best choice.
  3. if cifs v2 or v3? if NFS is based on TCP or UDP?

any input would be appreciated guys. talk to me and share ur thoughts
PS: i didn’t post any logs, since it hangs all the time, so formatted it and fresh install and also testing different kind of SDHC too.

and thanks in advances…

There is no Pi4 support at this time

Sam

Are you sure your issue is with your network connection and not the fact that your trying to play h.265 files on a machine with no hardware decoding for this format? I would recommend copying one of these problem files over to local storage and try to play it from there. I suspect you will find the same playback issues.

with local i didn’t find any issue for playback,
but i had issues with bad performance of UI.

my last guessed is my pi3B is starting to wear off

:stuck_out_tongue:

I don’t understand how playing a file from directly attached storage vs. a network share would change the performance of the UI. I also am a bit confused on how even a bad connection on the RPi’s admittedly not great wifi wouldn’t be able to sustain less than a 1mb/s transfer rate.

I don’t understand you logic to not post logs when you can reproduce the problem. That’s where logs are most useful!

that’s what i’m trying to find out

i will reproduce the issues tomorrow, since i just replace the sdhc with a freshly install osmc, maybe tomorrow i will upload the logs.

Hai all,

so i since yesterday, i turned off the pi3b,
and now i turn it on again, and activate the logs.
so here are the logs:

i’m still tailing the logs until now, will update if there’s a signifant changes in term of experience or error while playing or when it start to lagging

So 3 Mbit is obvisouly not enough to play any proper movies.
So I assume you use Wifi? You would need to optimize your wifi reception if you want to use that.

You either have a problem with your hardware, your source device, or your wifi network. It is clearly not a network protocol or OSMC issue. I checked my RPi 3b+ on wifi and was not seeing an issue with the speed…

osmc@kodicave:~$ iperf3 -R -c 192.168.254.201
Connecting to host 192.168.254.201, port 5201
Reverse mode, remote host 192.168.254.201 is sending
[  4] local 192.168.254.249 port 56230 connected to 192.168.254.201 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  5.63 MBytes  47.3 Mbits/sec
[  4]   1.00-2.00   sec  5.21 MBytes  43.7 Mbits/sec
[  4]   2.00-3.00   sec  4.94 MBytes  41.5 Mbits/sec
[  4]   3.00-4.00   sec  5.14 MBytes  43.2 Mbits/sec
[  4]   4.00-5.00   sec  4.80 MBytes  40.3 Mbits/sec
[  4]   5.00-6.00   sec  4.98 MBytes  41.8 Mbits/sec
[  4]   6.00-7.00   sec  5.38 MBytes  45.1 Mbits/sec
[  4]   7.00-8.00   sec  5.02 MBytes  42.1 Mbits/sec
[  4]   8.00-9.00   sec  5.01 MBytes  42.0 Mbits/sec
[  4]   9.00-10.00  sec  5.03 MBytes  42.2 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  51.4 MBytes  43.1 Mbits/sec                  sender
[  4]   0.00-10.00  sec  51.4 MBytes  43.1 Mbits/sec                  receiver

iperf Done.
osmc@kodicave:~$ iperf3 -c 192.168.254.201
Connecting to host 192.168.254.201, port 5201
[  4] local 192.168.254.249 port 56236 connected to 192.168.254.201 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  5.81 MBytes  48.7 Mbits/sec    0    211 KBytes
[  4]   1.00-2.00   sec  6.37 MBytes  53.4 Mbits/sec    0    211 KBytes
[  4]   2.00-3.00   sec  6.25 MBytes  52.4 Mbits/sec    0    211 KBytes
[  4]   3.00-4.00   sec  5.94 MBytes  49.9 Mbits/sec    0    211 KBytes
[  4]   4.00-5.00   sec  6.07 MBytes  50.9 Mbits/sec    0    211 KBytes
[  4]   5.00-6.00   sec  6.31 MBytes  52.9 Mbits/sec    0    211 KBytes
[  4]   6.00-7.00   sec  5.94 MBytes  49.8 Mbits/sec    0    211 KBytes
[  4]   7.00-8.00   sec  6.19 MBytes  51.9 Mbits/sec    0    211 KBytes
[  4]   8.00-9.00   sec  5.94 MBytes  49.9 Mbits/sec    0    211 KBytes
[  4]   9.00-10.00  sec  6.13 MBytes  51.4 Mbits/sec    0    211 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  60.9 MBytes  51.1 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  60.3 MBytes  50.6 Mbits/sec                  receiver

Hai,

so after testing the first one, later this night, i play it again and started to lag,
here is updated kodi.log
https://paste.osmc.tv/lolafexeka.vhdl

how come u get so big in throughput? what r u using as wifi? A/B/G/N/AC?

My speed is not particularly fast. Your speed is just insanely low.

I didn’t think to look before I ran the iperf (I always use ethernet) but I checked it and it was using 2.4 N on a 20mhz wide channel. I ran it again connected to 5ghz AC and got the following result.

osmc@kodicave:~$ iperf3 -R -c 192.168.254.201
Connecting to host 192.168.254.201, port 5201
Reverse mode, remote host 192.168.254.201 is sending
[  4] local 192.168.254.249 port 60336 connected to 192.168.254.201 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  13.1 MBytes   110 Mbits/sec
[  4]   1.00-2.00   sec  13.9 MBytes   117 Mbits/sec
[  4]   2.00-3.00   sec  13.6 MBytes   114 Mbits/sec
[  4]   3.00-4.00   sec  11.9 MBytes  99.4 Mbits/sec
[  4]   4.00-5.00   sec  11.4 MBytes  95.6 Mbits/sec
[  4]   5.00-6.00   sec  11.4 MBytes  95.5 Mbits/sec
[  4]   6.00-7.00   sec  11.4 MBytes  95.8 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.0 Mbits/sec
[  4]   8.00-9.00   sec  11.4 MBytes  95.2 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.4 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   121 MBytes   101 Mbits/sec                  sender
[  4]   0.00-10.00  sec   121 MBytes   101 Mbits/sec                  receiver

iperf Done.
osmc@kodicave:~$ iperf3 -c 192.168.254.201
Connecting to host 192.168.254.201, port 5201
[  4] local 192.168.254.249 port 60340 connected to 192.168.254.201 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  10.9 MBytes  91.6 Mbits/sec    0    184 KBytes
[  4]   1.00-2.00   sec  12.4 MBytes   104 Mbits/sec    0    218 KBytes
[  4]   2.00-3.00   sec  12.8 MBytes   107 Mbits/sec    0    218 KBytes
[  4]   3.00-4.00   sec  13.3 MBytes   112 Mbits/sec    0    218 KBytes
[  4]   4.00-5.00   sec  13.3 MBytes   112 Mbits/sec    0    218 KBytes
[  4]   5.00-6.00   sec  13.4 MBytes   112 Mbits/sec    0    218 KBytes
[  4]   6.00-7.00   sec  12.6 MBytes   106 Mbits/sec    0    218 KBytes
[  4]   7.00-8.00   sec  12.0 MBytes   101 Mbits/sec    0    218 KBytes
[  4]   8.00-9.00   sec  12.8 MBytes   107 Mbits/sec    0    218 KBytes
[  4]   9.00-10.00  sec  13.2 MBytes   110 Mbits/sec    0    218 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   127 MBytes   106 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   126 MBytes   106 Mbits/sec                  receiver

I would take a look at how you have your wireless network configured. Perhaps you have problems with your three boxes conflicting with each other or sitting on the wrong channels.

if using NG-Mixed i got:

root@osmc:/home/osmc# iperf3 -c 192.168.11.40
Connecting to host 192.168.11.40, port 5201
[  4] local 192.168.11.55 port 57708 connected to 192.168.11.40 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  3.32 MBytes  27.9 Mbits/sec    0    267 KBytes       
[  4]   1.00-2.00   sec  2.57 MBytes  21.6 Mbits/sec    0    267 KBytes       
[  4]   2.00-3.00   sec  2.70 MBytes  22.6 Mbits/sec    0    267 KBytes       
[  4]   3.00-4.00   sec  2.57 MBytes  21.6 Mbits/sec    0    267 KBytes       
[  4]   4.00-5.00   sec  2.63 MBytes  22.1 Mbits/sec    0    267 KBytes       
[  4]   5.00-6.00   sec  2.70 MBytes  22.6 Mbits/sec    0    267 KBytes       
[  4]   6.00-7.00   sec  2.57 MBytes  21.6 Mbits/sec    0    267 KBytes       
[  4]   7.00-8.00   sec  2.63 MBytes  22.1 Mbits/sec    0    267 KBytes       
[  4]   8.00-9.00   sec  2.39 MBytes  20.0 Mbits/sec    0    267 KBytes       
[  4]   9.00-10.00  sec  2.27 MBytes  19.0 Mbits/sec    0    267 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  26.4 MBytes  22.1 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  25.7 MBytes  21.6 Mbits/sec                  receiver

iperf Done.
root@osmc:/home/osmc# iperf3 -R -c 192.168.11.40
Connecting to host 192.168.11.40, port 5201
Reverse mode, remote host 192.168.11.40 is sending
[  4] local 192.168.11.55 port 57712 connected to 192.168.11.40 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  1.71 MBytes  14.3 Mbits/sec                  
[  4]   1.00-2.00   sec  2.29 MBytes  19.2 Mbits/sec                  
[  4]   2.00-3.00   sec  2.39 MBytes  20.0 Mbits/sec                  
[  4]   3.00-4.00   sec  1.96 MBytes  16.5 Mbits/sec                  
[  4]   4.00-5.00   sec  1.97 MBytes  16.5 Mbits/sec                  
[  4]   5.00-6.00   sec  2.32 MBytes  19.5 Mbits/sec                  
[  4]   6.00-7.00   sec  2.60 MBytes  21.8 Mbits/sec                  
[  4]   7.00-8.00   sec  2.39 MBytes  20.0 Mbits/sec                  
[  4]   8.00-9.00   sec  2.12 MBytes  17.8 Mbits/sec                  
[  4]   9.00-10.00  sec  2.03 MBytes  17.0 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  22.0 MBytes  18.5 Mbits/sec                  sender
[  4]   0.00-10.00  sec  22.0 MBytes  18.5 Mbits/sec                  receiver

iperf Done.

when using AC router only my laptop can connect, i don’t think the pi3 are able to connect to an AC wifi. but since my AC router have 2 chip in it, one is B/G/N and the other is A/N/AC (bridged), so osmc connect to B/G/N while my laptop connect to AC the results are like this:

osmc@osmc:~$ iperf3 -c 192.168.88.250
Connecting to host 192.168.88.250, port 5201
[  4] local 192.168.88.248 port 59922 connected to 192.168.88.250 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  1.08 MBytes  9.10 Mbits/sec    0    101 KBytes       
[  4]   1.00-2.00   sec   941 KBytes  7.71 Mbits/sec    0    130 KBytes       
[  4]   2.00-3.00   sec  1.10 MBytes  9.25 Mbits/sec    0    151 KBytes       
[  4]   3.00-4.00   sec   753 KBytes  6.17 Mbits/sec    0    170 KBytes       
[  4]   4.00-5.00   sec   439 KBytes  3.60 Mbits/sec    0    180 KBytes       
[  4]   5.00-6.00   sec   753 KBytes  6.17 Mbits/sec    0    198 KBytes       
[  4]   6.00-7.00   sec   941 KBytes  7.71 Mbits/sec    0    212 KBytes       
[  4]   7.00-8.00   sec  1.10 MBytes  9.25 Mbits/sec    0    212 KBytes       
[  4]   8.00-9.00   sec   878 KBytes  7.19 Mbits/sec    0    212 KBytes       
[  4]   9.00-10.00  sec   878 KBytes  7.19 Mbits/sec    0    212 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  8.74 MBytes  7.33 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  8.15 MBytes  6.84 Mbits/sec                  receiver

iperf Done.
osmc@osmc:~$ iperf3 -R -c 192.168.88.250
Connecting to host 192.168.88.250, port 5201
Reverse mode, remote host 192.168.88.250 is sending
[  4] local 192.168.88.248 port 59926 connected to 192.168.88.250 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   518 KBytes  4.24 Mbits/sec                  
[  4]   1.00-2.00   sec   320 KBytes  2.63 Mbits/sec                  
[  4]   2.00-3.00   sec   106 KBytes   864 Kbits/sec                  
[  4]   3.00-4.00   sec   245 KBytes  2.01 Mbits/sec                  
[  4]   4.00-5.00   sec   550 KBytes  4.50 Mbits/sec                  
[  4]   5.00-6.00   sec   563 KBytes  4.61 Mbits/sec                  
[  4]   6.00-7.00   sec   586 KBytes  4.80 Mbits/sec                  
[  4]   7.00-8.00   sec   305 KBytes  2.50 Mbits/sec                  
[  4]   8.00-9.00   sec   498 KBytes  4.08 Mbits/sec                  
[  4]   9.00-10.00  sec   514 KBytes  4.21 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  4.25 MBytes  3.57 Mbits/sec                  sender
[  4]   0.00-10.00  sec  4.23 MBytes  3.55 Mbits/sec                  receiver

iperf Done.
osmc@osmc:~$

I have 3 wifi routers

  • 1 from ISP it’s a Cisco Modem Router - 192.168.0.0/24 (free)
  • 1 is my brother’s in law, using buffalo - 192.168.11.0/24 (very expensive)
  • 1 is mine, mikrotik AC - 192.168.88.0/24 (very cheap)

and i wonder if ur pi3 and mine different, since u can connect to AC Wifi while mine can’t

Like I posted earlier I tested with my RPi 3b+ and indeed the RPi 3 is not dual band. I have a couple 3’s I could test with but I don’t see the point. Your own results are showing the issue is with your wifi setup as you went from 2mb/s to 20mb/s to 7mb/s on the routers you tested with. I would recommend you spend some time on the internet learning how to optimize your wifi. You should be able to get much better speeds than what your seeing on all the routers you tested.

1 Like