Disable "zero-cache" AS (surely for Android)
#1
I plan to disable the "zero-cache", i.e. cache to disk feature on Android, as it basically is an aberration on flash disks / sdcards typically on those devices, both because of the wear and limited available space.
I assume some "wizard" enables this by default, as generally users have no clue of why their disk becomes full, and even less on how to revert the setting.

This just to check if someone has a smarter idea than a plain #ifdef Wink

We could check the disk size, but that wouldn't remove the wear issue...
Reply
#2
I guess we could try to check if its (e)mmc
Reply
#3
(2015-04-29, 15:43)wsnipex Wrote: I guess we could try to check if its (e)mmc
Well, yeah, but any idea on how to that, ideally in a cross-platform way?
Reply
#4
A good quality sdcard should handle ~100k write cycles. For an 8GB sdcard this allows 800TB of data to be written in its lifetime.

Assume you are playing high bitrate files (40Mbit/s) I calculate you can play video continuously for 5 years before all sectors are no longer writable.

Now, you may not have perfect wear levelling which may reduce this. But most video files are lower bitrate (especially if streamed from internet), and a couple of hours a day usage is more likely, so the number of years is more likely to be several times higher.

I don't think this is an issue. Sdcards are cheap enough that most users probably wouldn't mind replacing them every couple of years if it improves their video playback experience.

A bigger issue is that "zero-cache" doesn't stop until the whole sdcard is full. At this point apps will start failing to write files which is likely to lead to apps crashing, and failing to save their settings. I think a better solution to this is a setting to limit the amount of disk space that will be used for caching. Perhaps it could default to 75% of free space when streaming starts, but can be overridden in advancedsettings.
Reply
#5
I don't like the idea of removing this for Android at all :(

I've looked into this a while ago and there is no wizard that turns the zero cache option on, but there are add-ons out there that make it easy to do so from the GUI. They normally give several pre-configured cache settings as options, and the zero cache is one option. It's just one of many risky settings that those configuration tools provide, and without warning. However, I don't think we should not disable those options in core just because someone made an add-on to turn it on. This isn't the only advancedsetting to be abused by some users.

A few weeks ago I started to put more stern warnings on the wiki and when talking to users on the forum, reddit, etc, about using the zero cache setting. This warning about when it shouldn't be used has spread very fast already, and often users are now answering these questions on the forum for us. I think it will balance itself out once the proper education is spread.
Reply
#6
People won't read it and your warnings will be overshadowed by idiots and their youtube guides
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#7
(2015-04-29, 19:34)Ned Scott Wrote: I don't like the idea of removing this for Android at all Sad

Let's put it the other way around, then. In which cases is the "zero-cache" setting useful on Android?
Are the benefit greater than making the box of some careless user unusable?

Sure thing: Not using "shady" internet streams, I never get any "buffering" messages on any of my boxes, thus never had to touch the cache settings ever.
We all know that if the bandwidth is not there, file caching doesn't solve anything...
Reply
#8
(2015-04-29, 19:37)Martijn Wrote: People won't read it and your warnings will be overshadowed by idiots and their youtube guides

Just because you think all users are stupid doesn't make it so. You also used to think that those warnings were really effective and made a bunch yourself on the wiki.

The majority doesn't have to read the warnings. The people who make the youtube guides and make the "maintenance tools" are the only ones who need to read this, and that is in the process of happening.
Reply
#9
I use it all the time. It's a specific feature I've requested time and time again. It's just as useful on Android as it is on any other platform. My boxes on my local network fill their cache as much as possible and as fast as possible, and the end result is my NAS box sleeps more often, I have less traffic on my network, and everything runs more smoothly for me. I'm far from the only one in a situation like that.

Zero cache don't help at all with the piracy add-ons, so you're not sticking it to them there either.

If I have to choose between two groups:
  • one that carelessly uses "maintance tool" add-ons that have been breaking things for years, even without the zero cache setting.
  • The other group is people who don't use those add-ons and only use those settings if they need it.

Then yeah, I don't really care about the people who have broken setups because of it. They already think Kodi is broken because their bootleg streaming add-ons have broken links all the time and the twitter add-on has been preconfigured on their system.

They don't dictate what we do. Their abuse shouldn't ruin it for the people who legitimately use this feature, including myself.
Reply
#10
Ok, then. I suppose that if it's useful to at least one user, we should let it in.

Might be nice to prevent filling the disk, though. Does caching has a maintainer those days?
Reply
#11
I don't know if this will help, but here are the video cache related PRs I know of, which should show some people who are familiar with that part of Kodi.

https://github.com/xbmc/xbmc/pull/831
https://github.com/xbmc/xbmc/pull/1388
https://github.com/xbmc/xbmc/pull/2065
https://github.com/xbmc/xbmc/pull/2607
https://github.com/xbmc/xbmc/pull/2843
https://github.com/xbmc/xbmc/pull/2901
https://github.com/xbmc/xbmc/pull/3104
https://github.com/xbmc/xbmc/pull/3963
https://github.com/xbmc/xbmc/pull/5535
https://github.com/xbmc/xbmc/pull/5708
https://github.com/xbmc/xbmc/pull/6733

EDIT: also, thank you thank you thank you thank you sooo much for not disabling this :D
Reply
#12
Here is the first time zero cache is added: https://github.com/xbmc/xbmc/commit/2d20...d28e06106d
Reply
#13
Thanks.

At first sight there is no disk space management at all in CSimpleFileCache (https://github.com/xbmc/xbmc/blob/c096e7...y.cpp#L132)

@arnova Since you seem to be the last to have touched caching, do you think you could help, here?
Reply

Logout Mark Read Team Forum Stats Members Help
Disable "zero-cache" AS (surely for Android)0