Nextcloud performance

Hello,

I’ve been a happy nextcloud user for some years now.

I run a pretty simple nextcloud setup on a nuc that I also use as a media center.

Lately, couldn’t really say when I noticed that the NC performance started degrading. Nothing too bad but 2-3 extra secondes before showing the main files page.

When i checked the CPU use of the server i noticed that mysql was taking a lot of CPU, thing that i had not noticed previously.

I only have 4 active users so i don’t think i have a capacity problem (i5 Quad core proc with 8 gigs ram & ssd)

htop gives me various lines that look like:

 2263 mysql      20   0  633M  263M  9720 S 78.7  3.3  5h25:29 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306

18969 mysql      20   0  633M  263M  9720 S 57.3  3.3 43:57.12 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306

So i got curious and went checking what query runs I see this exact query all the time:

Query updating UPDATEoc_filecacheSETmimetype= '117' WHERE (mimetype<> '117') AND (mimetype<> '2') AND (LOWER(name) LIKE '%.dcm')

No matter what I do.

Is my setup getting old or is something messing with my nextcloud setup?

Thanks and have a nice day,

Here it is the same. The CPU load is about 90-95%.
I am not sure it depends on NC 13.02 or earlier cause I haven’t checked it since a longer time.
I am using php7.0 maria 10.1.32, Ubuntu 16.04 (all updates) NC 13.02.
I know if I checked it last time all was ok but I do not remember which version of NC was running that time.
The load comes from php-fpm and mysql according to “htop”.
If NC is not used for some minutes all comes back to normal state. As soon as I start using NC the load comes up again.

System:
8 GB RAM
CPU Intel® Pentium® CPU J3710 @ 1.60GHz
4 cores

Hope somebody can help

Did you set up caching (redis and apcu)? It takes a lot of load from the database:
https://docs.nextcloud.com/server/13/admin_manual/configuration_server/caching_configuration.html

also see this related post: Nextcloud consuming MASSIVE amounts of RAM? (SOLVED)

So I found that what was generating this was a mis configuration of mine. In one of the MySQL optimisation I did a mispelling which caused MySQL to run around in circles. So I think checking all config files might be a good starting point if you are getting the same exact symptoms.

1 Like

I already lost so much time with such stupid errors…:smirk:

Hi,
can you explain what you have done with MYSQL cause I think it is the same here.
If am calling NC on my browser the load is going up and stay there for some minutes and then it comes back to normal state

13 posts were split to a new topic: Login creates high db load