Jump to content

Docker + prefered Cache: Still files on Array?


Recommended Posts

Posted

I installed the unifi-controller docker a few days ago and I did not change the cache mode of the "appdata" share. Its still set to "prefer". This means new files should be written directly to the cache drive and should stay there, but there are files on my disk array. How is that possible?

 

1399665935_2020-07-2621_56_59.thumb.png.30eb82693bb731a5a05e574db415258a.png

 

P.S. Some of my plex docker files are on the disk array, too (same appdata folder), so its not only related to this specific docker container.

Posted
45 minutes ago, mgutt said:

Its still set to "prefer". This means new files should be written directly to the cache drive and should stay there, but there are files on my disk array. How is that possible?

Prefer allows files that are written to the user share to go to the array if the specified cache pool is below minimum space. IF the files on the array aren't open AND there is space, the mover will put them back on the cache pool.

 

So, if a file is written to the array and it is open while the mover runs, it will stay on the array even if there is now enough space.

Posted
48 minutes ago, jonathanm said:

if the specified cache pool is below minimum space

Ah yes. How could I solve this? Because the files will never be moved to the cache as they are in use.

Posted (edited)
9 minutes ago, jonathanm said:

Stop whatever process has the files open

Sorry, I meant a resistent solution. What happens if I choose the "Only" cache mode and there is still free space because of the "Min. free space" setting, will this cause an out of space error or does it write to the free space?

Edited by mgutt
Posted

Min free space determines the threshold to write new files. If the space is below that, it will give out of space error. The min free is to ensure that files already on the volume have room to expand.

  • 2 months later...
Posted (edited)
On 7/26/2020 at 11:55 PM, jonathanm said:

Min free space determines the threshold to write new files. If the space is below that, it will give out of space error. The min free is to ensure that files already on the volume have room to expand.

Does this also happen if the target path is "/mnt/cache/sharename" (so directly writing to the disk)?

 

The idea would be to set Plex config path to "/mnt/cache/appdata/Plex-Media-Server" and configure a minimum free cache of "100GB" so Plex never starts writing to the array, no matter how full the cache disk is.

Edited by mgutt
Posted
3 hours ago, mgutt said:

The idea would be to set Plex config path to "/mnt/user/cache/Plex-Media-Server"

That path is wrong, it consists of all root folders named cache on any disk in the array. Don't create user shares with the same name as disk shares, it will be very confusing to you.

Posted (edited)

@jonathanm

Sorry, this was a typo. I meant "/mnt/cache/appdata/Plex-Media-Server". So direct access to cache disk.

 

This should reduce CPU load as well as Unraid's SHFS process is bypassed.

Edited by mgutt
Posted
4 hours ago, mgutt said:

Does this also happen if the target path is "/mnt/cache/sharename" (so directly writing to the disk)?

I am unsure where the min free space setting is checked, but I suspect it's at the network share level, so direct disk writes by a local (docker container) source probably will not trigger the out of space error until the disk is actually filled.

 

I've never actually checked, so I'm speculating.

Posted
On 9/29/2020 at 1:15 PM, jonathanm said:

probably will not trigger the out of space error

You are right. I've tested it.

 

And changing the config path to direct cache disk access, resulted in a tremendous speed gain for Plex!

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.

×
×
  • Create New...