Cache upgrade for Nextcloud performance


SSMI

Recommended Posts

I am looking into making some upgrades to my unraid box.  The biggest reason is I am using Nextcloud more and it is slow to load.  I think this is the case because I have my Nextcloud data on the array for protection but that means the drives have to spin up to do anything with it.  With that thought, I have my first question.

 

  • Is there a performance boost moving the Nextcloud data off the array into a cache pool?

 

That leads to the next consideration.  I want some protection for my Nextcloud data.  Right now that is accomplished with the data being on the array and the parity that gives.  I'm not an expert but it seems like I could get similar protection and better performance with my cache being on a RAID of SSDs.  I would set up a pool using to SSDs in a BTRFS Raid.  I would like to use 2x2TB SSDs to have plenty of space.

 

  • Do I understand that correctly?
  • Can you have multiple pools?
  • Would it be worth moving all the old app data over to the new pool?

 

Assuming the above is true the ideal solution would be to put a couple of 2TB NVME drives into the computer and make them the cache pool.  My motherboard is old enough to not have NVME drive connectors.  That means I would need a new MB and CPU (and probably RAM).  Since I am upgrading all that I would like it seems like it would be time to do the case (from Lian-Li PC-Q25 to Define XL7 maybe) too.  There are a couple of reasons for that.  I would like more space in the case for drives.  I would like more PCI-E to be able to add a GPU down the line (for VMs or encoding).  The thing is I don't really need extra performance or storage right now.  That seems like a giant set of upgrades just to get some better cache storage.  

 

  • Is there a way to add 2 NVME drives to an older MB maybe via PCI-E?
  • Would I need PCI-E bifurcation to do that for 2 drives?
  • Is there a benefit to adding SATA ports via PCI-E and connecting the SSDs to that?  Or does SATA limit the performance benefit to keep it small?

 

More than anything I am looking to improve the Nextcloud performance without spending too much money or making a brand new NAS right now.  I might be ready to upgrade the whole thing next year sometime but it could be a few years before the full upgrade.

 

Thanks for the help and advice.

Link to comment

I've been using linuxserver's version.  I have always had good luck with their containers.

 

It doesn't seem too slow after the first time I access each day.  I could be wrong but it feels a lot like the disks spinning up on first access.  I get similar delays playing a movie from plex.

 

Would the official implementation improve that?

Link to comment

From my experience Official has been 2-3x faster than LSIO in page load times/transfer speed, both running from SSD. Spinup time is separate, of course you're going to have to deal with that if you have data on spun down drives regardless of container.

Seems LSIO made some changes that might have improved it a couple of weeks ago, plus the upgrade to NC25, but haven't tested much. So check you're updated.

Edited by Kilrah
Link to comment
  • 4 weeks later...

@IntertekLTC Thank you for the response.

 

Right now I am leaning towards picking up a couple 2.5" ssds and a sata controller.  In the future when I upgrade the system as a whole I will go to NVME.  I think that will be a big performance bump at a reasonable price for right now.

 

When I do that I will switch to the official Nextcloud image and start a clean install.

Link to comment
  • 3 weeks later...

So I upgraded my hardward and did see improvement particularly when I first access nextcloud.  Things are still a bit slower that I would like but not too bad.

 

I figured now would be the time to upgrade to the offical docker container.  I am having some trouble getting the "Nextcloud all-in-one" container, that seems to be the offical way to install it, to work.

 

Is that the right container to use?

 

As I have been updating containers I have been trying to use docker-compose so it is easier to backup the configuration for the future.  Below is the compose I am attempting to use. 

 

I would like nextcloud to be on vlan that is isolated from the rest of my network.  That is what br0.70 is.  This networks methon is working for other containers I have. I have also left off the ports, like I have done with my other containers that work, because this should have it's own IP address.

 

I think I have setup properly to store my Nextcloud data on a particular share on my unraid but wouldn't mind confirmation.

 

When I run this it says "service "nextcloud-aio-mastercontainer" refers to undefined volume nextcloud_aio_mastercontainer: invalid compose project".  This seems to refer to a line I'm not supposed to change according to the documentation.

 

services:
  nextcloud-aio-mastercontainer:
    image: nextcloud/all-in-one:latest
    container_name: nextcloud-aio-mastercontainer
    restart: unless-stopped
    networks:
      br0.70:
        ipv4_address: 10.24.70.40
    environment:
      NEXTCLOUD_DATADIR: "/mnt/user/nextcloud"
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed
      - /var/run/docker.sock:/var/run/docker.sock:ro
networks:
  br0.70:
    external: true

 

I realize I may have to take some of these questions to the Nextcloud forums but thought I would start here.

 

Thanks in advance for the help.

Link to comment
10 hours ago, SSMI said:

When I run this it says "service "nextcloud-aio-mastercontainer" refers to undefined volume nextcloud_aio_mastercontainer: invalid compose project".  This seems to refer to a line I'm not supposed to change according to the documentation.

In the Unraid context you need to. We don't use Docker volumes as those would be stored in the Docker image, we map appdata folders instead.

 

Your NEXTCLOUD_DATADIR is probably wrong too, that would likely be the path inside the container. 

 

You should really just use the template as that's set up right, and the whole CA thing is precisely backing up the configuration so it's a one-click reinstall should you need to. 

Link to comment
  • 1 month later...

So I had some more discussion about all this on the Nextcloud help forums.  That discussion can be found here.

 

It appears there is no support and there never will be for using something other than docker volumes (no mounting of folders).

 

Does anyone know what disk these docker volumes end up on in Unraid? 

Is it in the OS on the RAM?  Does it go on the USB or maybe in the docker.img?

Is moving the Docker volume location something that would persist over reboots?

 

I do think it may be worth facilitating a way this container to work on Unraid because it would give a low maintenance way for less tech savvy people to get a whole Nextcloud setup easily.

Link to comment
36 minutes ago, SSMI said:

 

Does anyone know what disk these docker volumes end up on in Unraid?

 

Data is where you map /data in your docker container.  You can map it to a share that is in a pool of fast SSD.

The docker itself is in your docker.img, by default in your system share.  Most have that in their cache.

Appdata is in your appdata share.  Most have that in their cache as well.

All persist when Unraid is rebooted.

 

My personal experience is that Nextcloud is not the speediest of applications, regardless of how you set it up.

Link to comment
1 hour ago, SSMI said:

Does anyone know what disk these docker volumes end up on in Unraid? 

Docker volumes would end up in the docker image, but it really doesn't change much if anything that a folder path is given instead.

 

This thread you linked is about the mastercontainer, but you said you were using LSIO so not sure what the maintainer of the mastercontainer considering it or not would change.

 

Nextcloud with the official container, data on SSD and Redis backing is really fast for me.

 

Link to comment

What container is considered the official?  I thought it was the All-In-One because that is what the Nextcloud website seems to recommend.  On top of that none of the templates from the apps tab seem to be directly from Nextcloud.

 

If I wanted to switch to the AIO container as long as my docker.img was on something with redundancy (like a two disk cache) it would have similar redundancy to the array and be somewhat protected right?  Then I could use the AIO with the data and back locations mapped like the documentation says and things would be relatively reliable right?

 

Using the AIO has some appeal because it sets everything up.

Link to comment

Yes, AIO is official.

 

Quote

If I wanted to switch to the AIO container as long as my docker.img was on something with redundancy (like a two disk cache) it would have similar redundancy to the array and be somewhat protected right?  Then I could use the AIO with the data and back locations mapped like the documentation says and things would be relatively reliable right?

 

Correct.

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.