Optimize Nextcloud Performance


noja

19 posts in this topic Last Reply

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! 

Link to post
  • 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 post
  • 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 post

I had MariaDb, but, since I'm still running tests, I deleted it before changing to Postgres 12 (the latest available in CA). The 13 one, which is the newest, I wouldn't know how to install it.

Should I install MariaDB and then run the conversion to PgSQL 12 ?

 

Thanks!

Link to post
  • 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 post
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. 

Link to post
  • 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 post
  • 2 weeks later...

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.

Link to post
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 

 

Link to post
  • 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 post
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 post
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 post
26 minutes ago, Huge Yeti said:

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

I must be missing some variable to be correctly filled out or something I missed/not-aware-of. 

 

image.thumb.png.31a1eed48dc17b04d3aaa7570f04da61.png

image.png

image.png

Link to post
4 minutes ago, Huge Yeti said:

I must be missing some variable to be correctly filled out or something I missed/not-aware-of. 

 

image.thumb.png.31a1eed48dc17b04d3aaa7570f04da61.png

image.png

image.png

 

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

 

image.thumb.png.4e298e8d7dc8d90b5225bea611b053c1.png

Link to post
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 post
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 post
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 post

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.