-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to turn on/off cache functionality #368
Comments
Thanks! ^_^ |
Or if its extremely hard to make "off-switch" in current form and maintain both paths we could make something that represents this idea: This way we would join both worlds. People with a lot of RAM would use big size cache, and the one that don't want to use it would use the low amount. Also I would hardcoded minimum amount as people could abuse it and set it to small as 1mb so that would double the time anyway so bear minimum would be 100mb which should be ok, as the most case the daily driver would be from my point of view this: people watching series - series with episodes is caches so they watch and read info about it from cache - and this case would give boost for people with less RAM and wouldn't bother those with big RAM. What do you think guys @maxpiva @ElementalCrisis is it possible? |
How much RAM does your MySQL take in 3.5? The cache just moved the RAM usage to server, and the final step is move everything to SQLite and not use any extra RAM for db. As for this idea, it might be possible, but it'll be slow. The argument for me is not whether we can fit an elephant in the front door, it's why would we try. A raspberry pi is not designed to be a server. It is a gpio toy for hobbyists to build fun things with. An itx box with 8GB of RAM is like $75-$100. Okay it's not $30, but a server is not $30. |
My MySQL use 430mb and JMM using that MySQL user 410mb, but also Kodi user same Mysql, few webpages and other smaller programs.. so yeah... Note that the RAM = collection size... So it will always increase and with "size limitation" you should be on safe side. |
After the repository refactor is possible, but i wont code it. As you can see the new Repositories are separated in two folders. (direct and cached) all repositories now are based on the same interface (IRepository, and use base helper classes). How to do it.... Create extra interfaces for the Cached Repositories, so the extra Methods used in Cached ~ the ones you created in Direct. After that, You should code in RepoFactory the initialization part, depending of the use of cache or not, init the cached repositories or the direct ones... DONE |
Wouldnt it be easier to do it in cache implementation?as you ask cache about data and cache knows which data is missing. And if the item is missing the query db On September 19, 2016 4:51:40 PM GMT+02:00, Maximo Piva notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
Cache implementation read all data at init, and queries are in Direct implementation has database queries. So no. You have to re-implement On Mon, Sep 19, 2016 at 1:01 PM, BigRetroMike notifications@github.com
|
As the cache author yoy are probably right. Thats something for later as it will be more clear when user base will increase and user case will expanse. Thsnks for info On September 19, 2016 6:53:45 PM GMT+02:00, Maximo Piva notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
@Cazzar this |
I would also like the ability to turn of the stupid cache so it doesn't take 2 GOOD DAM FUCKING HOURS TO START THE SERVER!@!!!! this has me royally pissed |
@craige1 if it is taking 2 hours for the server to load everything via cache, there might be other problems because ultimately disabling cache will slow the software down a very large amount. |
Dude chill. Siding with @Cazzar here, it takes me 45s to start the server with 900 series. It's not the cache's fault here. See if you can find more info and make a separate issue about it. |
Good point. We're doing better on RAM, but generally Shoko has always needed more than half of a gig of RAM in total. It used to just keep most of the RAM in SQL |
@craige1 The text is misleading, it just happens to me, It says something like |
@Cazzar turned off use of cached contracts because they were failing to update properly and sometimes showed stale info, and there wasn't any significant performance hit. So this issue probably should be closed as won't fix, cache is core functionality now. |
Well... There was a significant performance hit, but I just profiled it and fixed it.... |
so no no on embedded devices ? |
No no on embedded devices! A server relies on exactly two things: the speed of io, and the speed of network. Embedded devices (or at least the Pi) generally have them on the same port, so they can never be even as fast as half of a single port.... |
Embedded devices aren't servers! They are io controllers, ie toys. Do we need Tim Allen to explain this? |
embedded device was just a example of low Memory system, as argument of 'low RAM' is not compatible with someone ;-) |
My point stands, though. If it doesn't have at least 2GB of RAM, it's almost certainly not going to meet the io and network requirements for a server |
What if it have more and iscsi etc but can't allocate that much ram ?
…On September 17, 2017 1:17:18 AM GMT+02:00, da3dsoul ***@***.***> wrote:
My point stands, though. If it doesn't have at least 2GB of RAM, it's
almost certainly not going to meet the io and network requirements for
a server
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#368 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Mhmm. You could.... Buy more RAM! Yeah sorry no, in that setup you'd have ECC unbuffered, and that's expensive. But really, most people have more RAM than they need. We are past the time of RAM restrictions in modern hardware. If you have more RAM, and can't spare 700MB, there is something else using too much RAM. For example, in a Linux box with 3GB, the OS takes 200MB, you might get fancy and run some monitoring software for another 100MB, a buffered file host for a variable 200-700MB, MySQL for the above few things at 100-500MB. You are still looking at 600-1500MB used out of 3GB, leaving plenty for ShokoServer. |
You forget about UMS aka Java hungry
…On September 17, 2017 9:32:01 AM GMT+02:00, da3dsoul ***@***.***> wrote:
Mhmm. You could.... Buy more RAM! Yeah sorry no, in that setup you'd
have ECC unbuffered, and that's expensive. But really, most people have
more RAM than they need. We are past the time of RAM restrictions in
modern hardware. If you have more RAM, and can't spare 700MB, there is
something else using too much RAM. For example, in a Linux box with
3GB, the OS takes 200MB, you might get fancy and run some monitoring
software for another 100MB, a buffered file host for a variable
200-700MB, MySQL for the above few things at 100-500MB. You are still
looking at 600-1500MB used out of 3GB, leaving plenty for ShokoServer.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#368 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
You are correct. I do in fact forget that exists. |
Also some platforms use solder on ram chips... Those also exists ... Just saying ... I know we are on point that noone cares. It's been more than year now. Fell free to close issue as it on 'no one cares and it's been year now' lost :-) like always. Those who need lower RAM alternative will have to live with this or don't use it at all. Nothing came bo done, right...
…On September 17, 2017 9:34:13 AM GMT+02:00, da3dsoul ***@***.***> wrote:
You are correct. I do in fact forget that exists.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#368 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
I'll leave it open as a constant reminder to not use all the RAM |
Also, when Plex contracts are refactored out, it'll use much less RAM. There are also plans for better contract disposing and loading based on frequency of usage. The goal is to have the RAM usage a bit more configurable. I say use as much RAM as it takes to be as fast as possible. Brm says don't use more than 400Mb, so it starts disposing objects when it gets close. |
That would be a REALLY nice thing |
We aren't against being stingy with RAM. We are against intentionally making a slow and annoying experience to save a few hundred megs |
I may be confused but isn't the cache gone @da3dsoul? |
I'm not da3d, but it's not yet gone. it will be gone after the EF migration... hopefully. |
Adding ability to switch cache on and off - as it being request few times on chat by few peoples (including me)
Maybe implement inside cache as everything ask cache for data and if proper setting is "true" then it returns cache if not then ask database as before cache all request went there directly.
The text was updated successfully, but these errors were encountered: