Optimize Nextcloud Performance


noja

Recommended Posts

Are there any general tips out there for increasing the performance and speed of Nextcloud? 

 

I found this Synology-specific guide that is a little bit in the direction of what I'm looking for.  However, I'm not sure about how to translate into an Unraid environment.

 

My NC instance is based around the LSIO docker container running behind the LSIO Letsencrypt reverse proxy.  My appdata sits on an NVMe drive connected through a PCIe adapter.  The vast majority of my NC storage data is on the array though.  I have 20Mbps upload through a pfSense SG-3100.  

 

Generally, I feel like NC should be pretty snappy, however, moving between pages is definitely not-snappy.  A discussing on reddit notes that this behaviour is heavily influenced by the client.  I am currently using the latest Edge Chromium (I honestly love it) but I've experienced the same general speed issues on Firefox and Vivaldi.  

 

I'm really hoping there is a write up somewhere already about performance tuning from an Unraid specific perspective.

 

Thanks for any direction! 

  • Like 1
Link to comment
  • 1 month later...
  • 2 weeks later...
On 8/10/2020 at 12:05 PM, noja said:

Are there any general tips out there for increasing the performance and speed of Nextcloud? 

 

I found this Synology-specific guide that is a little bit in the direction of what I'm looking for.  However, I'm not sure about how to translate into an Unraid environment.

 

My NC instance is based around the LSIO docker container running behind the LSIO Letsencrypt reverse proxy.  My appdata sits on an NVMe drive connected through a PCIe adapter.  The vast majority of my NC storage data is on the array though.  I have 20Mbps upload through a pfSense SG-3100.  

 

Generally, I feel like NC should be pretty snappy, however, moving between pages is definitely not-snappy.  A discussing on reddit notes that this behaviour is heavily influenced by the client.  I am currently using the latest Edge Chromium (I honestly love it) but I've experienced the same general speed issues on Firefox and Vivaldi.  

 

I'm really hoping there is a write up somewhere already about performance tuning from an Unraid specific perspective.

 

Thanks for any direction! 

Did you ever get anywhere with this? I'm also experiencing the same thing when browsing the Web UI, things are slower than I feel they should be, as if something isn't right somewhere or could be optimized/changed to make things better but I've been hitting a wall in trying to find *what* that may be. 

 

On 9/21/2020 at 5:30 AM, rob_robot said:

I would recommend to switch to postgres11 instead of MongoDB. For me this caused a big improvement in upload speeds and also CPU utilisation. I posted how to set it up on the Nextcloud thread. 

 

FWIW I am running PostgreSQL 13 at this time, just converted my MariaDB to Postgres and it may have made a small performance increase, but not as much as I was hoping for.

Link to comment
  • 2 months later...
12 minutes ago, rojarrolla said:

Hello to all, 

 

I also want to improve Nextcloud speed, however, none of the Postgres (10 or 11) work for me, If I try to connect to Nextcloud I get this error:

Have you made any good progress ?

 

Thanks!

Screen Shot 2020-12-08 at 1.13.29 PM.png

Did you have another DB setup beforehand? Did you run the conversion? 

https://docs.nextcloud.com/server/20/admin_manual/configuration_database/db_conversion.html

 

I have mine up and running on PgSQL 13.1 with Redis as well, it's faster but still leaves a LOT to be desired at times...

Link to comment
  • 4 weeks later...

I'm using Nextcloud stable through Swag with MariaDB running off SSD cache drive.  Redis also running.  Seeing the same issues as you guys.  It's awesome in terms of use-cases, but it is SLOW.  Slow to navigate to site page, slow going between apps.  Things like Talk and OnlyOffice take many seconds to load.  I run Ombi, wallabag, and freshrss also through Swag and they are LOADS faster.  Plex is lightning fast.

 

Is it worth migrating the database to PostgreSQL?  This doesn't feel like a database issue... like that initial connection time is wild just getting to the dashboard.

Edited by akshunj
Link to comment
6 minutes ago, akshunj said:

I'm using Nextcloud stable through Swag with MariaDB running off SSD cache drive.  Redis also running.  Seeing the same issues as you guys.  It's awesome in terms of use-cases, but it is SLOW.  Slow to navigate to site page, slow going between apps.  Things like Talk and OnlyOffice take many seconds to load.  I run Ombi, wallabag, and freshrss also through Swag and they are LOADS faster.  Plex is lightning fast.

 

Is it worth migrating the database to PostgreSQL?  This doesn't feel like a database issue... like that initial connection time is wild just getting to the dashboard.

The more I look into this, the more it's just a nextcloud thing... Everyone that uses it at any sort of scale seems to have problems with speed.

 

For now I've given up and just continue to use it as a file-sync (and the rare share of a file/folder) but I've stopped using it for much else because it's so awfully slow. 

I have no issues personally w/ the sync features. 

  • Thanks 1
Link to comment
  • 2 months later...
On 1/3/2021 at 1:21 AM, CorneliousJD said:

The more I look into this, the more it's just a nextcloud thing... Everyone that uses it at any sort of scale seems to have problems with speed.

 

For now I've given up and just continue to use it as a file-sync (and the rare share of a file/folder) but I've stopped using it for much else because it's so awfully slow. 

I have no issues personally w/ the sync features. 

I have exactly the same problem. But also Yourls and Filerun suffer from slow loading speeds, not as bad as Nextcloud though. But Plex, Radarr etc. is lighting fast. Al run through the same SWAG container.

Tried everything with Nextcloud. With Redis, without. Tinkered with a lot of SWAG settings. No effect. Removed all but the bare minimum apps from Nextcloud. No effect.

Installed a new instance of Nextcloud as a test, lightning fast...

Link to comment
  • 2 weeks later...
6 minutes ago, funstuk said:

Switching to Postgres solved my performance issue.

I could not find the true reason for the slowness of MariaDB.

There were no problems with the network, the database was located on the SSD.

I wish I could say the same. 

Postgres improved performance slightly (enough to actually notice) but not as much as I had been hoping for. Irs still slow to me. I do have thousands of files syncing and some plugins doing other services too 

 

  • Like 1
Link to comment
  • 2 weeks later...

@CorneliousJD this bit: "... but it is SLOW.  Slow to navigate to site page, slow going between apps."

 

Do you have other alternatives in mind?

 

I've tried to install nextcloud with mariadb,mysql,postres and I can't install it yet because of db errors about the password or user not correct. I dabbled in the CLI creating the db name, root name, password, user pass and no dice so far.  I decided to try sqlite which is the default but there is a warning about not using sqlite for production environments. I do have 2 NVME's as cache and I am hoping the slowness you mentioned would be mitigated by this available cache (2TB each) as soon as I find out how to configure nextcloud w/ postgres.

Link to comment
7 minutes ago, Huge Yeti said:

@CorneliousJD this bit: "... but it is SLOW.  Slow to navigate to site page, slow going between apps."

 

Do you have other alternatives in mind?

 

I've tried to install nextcloud with mariadb,mysql,postres and I can't install it yet because of db errors about the password or user not correct. I dabbled in the CLI creating the db name, root name, password, user pass and no dice so far.  I decided to try sqlite which is the default but there is a warning about not using sqlite for production environments. I do have 2 NVME's as cache and I am hoping the slowness you mentioned would be mitigated by this available cache (2TB each) as soon as I find out how to configure nextcloud w/ postgres.

 

SQLite's performance is awufl too, would recommend swapping that out right away. If you're having trouble w/ Postgres, I'd install the Linuxserver MariaDB docker container and use either Adminer or PHPMyAdmin (probalby easier of the 2) so you can get a GUI-based managemetn interface for your MariaDB to easily add a user/database.

Link to comment
2 minutes ago, CorneliousJD said:

 

SQLite's performance is awufl too, would recommend swapping that out right away. If you're having trouble w/ Postgres, I'd install the Linuxserver MariaDB docker container and use either Adminer or PHPMyAdmin (probalby easier of the 2) so you can get a GUI-based managemetn interface for your MariaDB to easily add a user/database.

Excellent. I will try this sequence of steps and keep you all posted. Thanks!

Link to comment
2 hours ago, Huge Yeti said:

 

Localhost amended and seems to recognize the db but with the following error:

 

image.thumb.png.4e298e8d7dc8d90b5225bea611b053c1.png

You should reach out in the nextcloud container support thread instead of here actually. 

 

But you need to create a database too, not just a user. 

 

Also I would *not* recommend to not have a password. 

 

You may want to look up a tutorial or video on setting up nextcloud on unRAID. It should walk you thru everything.

 

Link to comment
On 3/26/2021 at 5:10 PM, CorneliousJD said:

You should reach out in the nextcloud container support thread instead of here actually. 

 

But you need to create a database too, not just a user. 

 

Also I would *not* recommend to not have a password. 

 

You may want to look up a tutorial or video on setting up nextcloud on unRAID. It should walk you thru everything.

 

Tutorial worked great! up and running w/ Mariadb. I noticed, like you said, it is a tad slow, but sufficient for my needs. 

Link to comment
On 3/26/2021 at 8:15 PM, CorneliousJD said:

SQLite's performance is awufl too

 

Plex is running on SQLite and it's blinding fast on my NVMe M.2. SQLite is easy to backup and optimize. I would switch from MariaDB to SQLite for Nextcloud immediately if there would be a migration path. BTW, I'm running Nextclouds config and data directory on that same NVMe M.2.

 

As you said already, I fear it's a Nextcloud/PHP thing.

 

Edited by hawihoney
Link to comment
  • 3 months later...

Ive recently set up a new server (dual x5687, 24gb RAM) and have issues with nextcloud performance. Ive got 2 cache pools in my server. first is 2x256gb m.2 sata ssds (called 'cache'), the other are 2x16GB optane drives (called syspool)  - both in raid 1 for redundancy. my docker img lived on the cache poo, and i put app data on the optane pool thinking it might make nextcloud a bit faster. and at first, it was! I have another very simialr server with nextcloud running, and the performance on the new server was just slightly faster than the old server. I then decided I wanted to try putting the docker img on the optane drives too, just to see what sort of difference that made. I deleted all the dockers/img/appdata to start with a clean slate, stopped docker service, and changed from btrfs img to directory (due to limited space on the optanes) and mapped it accordingly. I set up mariadb and nextcloud again, and suddenly the performance was slow as hell. easily 2-3 times slower than it was before. I again deleted everything and changed from directory to btrfs.img again to see if that made a difference (leaving it on the optane pool) but still just as slow. So again I deleted everything and set it back to how I originally had it. but still, its horribly slow. I then decided to try out postgressql as per this thread, but that made absolutely zero difference.

 

i have no idea why it's suddenly so slow when before it was so fast. But nothing I do seems to work. Has anyone had any luck tracking down performance issues with nextcloud?

  • Like 2
Link to comment
  • 5 months later...

I had nextcloudpi on my unraid server for a day or so.  Even though it is not a PI server it loaded up on my Ryzen 5 5600 with 16 gig of ram and no reverse proxy, just a local connection to the host.  The thing loaded all my data up in very short order.  It got me to thinking I wanted to step back and install a database and a full nextcloud.  That too was not half bad.  The slowness became apparent after I started using the proxy.  So, I went back and turned it off, but the performance was not great.  I am holding out to get my 350 gig of data loaded into it.  I see it is slow, ram is not being touched, network is idle, disk IO is in the k's not the megs like it was doing.  I never got rid of my SMB and my robocopy scripts.  So, I may be dumping my DNS all together.

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.