Jamesmct Posted January 17, 2020 Share Posted January 17, 2020 Is there any ability in Unraid or some plugin that allows a file when it is first "accessed" to be copied from spinning disk to cache before being fully read? Like using some sort of stub file for identification and then pull it onto higher speed disk? Quote Link to comment
Squid Posted January 17, 2020 Share Posted January 17, 2020 No. What is your use case? Quote Link to comment
BRiT Posted January 17, 2020 Share Posted January 17, 2020 Not sure how this would be any faster than that. This: 1) reading entirely from disk to memory 2) writing from memory to cache 3) reading from cache to memory to be used That: 1) reading entirely from disk to memory to be used. Probably bigger speedup would come from increasing your server's memory. Quote Link to comment
OjRacer Posted February 18, 2020 Share Posted February 18, 2020 I'm curious about this as well. I'm new to this ecosystem and the Homelab/NAS/etc, so forgive me if I'm being shortsighted. I just set up Unraid two days ago as my home NAS to serve my separate Plex Machine. Before having read BRiT's post about the data getting read to memory first, I presumed data would go from the hard drive directly to my Plex machine and it uses/reads the portion of the video file it needs. I didn't know it read the file into memory (on both or just Plex?). What happens if the video is larger than the available RAM on Unraid? Even then, I was hoping to find a way to use a large SSD/NVME as a read cache. Ideally, it would hold a mirror of the most recently accessed files. When it gets full and another file gets accessed, the oldest mirrored file in the most-recent stack gets overwritten with the newest file. If I have 3 videos on a single drive in Unraid and they all happen to be accessed at the same time, I believe I could run into bottleneck with the hard drive read speed. If they were in the SSD read cache, then that would eliminate that. If I have a 1TB NVME SSD, then I could fit 25-100 of the most recently added or watched videos. An SSD read cache would also perform better for re-accessing recently used files, right? Assuming you have plenty of RAM, does unraid continue to store the file in RAM even after it is not being accessed anymore? If I load a large video on Plex, watch half of it, reboot Plex, and then continue the video, would unraid have to reread the video file from the hard drive after the reboot? I set Unraid up on a i5-3470 and 16GB DDR3 ram I had laying around. The max configuration for that CPU/mobo is 32GB of ram. Being able to add an NVME ssd as a read cache would be a lot cheaper than a CPU/Mobo/Ram upgrade. I'm probably wrong about these concepts and I know it's not as simple as this, but the idea is there. Quote Link to comment
trurl Posted February 18, 2020 Share Posted February 18, 2020 20 minutes ago, OjRacer said: I presumed data would go from the hard drive directly to my Plex machine All data goes through memory. That doesn't necessarily mean entire files are ever contained completely in memory. BRiT's point was that if you had more memory, more could be buffered and that would be faster than moving it to cache first. Whichever disk it is on is still going to require the data to be read into memory before it can be used for anything. Quote Link to comment
sota Posted February 18, 2020 Share Posted February 18, 2020 a file check out-n-in system is a very limited use case, and the case studies needed to determine when a file is moved in either direction could fill up multiple doctorate level papers. if you lay out some ground plane ideas as to why you want it, I think you'd discover there's already methods in place that will satisfy your majority cases. Quote Link to comment
Recommended Posts
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.