Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Copy file to Cache before being fully read

Featured Replies

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?

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.

  • 1 month later...

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. 

  • Community Expert
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.

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.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.