# Nextcloud performance

**URL:** <https://help.nextcloud.com/t/nextcloud-performance/28720>\
**Category:** ℹ️ Support\
**Tags:** nc13\
**Created:** [March 10, 2018, 5:08pm UTC](https://help.nextcloud.com/t/nextcloud-performance/28720 "2018-03-10T17:08:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![beankylla](https://help.nextcloud.com/user_avatar/help.nextcloud.com/beankylla/32/8195_2.png) [@beankylla](https://help.nextcloud.com/u/beankylla)\
**Post date:** [March 10, 2018, 5:08pm UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/1 "2018-03-10T17:08:20Z")

</div>

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 UPDATE`oc\_filecache`SET`mimetype`= '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,

---

<div class="post-metadata">

**Author:** ![Tom63](https://help.nextcloud.com/letter_avatar/tom63/32/6_449c533f586939b6e5f246632a46421f.png) [@Tom63](https://help.nextcloud.com/u/Tom63)\
**Post date:** [May 6, 2018, 8:21am UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/2 "2018-05-06T08:21:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_449c533f586939b6e5f246632a46421f.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [May 6, 2018, 10:19am UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/3 "2018-05-06T10:19:44Z")

</div>

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](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)](https://help.nextcloud.com/t/nextcloud-consuming-massive-amounts-of-ram-solved/30599)

---

<div class="post-metadata">

**Author:** ![beankylla](https://help.nextcloud.com/user_avatar/help.nextcloud.com/beankylla/32/8195_2.png) [@beankylla](https://help.nextcloud.com/u/beankylla)\
**Post date:** [May 6, 2018, 2:13pm UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/4 "2018-05-06T14:13:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_449c533f586939b6e5f246632a46421f.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [May 7, 2018, 7:09am UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/5 "2018-05-07T07:09:59Z")

</div>

> [@beankylla](#):
>
> MySQL optimisation I did a mispelling which caused MySQL to run around in circles

I already lost so much time with such stupid errors…😏

---

<div class="post-metadata">

**Author:** ![Tom63](https://help.nextcloud.com/letter_avatar/tom63/32/6_449c533f586939b6e5f246632a46421f.png) [@Tom63](https://help.nextcloud.com/u/Tom63)\
**Post date:** [May 7, 2018, 8:09am UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/6 "2018-05-07T08:09:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_449c533f586939b6e5f246632a46421f.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [May 10, 2018, 8:09am UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/7 "2018-05-10T08:09:56Z")

</div>

13 posts were split to a new topic: [Login creates high db load](https://help.nextcloud.com/t/login-creates-high-db-load/31526)

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_449c533f586939b6e5f246632a46421f.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [May 10, 2018, 8:04am UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/20 "2018-05-10T08:04:53Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 9, 2024, 2:23pm UTC](https://help.nextcloud.com/t/nextcloud-performance/28720/21 "2024-12-09T14:23:27Z")

</div>


