Generic performance problem

Nextcloud version (eg, 20.0.5): 25.0.2
Operating System: Linux 5.15.69-grsec-kapsi x86_64
CPU: Intel Xeon E312xx (Sandy Bridge) (12 cores)
Memory: 31.32 GB
Webserver: Apache 2.4

Version: 8.0.26
Memory limit: 512 MB
Max execution time: 3600
Upload max size: 256 MB
Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, enchant, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, ldap, exif, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Shared server environment. I’ve used Nextcloud there since 1x versions, but recently (in some 2-3 months) the web interface has gotten really slow. Can’t tell exactly when as I mostly just sync my pictures there with mobile app. Support didn’t really have any ideas on what to check (“oh, php”).

So I’m turning towards the community incase you could come up with ideas for me or to persons running the servers.

There is no redis, nor will one become available.

So the issue: slowness.
From the same server environment where my nextcloud is, fetchin login page with wget: 3-5 seconds. Example:

[-bash]:~$>time wget -o /dev/null

real	0m5.705s
user	0m0.008s
sys	0m0.008s

With a browser, if I create a simple “hello world” page within the nextcloud page, fetching that page takes few milliseconds, but on the other hand the fetch of /index.php/apps/dashboard/ takes 1+ second as shown on the browser console/developer tools.

for the heck of it, I also installed profiler (btw above figures are without profiler) to see if I get anythiong out of it. Well, I got nothing, but perhaps you can tell somehing based on this:

Fetching /index.php/apps/files/ - 3458ms
Db query 115
Events (just listing the slow ones)

Time Description
boot 1191.9 ms (Start: 83.2068920135498, End: 1275.0771045684814) Initialize
init 1275.1 ms (Start: 0, End: 1275.0840187072754) OC::init
runtime 2183.7 ms (Start: 1275.0890254974365, End: 3458.806037902832) Runtime
request 2191.4 ms (Start: 1275.089979171753, End: 3458.806037902832) Full request after boot
handle_request 2191.2 ms (Start: 1275.2079963684082, End: 3458.806037902832) Handle request
loadroutesfiles 16.5 ms (Start: 1664.6339893341064, End: 1681.0970306396484) Loading Routes
run_route 1773.9 ms (Start: 1692.573070526123, End: 3458.806037902832) Run route
setup_root_fs 6.8 ms (Start: 1854.9480438232422, End: 1861.7680072784424) Setup root filesystem
setup_fs 346.1 ms (Start: 2025.6259441375732, End: 2371.7329502105713) Setup filesystem

Any pointers and ideas are welcome. Currently my site is almost unbrowseable.

There is no redis, nor will one become available.

do you have any other form of memcache enabled?

Is it possible the shared server is bogged down from other users?

Had you made any changes/updates during this time frame?

Is this shared hosting (everything managed by the hoster with very little things you can change) or is this a virtual server where you can at least do everything within this environment?

For a real shared hosting environment, it’s very difficult to analyse and even if you find the issue, you can’t do much about it (setting up additional caches etc.).

For the virtual server, you can at least check what resource is limiting you, cpu, memory or i/o performance. If you compare that with the resources garantueed, you can start optimizing your current setup.

Problem over time: You have more stuff in your Nextcloud, that potentially makes it slower. Also from the code, they rely more and more on caching to make everything fast.