1. Welcome to the official forum for MINIX devices!

best buffer settings?

Discussion in 'Kodi/XBMC for MINIX Releases' started by MINIX - Ken, Mar 6, 2015.

  1. MINIX - Ken

    MINIX - Ken MINIX Team Member Administrator

    Dear all,

    We are trying to modify the V13.3.3 final's buffer settings, and to apply on our future releases also.

    Please suggest a value that you have been using/testing and believe it's good for the general user group.

    Thanks!

    Regards,
    Team MINIX.
    htp367 likes this.
  2. htp367

    htp367 New Member

    Thank you for this. My Neo X8H+ was buffering like crazy when I stream live TV on XBMC. I will try a buffer setting file tomorrow. Thanks.
  3. Frederick_99

    Frederick_99 Well-Known Member Trusted Helper

    Hi Ken,

    I use a ~300Mb buffer with these settings, seems to work reasonably well provided a good streaming source. No buffering with local (NAS) sources.

    <advancedsettings>
    <network>
    <cachemembuffersize>314572800</cachemembuffersize>
    <curlclienttimeout>45</curlclienttimeout>
    <buffermode>1</buffermode>
    <readbufferfactor>5</readbufferfactor>
    </network>
    </advancedsettings>
    Harry S likes this.
  4. MINIX - Ken

    MINIX - Ken MINIX Team Member Administrator

    More is better, but we need an optimal setting that is balanced and good for all users. :)
    sangaz and htp367 like this.
  5. ENDRJUPL

    ENDRJUPL Well-Known Member Super Moderator

    150Mb never failed me :) I'm using it for about a year and a half.
    sangaz and htp367 like this.
  6. sangaz

    sangaz Member

    Looking forward for this setting to be added to MINIX xbmc. Thanks ahead to @MINIX Ken
    htp367 likes this.
  7. From what I have seen when streaming the buffers maxes out at 15 seconds so never fills more than 50-55 MB anyway. Much more important is readbuffer factor to make sure it build quick enough. I have buffer 100 MB and it only uses 50 MB anyway and readbufferfactor=4. This is based on 32 Mbps connection should be less for slower connections. I would think the most widespread settings for general use are readbufferfactor=2 cachemembuffersize=52,428,800
    sangaz likes this.
  8. georgica81

    georgica81 New Member

    mine is like this:
    <advancedsettings>
    <splash>false</splash>
    <network>
    <buffermode>1</buffermode>
    <cachemembuffersize>235929600</cachemembuffersize>
    <readbufferfactor>20</readbufferfactor>
    </network>
    </advancedsettings>

    225MB => x3 for RAM = 675MB. I thought it's the sweet spot, since the available RAM after boot is 8-900MB.
    sangaz likes this.
  9. Readbufferfactor=20 has no other effect than using all your internet bandwidth for the mini. For some users that is not an option as they run other services. However as the buffer will eventually fill up and from there onwards the increments will be small it is just a problem for a little while. For what concerns memory you can make it 1 GB but but from what I have seen there is a logic inside that tends to limit the buffer to circa 15 seconds so you need streams around 7000 kbps to use 100 MB I have not seen those stream even on 1080p video
  10. Correction it buffers 100-120 seconds. But the rest is correct. So with all live streams the cache stops at 50-53 MB even if the user memory in Xbox shows only 37%. So increasing the cache over 50 MB has little or no effect on live streams. If you instead stream on your LAN something bigger (I tried a 15 Mbps 1080p) the buffer does fill up however there is no real benefit anyway as any lab should be able to sustain that bitrate. So I would say 100 MB for the average minix user is more than enough and actually is not even utilised. More important is readbufferfactor that must be bigger than 1. If you set cache 100 MB with default readbufferfactor the cache won't fill up enough and if you have disconnections the stream will stop
  11. Higgs

    Higgs Yellow Dude Super Moderator

    I'm not sure about live streams but tv/movie streams from Genesis, 1 channel etc will fill up the buffer. I've frequently paused tv shows/movies and when I've come back the buffer was filled completely.
    ghale likes this.
  12. Same here genesis buffer only fills to 50-53. There is some intelligence in Xbmc around latency and ping. What connection have you got?
    I am not talking about pausing am taking about love filling of the buffer which is what readbufferfactor manages
    Also Gotham and kodi differ just in case
  13. Higgs

    Higgs Yellow Dude Super Moderator

    My connection varies, usually between 5-15 Mbps during the day but at night it can be as low as 1-5 Mbps. When its low I usually pause and let the buffer fill up.
    I'll try and test today with live filling of buffer (not pausing). Also I'm using Kodi 14.1 on all my devices (as I'm sharing a library with mysql). My readbufferfactor is 1.

    (also in regards to pausing, a lot of users with slower connections will use larger buffer sizes just so they can pause the stream and wait for the buffer to fill)
    Last edited: Mar 10, 2015
    ghale likes this.
  14. This post is about Gotham 13.3.3 stock with minix
    Kodi cache behaves differently so it is not comparable
    I have 33 Mbps if Xbmc does a speed latency test will probably fill the buffer with your low speeds
    Either way for the streams at less than 5 Mbps 100 MB is 160 seconds plenty of live buffer even for a slow connection
    sangaz likes this.
  15. georgica81

    georgica81 New Member

    if you have some QoS in the router, you won't have problems. I just didn't want my xmbc being bottle necked by the lack of read ahead.

    as for the RAM, if you go too high, it might crash the xmbc. so I took the average "available" RAM during my use and left a 100-150 available after the cache buffer x3.
    sangaz likes this.
  16. With Gotham 13.3.3 The cache only fills to 120 seconds on my system. Which means you need a stream more than 6826 Kbps to use the whole 100 MB. Check your osd to see how much of the cache really fills up. Looking at system settings Xbmc plays an 1080 stream with 700 MB which means you have 400 MB to play with as cache but again this will pretty much never fill up. For me the most important parameter is readbufferfactor factor that needs to be at least 2 and as high as you can beat because the cache build up is too slow with default settings. Readbufferfactor = 20 doesn't create major issues other than temporarily killing the rest of your network in the worst case. There is an easy way to determine readbufferfactor with a formula which is total ((bandwidth * 0.8) -4) /4. Live streams seldom exceed 4000 Kbps so this on my connection gives 5.5?Am still using 4 and have no problems
    sangaz likes this.
  17. Actually I have done more testing and the size of the cache is actually half what the setting is so once I set it to 200MB it actually uses 100MB
    sangaz likes this.
  18. After a lot of testing I think there is a big or a hidden feature in the way the cache works in Gotham 13.3.3
    More specifically in majority of cases it only fills 50% of the value set in advanced settings
    I have tested this on a number of streams and it happens all the time
    I think I read on some other forum that this is a 'hidden feature' on some type of files but some clarification would be appreciated
  19. Frederick_99

    Frederick_99 Well-Known Member Trusted Helper

    I would agree with you based on the on screen view that only 50% of the buffer is reported as filled when viewing is " continuous".
    I have been able to completely fill the buffer though ( on occasion...not done loads of testing ) if "pausing" the stream just as it starts !
  20. From what I can see the buffer counter doesn't keep increasing on screen when you press pause however when you restart it jumps up. Still it doesn't get to the full size anyway
    Will do some research into this but the while cache business could be a bug. In kodi (not android) it works as expected
    sangaz likes this.