Jump to content

PSA: For Best Performance, Avoid User Shares for Appdata in Docker Volume Mappings


Recommended Posts

Hi all. I found out something very useful yesterday that I didn't realise, so in case it's not general knowledge, I thought I'd help out others by passing it on.

I've been one of the many people that suffer from poor NextCloud performance - most notably when trying to browse my large photo collection.

Part of the solution came from using a third party Photos app for Android, part from pre-generating the image cache, and part from optimising PHP-FPM performance. But despite all this, there was still really long wait times whenever I'd scroll to a new point in my photo timeline.

In looking for a solution yesterday, I came across this thread that documents just how severe the overhead performance cost is when using a /mnt/user/ directory (and therefore shfs) in Unraid:

So last night I simply swapped the mappings on all my Docker images to point to /mnt/cache/appdata/ instead of /mnt/user/appdata/ (and also the Nextcloud files directory directly to the SSD that it resides on instead of via the user share).

That's it. That's all I did. It took about 10 minutes.

And now the Photos app loads like it should, with only small load times when I jump to a new spot on the timeline before the images appear all at once.

In addition, the scan times for my Logitech Media Server have improved by ~30%. I haven't yet tested Plex scan times, but there's likely to be an improvement there, too.

I know that we're meant to point them to the user shares so that if they ever fill up the cache drive they will write to the array instead of erroring out, but I'm willing to monitor the space on the cache and manually invoke the mover if it ever fills up - it's well worth the epic improvement to responsiveness!

So yes, I don't know if this is common knowledge and my epiphany should have really been a face palm, but I thought I would post it here just in case someone else finds it useful.

Feel free to let me know if this is madness, too.

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...