Slow network read speed
#1
I've been having a bit of a problem streaming some of my recent Blu-Ray rips over my powerline network with Kodi. I'm running pretty close to the available bandwidth, but after a bit of maths, I'm pretty sure on average there's enough bandwidth, and I've got a large cache set up in advancedsettings.xml.

So I've downloaded and compiled the latest code and found that network read performance (from SMB share) is much better in the latest git version vs. Jarvis, but it was still slower than a Windows file copy.

One thing that has made an impact is changing the read cache chunk size in xbmc/filesystem/FileCache.cpp

I've changed that from 64k to 512k:

Code:
#define READ_CACHE_CHUNK_SIZE (512*1024)

For my setup that gives a few more percent in the maximum read speed, which takes the limit for a typical 2 hour Blu-Ray rip that streams smoothly to about 35GB - I think, the largest one I've got is 34GB Smile

Not sure what the effect would be on anyone using smaller buffers though (I've got mine set at 100MB, because certain stuff affects throughput on my powerline network).
Reply
#2
This may explain the behavior I'm seeing with the Apple TV 4 Dec 23 test build and Blu Ray rips. I have terrible buffering on an 802.11ac connection tested at 49MB/s.

Question is how to recompile the AppleTV4 test project with this change? Any pointers appreciated.
Reply
#3
this change will be added to my RC3 version for tvos ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#4
The issue can be observed on all platforms. A too large value harms i.e. bluray ISO playback over network. Something between 256 and 128 should be a ok.
Reply
#5
(2017-01-15, 17:24)Memphiz Wrote: this change will be added to my RC3 version for tvos ...


Thank you!!
Reply
#6
(2017-01-15, 17:24)Memphiz Wrote: this change will be added to my RC3 version for tvos ...

Not sure if this testbuild was supposed to have this change but I tested and the issue persists:

http://mirrors.kodi.tv/test-builds/darwi...b-tvos.deb
Reply
#7
Yes it has the change...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#8
(2017-01-20, 10:34)Memphiz Wrote: Yes it has the change...


Dang. Ok. Thanks. Have you tried 1080P / BluRay?

Is it working smoothly for you?
Reply
#9
Nope
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#10
For the record: I used 128 KB since longer time via NFS which is also fine for me (concerning too large is bad for bluray isos)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#11
(2017-01-21, 19:19)Memphiz Wrote: Nope


Someone mentioned a Beta 7 AT4 build and it was working well for 1080p / BluRay content. Do you know if that's available someplace? That's not the latest test build you put up is it?
Reply
#12
Try turning off vtb video decoding - that was not there in beta7 i think. I doubt it will make the situation better though.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#13
(2017-01-22, 13:44)Memphiz Wrote: Try turning off vtb video decoding - that was not there in beta7 i think. I doubt it will make the situation better though.


Ah I see Beta7 = Dec23 build I was already running. I see your commit bumping the read chunk to 512 as well in the Jan build deb.

Note the BluRay disk images I'm using are straight rips, not transcoded so the bit rate is pretty high. I've tested the latest OSX build with the same BluRay images and it works fine with locally attached disk at least.

I do note that disk I/O is very bursty running on OSX with local storage and smooth playback: giant disk reads of 50MB/s, then nothing for 30 seconds, repeat.

On ATV4 over the local net on 802.11ac (1300mbps) to the same disk mounted via NFS, I see disk I/O requests on the server of only 4-6MB/s magnitude and more continuous. I don't think that's a high enough request rate to keep up, hence the buffering.

I've configured the MacPro server for high speed net IO, and tested it to sustained 50MB/s throughout to that server from another local net machine, so the server and net shouldn't be the problem.

Open to ideas. The fact that someone else is seeing the same buffering/stuttering issue with BluRay means I'm not alone at least.

To the poster above who has smooth playback with BluRay on ATV4 Beta 7, can you possibly describe a bit of your setup?

Much appreciated guys.
Reply
#14
6MB/s are 48 MBit/s - how high is the bitrate of the rip?
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#15
(2017-01-24, 08:49)Memphiz Wrote: 6MB/s are 48 MBit/s - how high is the bitrate of the rip?

Standard BluRay rip, not sure the Mbps. I have noticed on iOS (iPad Pro 12") or tvOS that

1) ANY HD 1080P file or BluRay rip plays terribly and

2) If I turn OFF de-interlacing, playback is VASTLY improved, even smooth at points but of course looks terrible because it's interlaced.

#2 with the high CPU observations indicates to me that Kodi is CPU bound in a big way with 1080P content in general, and can't process the frames fast enough to keep up with 30fps, hence the low net IO read rate.

Are we properly making use of HW acceleration on iOS? Seems like maybe a compile or build option not set right could be the issue, as both ATV4 and iOS on iPad Pro can easily handle 1080P playback in other apps.
Reply

Logout Mark Read Team Forum Stats Members Help
Slow network read speed0