Slow Cache Speed

  • Hi,

    I'm having problems with video streams on 8 with a RPi3. When I initially open these streams for the first 30seconds or so the streams are struggling to build up a cache and causing stuttering. After this initial period the stream then works flawlessly and will run fine for hours on ends. This is happening across all streams and formats regardless of server.
    I have tried using WiFi and ethernet connections but am having the same results.

    I have edited my advancedsettings.xml as per the Kodi 17 tags but this has made no change. Cache does not appear to be filling the RAM whatsoever no matter how I edit the XML file.

    I'm starting to think this problem may be due to the fact Kodi is caching to my SD card which has a slow write speed. ~2mb/s. (Yes I need to replace it). Is this a likely cause?

    Can anyone suggest why the advanced settings are not caching to RAM or alternatively. Is it possible to redirect the Kodi directory which caches these streams to a USB flash drive which has a much higher write speed?

    Thanks

  • Faster I/O on the card will always help the overall LE/Kodi experience, but the "slow" I/O on the card is still many times faster than your ISP connection so buffering issues are about ISP/latencies not hardware. The read-ahead setting in the buffer can be increased, but cache tweaking only ever solves local network performance issues, i.e. bursty wifi and drop-outs, not "my internet connection isn't fast enough" type issues. As a broad rule unless your internal network is crap (in which case the solution is fixing your network) cache tweaks should not be needed.


  • Faster I/O on the card will always help the overall LE/Kodi experience, but the "slow" I/O on the card is still many times faster than your ISP connection so buffering issues are about ISP/latencies not hardware. The read-ahead setting in the buffer can be increased, but cache tweaking only ever solves local network performance issues, i.e. bursty wifi and drop-outs, not "my internet connection isn't fast enough" type issues. As a broad rule unless your internal network is crap (in which case the solution is fixing your network) cache tweaks should not be needed.

    Thanks, i've just done a speed write test on the card and am getting 10mb/s so I don't think that is the problem. I've got a 100mb/s connection and am getting close to these speeds on the rpi so I am at a loss as to what is actually causing this.

    Is there a reason that even with the advanced settings my cache is still not filling the ram as it is meant too?

    These are my current settings.

    They seem to be what Krypton dictates as the new requirements in their wiki yet these are not making any difference whatsoever. It just seems odd that it's only the initial cache causing problems and then the streams works flawlessly for hours on end afterwards.

    The only difference I can see in the connection between the rpi and any other device connected in the house is that the ping rate on the pi is somewhat higher. I am unsure what is causing this because even when wired it stays higher.

    Edited once, last by kall (February 26, 2017 at 6:30 AM).

  • Internet connection means "path between you and the service you're accessing" not the link speed between your router and the ISP, which is nearly always going to be good and above suspicion. The problem is somewhere in that path, and again, cache tweaking solves local (not remote) network problems. If it takes 5-30 seconds to get a stable flow of bits from the remote server, that's how long it takes.

  • Thanks,

    This makes sense however the exact same streams do not have this issue when accessing them on another device within the network. It seems to be a specific problem to the rpi3 only. This is why I am convinced it is a local problem.