October 28, 20205 yr Author 48 minutes ago, kizer said: Is there a code change that you could recommend that says to skip those or ignore them? This should be possible. Maybe I could also add an option which allows sorting by the year which is inside the parent folder name like "2004" in "/Lost (2004)/S01E01.mkv". But by that recently added content which has an old airing date, won't be cached.
October 28, 20205 yr 3 minutes ago, mgutt said: This should be possible. Maybe I could also add an option which allows sorting by the year which is inside the parent folder name like "2004" in "/Lost (2004)/S01E01.mkv". But by that recently added content which has an old airing date, won't be cached. I have found a Bulk renamer and have begun changing the messed up files from 2038 to 2018. Not sure what happened, but I think I have a plan of attack. Thank you for the offer/idea. It’s only a 100-200 or so files and I’m 1/4 of the way done.
October 28, 20205 yr Author 49 minutes ago, kizer said: Bulk renamer This should not help. The script sorts by file modification time and not the year in the filename (that was the idea I mentioned in my last post) All files, renamed by this bulk renamer tool, will probably receive a newer file modification time and so pushed to the top of the preloading list. Edited October 28, 20205 yr by mgutt
October 28, 20205 yr I checked the file listing and it shows the Modified date as 2018 vs 2038. I’m basically changing the attributes not the actual file name. I’ll do my thing and report back. Or actually I’ll test it again and see if the priority has shifted first before doing more. update******** Every file I’ve changed the modified date is not being scanned. So it’s doing exactly what I hoped it would accomplish. Just have to do some house cleaning on my end. Thanks so much for this script. I can verify it does work on 6.9 RC-30.
November 3, 20205 yr hi guys, maybe stupid question, but if I don't want to map these to RAM (don't have a huge amount), but to cache instead, would it work?
November 3, 20205 yr Author 6 minutes ago, LSL1337 said: but if I don't want to map these to RAM (don't have a huge amount) At the moment you can't map it to something else. But note: Preloading does not reserve RAM. It stays free. But with a small amount of RAM the preloaded data will be overwritten by other processes really fast, so the use of preloading will be really low on your setup.
November 3, 20205 yr Thanks this script, I always do same thing, but fetch whole moive to RAM during watching. Sound good have additional features, when a file open time long enough i.e. 5min, ( or simple as file scan still in open state if compare to previous file scan ) then fetch those files to RAM automatically. Edited November 3, 20205 yr by Vr2Io
November 17, 20205 yr Hello, Fantastic script, works great! One question, is there a more reliable way to determine if the content is coming from the RAM or Disk? I ask because it seems on my machine even from RAM is taking ~ 0.170s which from looking at your script it means this gets counted as from Disk. I am also working on a solution to catch what is On Deck, I will share once I have it working. Thanks, Chris
November 17, 20205 yr 1 hour ago, christoefar said: I am also working on a solution to catch what is On Deck, I will share once I have it working. Thanks, Chris That would be neat to have too. Any consideration if you have multiple users on your Plex Server unless Plex just sees all on deck files?
November 17, 20205 yr Didn't install it yet but the On Deck feature could be enough for me to get to it. 🙂
November 18, 20205 yr Hello, Same Chris as before - just a new email address. I have it working in a crude way, it does only work for me currently. I will have a look at the Plex API and see if it is possible to pull back the On Deck for all users. Selfishly, my main concern is me though! @mgutt is the code on GitHub by any chance? Chris
November 18, 20205 yr 5 minutes ago, chris.child said: Same Chris as before - just a new email address. Do you mean @christoefar ?
November 18, 20205 yr 1 hour ago, chris.child said: Hello, Same Chris as before - just a new email address. I have it working in a crude way, it does only work for me currently. I will have a look at the Plex API and see if it is possible to pull back the On Deck for all users. Selfishly, my main concern is me though! @mgutt is the code on GitHub by any chance? Chris The code for this project is in the first few posts to this thread. I wouldn't mind just me because I'm selfish too Lol. However if would could cover all users it would round out the code very nicely.
November 18, 20205 yr The script works great. I like the On Deck idea. Another feature request would be the ability to pick certain episodes or movies to always be preloaded into Ram. For example, my kids tend to watch the same episodes and movies over and over. But because they have been on my Plex server for so long, they are not preloaded. Thanks and keep up the good work! Brad
February 10, 20215 yr Author 6 minutes ago, ffhelllskjdje said: How often should I run this script? Daily, after your backup scripts (or they will overwrite your free RAM again).
October 20, 20214 yr Trying to figure out how this script works. How does plex know to load the initial data from RAM, and the rest of it from the disk? Would like to adapt the script to use an SSD instead of RAM for the first bit of data (since that could just be persistent, and has A LOT more space to store all of it). edit: looking more at the script, it looks like the head and tail commands are used for printing the beginning and end of the file to /dev/null. So I guess that by doing so, the system automatically caches that bit of the file? Edited October 20, 20214 yr by xorinzor
October 20, 20214 yr Author 28 minutes ago, xorinzor said: So I guess that by doing so, the system automatically caches that bit of the file? Yes. This is the default behaviour of Linux. Everything which is read from a disk is written to the RAM. So this is only a trick to prefill the RAM. And because of that it's impossible to use the SSD. I tried to use a swap file, but it's sadly not possible to read data directly into the swap file.
November 8, 20214 yr ... preload_tail_size="1MB" # 10MB, should be sufficient even for 4K ... So what is the recommendation for 4K? 1MB or 10MB? (Looks a bit unclear.)
November 9, 20214 yr Author 20 hours ago, JoergHH said: 4K? 1MB or 10MB? I missed to correct the comment. 1MB is sufficient.
November 9, 20214 yr Would it somehow be possible to do reserve ram for this? I have 64GB of RAM in my server and it'd be nice to allocate a few GB for this. But I'd also like to guarantee that no other processes use the RAM (there's way more then enough, so I can spare to allocate a bunch). EDIT: nvm, forgot about the head_size being 60MB (or even more). Edited November 9, 20214 yr by xorinzor
November 10, 20214 yr Author On 11/9/2021 at 11:15 AM, xorinzor said: Would it somehow be possible to do reserve ram for this? By now I did not found a solution to realize this
January 24, 20224 yr Is there still support for this script? Coming across an error message - tr: write error: Broken pipe tr: write error cut: write error: Broken pipe I have 128GB of RAM installed, and set free ram usage to 75% so I should be able to utilize about 96GB, my dashboard only shows about 9% utilized overall, i'm assuming this error is preventing the script from fully running.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.