Jump to content

Switch Docker Containers from "mnt/user/appdata" to "/mnt/cache/appdata"


Go to solution Solved by itimpi,

Recommended Posts

I've read there are maybe some performance benefits to running appdata from */mnt/cache/appdata* and bypassing the FUSE overhead.

 

I didn't realise this when I set up my server and all my dockers are running from */mnt/user/appdata* with appdata set to cache:prefer. Cache drive is 90% free so I'm not worried about running out of space.
 

I'm a little paranoid I'm going to break something.

Plan:

1. Stop the Docker Service

2. Change *Default appdata storage location* to */mnt/cache/appdata*.
Should I also change Docker Directory to something else? (eg. */mnt/cache/system/docker/docker*)

3. One by one go through the containers changing the appdata field to */mnt/cache/appdata/'container_name'*

4. Run Mover again (just to make sure)

5. Start the Docker Service
 

Am I missing anything there?

I also notice the System share has a libvirt file although I don't have any VMs. If I were to spin one up in the future, should I do something similar for that?

  • Like 1
Link to comment
  • Solution

You can make the changes without stopping anything :)

 

Having said that if you are on the 6.12.x releases you can get the same performance benefit without making any changes to paths by doing the following:

  • Make sure that Permit Exclusive shares is enabled under Settings->Global Share Settings
  • Set the pool to be primary storage with no secondary storage (equivalent to Cache Only in earlier releases)
  • make sure that all files for the share are on the pool.    You will now be able to activate Exclusive mode in the share settings.

with these changes you get the same performance whether you go direct or via the User Share path.

  • Like 1
  • Upvote 1
Link to comment
5 hours ago, daithi said:

Would I need separate drives to use the Exclusive Share feature?

As far as I know the only requirement is that the share in question only exists on the pool.   I have seen no mention of the pool not containing data from other shares.   I think internally it is just Unraid automatically treating /mnt/user/share as if it were /mnt/pool/share bypassing the fuse layer.

  • Like 1
Link to comment
  • 3 months later...
  • 7 months later...
On 7/19/2023 at 8:41 AM, itimpi said:

You can make the changes without stopping anything :)

 

Having said that if you are on the 6.12.x releases you can get the same performance benefit without making any changes to paths by doing the following:

  • Make sure that Permit Exclusive shares is enabled under Settings->Global Share Settings
  • Set the pool to be primary storage with no secondary storage (equivalent to Cache Only in earlier releases)
  • make sure that all files for the share are on the pool.    You will now be able to activate Exclusive mode in the share settings.

with these changes you get the same performance whether you go direct or via the User Share path.

 

Sorry to necro this thread, but I was hoping you could elaborate on your second bullet.  How would having no secondary storage improve performance?  My understanding is that the mover action to secondary storage would happen in off-hours (assuming it is configured to do so).  As long as the activity is occurring on the cache as primary, would you not get the performance benefits whether or not you have a secondary configured?

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.

×
×
  • Create New...