Git Product home page Git Product logo

Comments (6)

bexem avatar bexem commented on May 24, 2024 1

That is great news, thanks for the update! I will hopefully manage to implement this ☺️

from plexcache.

bexem avatar bexem commented on May 24, 2024

Thank you for your suggestion. Let me make sure I understand your request:

  1. You'd like the script to detect when a user starts playing a specific media, say "movie1."
  2. If "movie1" isn't on the cache drive, the script should copy it there.
  3. Once playback ends, "movie1" should be removed from the cache.

If I've got that right, I have a few thoughts:

While I hope to implement active monitoring of the Plex server in the future, I'm not sure if this specific functionality would yield the desired improvements. When a media starts playing, Plex reads it from the array. If we initiate a copy to the cache at this point, Plex is unlikely to switch its read source midway. Moreover, copying might strain the disk performance, especially during playback.

The potential benefits might be more noticeable for larger files, like high-quality blue-ray rips, but for most content, I don't believe there'd be a significant improvement.

If I've misunderstood your request, please let me know!

from plexcache.

TheLinuxGuy avatar TheLinuxGuy commented on May 24, 2024

Hey @bexem - you have summarized the request well.

if we initiate a copy to the cache at this point, Plex is unlikely to switch its read source midway.

I vaguely recall some discussion on reddit mentioning the FUSE filesystem on unraid if configured as primary tier = cache, secondary = array - that fs reads get redirected to array but if the cache suddenly sees the same file with the same data that file operations may move to the cache seamlessly. I wish I had bookmarked it.

Consider playing a 3 hour movie only present in the array; an array hard drive spun-down would need to be active for the entire 3 hours plus some change. Where-as if this activity would work as noted above and FUSE did some invisible magic - the hdd could be spun down shortly after the copy to nvme cache is complete. Yielding 2.5+ hours of "hd idle"

from plexcache.

bexem avatar bexem commented on May 24, 2024

If it works like you said then it make absolutely sense implementing that, it would save some energy. Good idea!

I'll put it in my pipeline, if you don't mind looking for the source of your information or anything that could put me in the right direction I will appreciate it.

from plexcache.

TheLinuxGuy avatar TheLinuxGuy commented on May 24, 2024

If it works like you said then it make absolutely sense implementing that, it would save some energy. Good idea!

I think I found where I read about it... "Because of shfs mechanism accessing a file from /mnt/user will read/write fro cache if it exists, then from array. Duplicate data are not a problem and globally speed up things."

Also "Edit 13-02-2020: yes, after checking with File Activity plugin, that's the case and its plex/transmission take the file on cache as soon as it is available!"

see https://forums.unraid.net/topic/92126-smart-caching-script/

from plexcache.

rozza591 avatar rozza591 commented on May 24, 2024

This would be a great addition if it ends up working on plex's end.

from plexcache.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.