Cache testing

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,143
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Information  Cache testing
Post: #1
HOW-TO:Modify the video cache

Pretty much full cache control, including the ability to cache as fast as possible.

A lot of different devs worked long and hard on this, so a big thanks to all of them!

Two settings are brand-spankin' new, so if you want to try this you better use a nightly build. (don't forget to backup your userdata folder)

Feel free to test this out and report back your results. It should work just as expected, but I'm interested in hearing what happens with other people.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
(This post was last modified: 2013-08-21 02:43 by Ned Scott.)
find quote
Milhouse Offline
Team-Kodi Member
Posts: 4,179
Joined: Jan 2011
Reputation: 94
Post: #2
With OpenELEC on R-Pi git builds (openelec-3.2 branch), as noted in this and this post, playback of the VC1 rip of Blade Runner Final Cut is noticeably worse since 21 July. Up to this date, playback would be smooth without any stuttering and moderately full buffer (B: 60%, vq:60%), however with my next build on 26 July the buffer will frequently be exhausted (even from the very start of playback - B: 0%, vq: 0%) and this undesirable behaviour remains to this day even with these new settings, neither of which seems to have any noticeable impact.

Not sure what happened between 21 Jul and 26 Jul, but it's had a very negative effect for me.

For reference, I've included a debug log (latest build from openelec-3.2 branch) when resuming playback of Blade Runner Final Cut here. I am using the following network settings:
Code:
<network>
    <cachemembuffersize>20971520</cachemembuffersize>
    <readbufferfactor>4.0</readbufferfactor>
  </network>

Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
(This post was last modified: 2013-08-20 11:09 by Milhouse.)
find quote
StinDaWg Offline
Fan
Posts: 586
Joined: Jul 2011
Reputation: 1
Post: #3
I have a question about how this works for local playback. No wifi, just watching from hard disk.

These are the settings I'm using
Code:
<alwaysforcebuffer>1</alwaysforcebuffer>
<cachemembuffersize>0</cachemembuffersize>
<readbufferfactor>4.0</readbufferfactor>

Does this mean that XBMC will now use memory to buffer frames in advance, so that if your cpu gets maxed out you won't get dropped frames? Sometimes if a program is updating in the background or some other cpu intensive task is going on, it will cause XBMC to drop frames, even if XBMC cpu itself is only 5%. I just tested these new settings by playing a high bitrate Blu-ray video and reloading 30 Chrome tabs at the same time. This caused the cpu to max out at 100% over a sustained 4 minutes. However, watching the video in XBMC it was smooth as butter! Is this from the cache settings or something else that has changed in Nightlies?

Also, does this mean that if my disk is being thrashed at 100% from unraring or something, I shouldn't see any frame drops or buffering either?

Which version of Nightly do you need to take full advantage of these settings? I'm using 8/12 build currently.

EDIT: Never mind what I said about dropped frames at full cpu load, I'm getting them now. Seems this doesn't help that problem at all. I'm looking for something like MadVR "present several frames in advance" that has an option to go up to 16 frames. Is that possible on XBMC?
(This post was last modified: 2013-08-21 02:22 by StinDaWg.)
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,143
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #4
Yeah, it won't help with CPU load. If anything, readbufferfactor might increase CPU load, depending on your hardware/OS/etc.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
StinDaWg Offline
Fan
Posts: 586
Joined: Jul 2011
Reputation: 1
Post: #5
(2013-08-21 02:21)Ned Scott Wrote:  Yeah, it won't help with CPU load. If anything, readbufferfactor might increase CPU load, depending on your hardware/OS/etc.
I guess buffer frames in advance is not possible on XBMC? MPC-HC EVR CP has this feature too. Unless there is an advancedsetting I missed?
(This post was last modified: 2013-08-21 02:37 by StinDaWg.)
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,143
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #6
It sounds unrelated to the three AS.xml settings, at least.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
davilla Offline
Retired-Team-XBMC Developer
Posts: 11,508
Joined: Feb 2008
Reputation: 64
Post: #7
HAHAHAHA, as predicted, total confusion.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
robweber Offline
Posting Freak
Posts: 900
Joined: Sep 2009
Reputation: 27
Post: #8
Very cool stuff. Are there any recommended configurations for different systems? I guess I'm thinking AppleTV, iPad, rPi. This might help with any confusion over when users might want to mess with these or if they are better off leaving them alone.
find quote
StinDaWg Offline
Fan
Posts: 586
Joined: Jul 2011
Reputation: 1
Post: #9
(2013-08-21 02:49)davilla Wrote:  HAHAHAHA, as predicted, total confusion.
I understand what it does now, but could you please answer my question about buffering frames in advance and then I will get out of this thread. Thanks.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,143
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #10
(2013-08-21 04:05)robweber Wrote:  Very cool stuff. Are there any recommended configurations for different systems? I guess I'm thinking AppleTV, iPad, rPi. This might help with any confusion over when users might want to mess with these or if they are better off leaving them alone.

It's likely that using the harddrive for video playback cache would free up RAM on devices that have very limited RAM. However, as noted on the page, this is an advanced topic, and should only be attempted by those who aren't afraid of things crashing or getting messed up.

There is an examples section, though. People are free to add their own examples there, if they feel it would help others.

(2013-08-21 04:14)StinDaWg Wrote:  
(2013-08-21 02:49)davilla Wrote:  HAHAHAHA, as predicted, total confusion.
I understand what it does now, but could you please answer my question about buffering frames in advance and then I will get out of this thread. Thanks.

just ignore him, please.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
StinDaWg Offline
Fan
Posts: 586
Joined: Jul 2011
Reputation: 1
Post: #11
(2013-08-21 04:25)Ned Scott Wrote:  just ignore him, please.
Are you referring to me?
find quote
davilla Offline
Retired-Team-XBMC Developer
Posts: 11,508
Joined: Feb 2008
Reputation: 64
Post: #12
no, me Smile


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
StinDaWg Offline
Fan
Posts: 586
Joined: Jul 2011
Reputation: 1
Post: #13
I'm not sure if it makes sense to use this for local playback (hard drive). If I try to skip 30 seconds forward, it just pauses for about 5 seconds and then a scrolling message pops up saying the buffer for continuous playback ran out or something. It got annoying after about a minute and I just turned it off.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,143
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #14
(2013-08-21 14:51)StinDaWg Wrote:  I'm not sure if it makes sense to use this for local playback (hard drive). If I try to skip 30 seconds forward, it just pauses for about 5 seconds and then a scrolling message pops up saying the buffer for continuous playback ran out or something. It got annoying after about a minute and I just turned it off.

It doesn't. It's not for when you have local content, it's for when you have network content. Though it's fairly easy to avoid that message when the cache size is also increased.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
StinDaWg Offline
Fan
Posts: 586
Joined: Jul 2011
Reputation: 1
Post: #15
Could you tell me if there are any situations caching from local drives would be useful? Would it help if the drive you are reading from is being thrashed by another program or from copying/unraring files? Sometimes if I'm playing a high bitrate Blu-ray and I try to copy a file to the drive at the same time, the video in XBMC will stop and buffer constantly, would caching help stop this?
(This post was last modified: 2013-08-22 04:00 by StinDaWg.)
find quote
Post Reply