I do not understand how cache disks work.. I am having terrible slow file acess?


Recommended Posts

I am mainly using unraid as a file host on my network for projects as well as a Plex media server with radnarr/sonarr download services... those are all in dockers...

The probem is if I am watching a movie off the main drive array, and a downloaded movie starts to unrar it slows down so much the file will not play... same goes for reading files.

My understanding of the cache disk was to help with this but It dose not seem to...

What can I do to make unraid more responsive?

Link to comment

Where have you set the unrar to be written to and what are you using to do the unrzar?  If the destination is not explicitly on the cache or to a share set to Use Cache=Yes then this would be expected.

 

You are likely to get better informed feedback if you attach your systems diagnostics zip file (obtained via Tools->Diagnostics) to your NEXT post.

Link to comment

ok... that makes sense... if I change nzbget to be saving directly to the cache drive all the unraring and stuff will happen there before being moved?

 

all my dockers map to /mnt/user/paths .... so I am reading files from a docker mapped to say /mnt/user/projects or /mnt/user/archive/video/movies but also nzbget will be downloading to /mnt/user/.downloads/nzbget and unraring to /mnt/user/.downloads/nzbget/complete.... (basically like this anyway)

 

So I need to make a "share" and in the options set the setting to "always store on cache" and use that path for nzbget downloads and unraring... also make a share for "currentProjects" and use that for the actual project I am working on and all the acess will be ssd speed for that as well, then I can move to the array for storing of old projects and asset data? (this sounding kinda right?)

serverox-diagnostics-20210411-0011.zip

Link to comment

Yes in principle :)

 

You probably want to carefully read the help built into the GUI for the Use Cache setting on shares - it is frequently misunderstood.  There is also a good write-up here in the online documentation that can be accessed via the Manual link at the bottom of the unRaid GUI.  Note how the various settings control where files are initially placed and (potentially) later interact with the 'mover' application for moving to another location..   In your case I think you want all the 'work' folders to be on cache/pool for performance and the final storage on the array. 

Link to comment
48 minutes ago, questionbot said:

I think now I need to add a 2nd SSD as my project dir is is longer protected as I am only using 1 ssd cache driv

You have to decide if it is worth the expense to protect against losing that data while it is on the cache..    If the Project data is in a share which has Use Cache=Yes set then it will end up protected when mover later transfers the data onto the array but you are correct in that without redundancy in the cache/pool there is a window of exposure.

Link to comment

 I ran into the same kind of slowdown where the file access basically stops... this happened while watching Plex... so now the download and archive is all happening on the SSD, it is actually Radnarr or Sonarr coping the unarchived file to the array that is the problem.

 

Is it possible to have a share that sits on the SSD but then copies via the mover eventually to the main array?

 

So I have "/mnt/user/archive/video/movies"... this has 100s of films in it on my main array..... what I am asking is if there is a way to have a directory that matches this... but on the actual cache pool... so the apps can download to the cache, unrar to the cache and then copy to the cache... where Plex and scan and see it... but then latter at night during the mover event it is moved to the array... but as far as plex is concerned the cache dir and the array dir is the same place? (Am I making sense?)

 

 

Link to comment
1 hour ago, questionbot said:

 I ran into the same kind of slowdown where the file access basically stops... this happened while watching Plex... so now the download and archive is all happening on the SSD, it is actually Radnarr or Sonarr coping the unarchived file to the array that is the problem.

 

Is it possible to have a share that sits on the SSD but then copies via the mover eventually to the main array?

 

So I have "/mnt/user/archive/video/movies"... this has 100s of films in it on my main array..... what I am asking is if there is a way to have a directory that matches this... but on the actual cache pool... so the apps can download to the cache, unrar to the cache and then copy to the cache... where Plex and scan and see it... but then latter at night during the mover event it is moved to the array... but as far as plex is concerned the cache dir and the array dir is the same place? (Am I making sense?)

 

 


if I understand correctly what you want you achieve this by having the ‘archive’ share with a the Use Cache setting set to ‘Yes’.    
 

The whole idea is that files in shares with this value set are initially written to the cache and automatically transferred to the array when mover runs (typically overnight).   It is transparent to anything referencing  the /mnt/user/archive path (or its sub-folders) whether a file is physically on the cache or on the main array.

Link to comment

Hi, this might not work for your use case, but I have a few virtual machines that I would prefer to have a backup but it doesn't have to be the very latest. This is the lazy mans way of doing this, provided an overnight backup is good enough:

  1. Create a file like this one at /boot/config/mybackup that rsyncs whatever you want from cache:
    #!/bin/bash
    rsync -a /mnt/cache/domains/ /mnt/disk1/Backup/domains/
    
    ##note disk to disk here - you can do it through the /mnt/user directory too. They are mutually exclusive
  2. Then in your /boot/config/go file add two lines like this somewhere:
    # add these two lines after this line: /usr/local/sbin/emhttp &
    
    cp /boot/config/mybackup /etc/cron.daily/mybackup &
    chmod 755 /etc/cron.daily/mybackup &

     

Obviously you could also set this up to do the backup hourly, weekly or monthly too and to be honest, it's not a great idea for a potentially running virtual machine as it could definitely cause some weirdness but it's about the easiest way I could think of to achieve this once a day overnight. Two quick edits and done.

Just another possible way to approach this if you aren't very anxious about your data being a day older in case of ssd failure.

 

Forgot to add - you can check when the cron.* scripts run by typing: 

crontab -l

 

Del

Edited by Delarius
catn spele
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.