Nextcloud Web UI EXTREMELY Slow

What are your hardware specs?

If you want to try a fun comparison, try spinning up the very minimalist filestash.

Oops, forgot about that.

4 cores @ 2400 MHz
8 GB RAM

Did you configure Redis?

I did not do any custom configuration, because I partially migrated my old data to the new instance, as that had priority. Now, the slowness did not stop, so I decided to look for help, to get hints from the community.

So, if Redis is not configured by default by the Helm Chart, then I did not configure it. I should look it up, though.

However, as far as I understood, the Helm Chart should be already pretty optimised and to my surprise I did not see any error or relevant warning on the admin page, that usually tells you how to optimise your Nextcloud server.

Redis makes a significant difference in file caching. Definitely set it up. I don’t know the helm chart, but the admin documentation includes some excellent recommendations for improving performance.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html

Here is a quick docker example… just found on a search. How to make your NextCloud faster with Redis as an in-memory cache using Docker? by Subjectively about this and that

I see.

I looked it up and indeed, it’s turned off by default. I will turn it on and see how it goes. Thanks for the tip. I thought the optimised chart would allow all the bells and whistles for optimisation by default, so I didn’t explicitly check, if it was turned on.

Cool, interested to hear how it goes for you. Also be sure to give filestash a spin on docker for comparison. It is very minimal and very fast.

So, far I successfully enabled Redis.

I also heavily slimmed down the server. I uninstalled all apps, except the absolutely basic ones. I removed external storages and other features. I tried to slimmify as much as reasonable.

Performance improved a bit overall and it’s noticable. However, it’s still very slow. Especially, when I am reloading the page or loading it for the first time, it still takes up to a minute, until it’s finished.

It’s good to see progress, but I wish it wouldn’t always feel like I’m running IntelliJ or whatever huge IDE on the server, eating up so many resources, that it’s very slowed down. (Nextcloud does not even eat all resources, it’s still super slow…)

I also wanted to apply those settings mentioned in that thread, like e.g. increasing pm.max_children. However, it seems like it’s not doable by default through the Helm Chart or even the Nextcloud Docker image. It seems like, this has to be made accessible, manually.

@just

Would you say pm.max_children should help a lot or is it just a minor adjustment?

Take a look at the official server tuning guide.

From my experience PHP memory limit has huge impact - I’m under impression default 512M limit is too low today - my home instance improved after raising PHP memory limit to 1G (or 2G)

While trying to tune the server further, I increased the PHP memory limit to 1024MB, i.e. the environment variable PHP_MEMORY_LIMIT is appropriately set inside the image and container. Not sure, if this actually applies the change, though.

I generally have an issue, detecting, if things work as they should. When looking at the Redis situation again, I started getting doubts, if it is set up correctly. I checked the Memcache guide on the server tuning page and noticed, that I either missed some configuration or it was applied automatically.
It seemed like, it should’ve been applied manually, so I did that.

However, I do not see any difference and now I’m questioning myself, how I am supposed to detect if the tuning is applied successfully. Does the Redis memory caching work? Is everything set up correctly in that regard?
I do not see any relevant log messages at all, hinting at anything.

That said, I used the stopwatch another time and measured the time for complete from scratch loading of the Files page + how long it takes for the file list to fully finish loading, showing the files and folders available.

It took 1 minute and 12 seconds for the Files page to finish loading and another 41 seconds for the file list itself to finish loading, showing all the files and folders, properly.
That means I have to wait about 2 minutes, every single time I enter the main page of Nextcloud. This is absolutely insane.

To improve this, I want to apply the server tuning suggestions, but I’m not sure how to verify and prove, that they are actually applied. I don’t know how I would ask PHP or Nextcloud, if the settings are applied. It all seems convoluted and I don’t trust looking only at the config.php, anymore, as it’s only saying what should be the case, but not necessarily what is the case…

Do you have the richdocuments app installed?

I uninstalled all non-featured apps and some of the featured ones. I only kept the basic ones.

I again looked at the Active Apps page and I don’t see anything which looks like a richdocuments app.

Does it have a different name and is it featured?

Are apps still able to have a performance impact, when installed, but disabled?

No, when disabled they should not have an impact but for a test you could remove that app completely.

I looked at the page with the disabled apps and do not see any richdocuments app.

Are there any other performance impacting apps, besides File Access Control?

The app might be called Nextcloud Office https://apps.nextcloud.com/apps/richdocuments

It’s also ironic how quick and smooth it is to remove apps… No performance issues, at all.
But whenever I have to load a page in Nextcloud, it’s horrible…

I checked and there is no app of the name “Office”, “Nextcloud Office”, “Documents” or anything like that.

Okay, then no idea why it is so slow

Not sure if removing the apps helped or if the cache kicked in just now, but switching to Files again, took 32 seconds to fully load the page and 18 seconds to fully load the file list.

Still, terribly long waiting times, but it has at least significantly improved compared to how it was before.

https://apps.nextcloud.com/apps/richdocuments

Actually, loading this page took a very long time. Maybe it’s normal for Nextcloud to be super slow in general…

For me it took max 1s to load. Maybe something is wrong with your router or so?