# Performance issues/tuning

**URL:** <https://help.nextcloud.com/t/performance-issues-tuning/41482>\
**Category:** ℹ️ Support\
**Tags:** nc15, nc13\
**Created:** [November 19, 2018, 8:14am UTC](https://help.nextcloud.com/t/performance-issues-tuning/41482 "2018-11-19T08:14:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomasz-grobelny](https://help.nextcloud.com/user_avatar/help.nextcloud.com/tomasz-grobelny/32/14042_2.png) [@tomasz-grobelny](https://help.nextcloud.com/u/tomasz-grobelny)\
**Post date:** [November 19, 2018, 8:14am UTC](https://help.nextcloud.com/t/performance-issues-tuning/41482/1 "2018-11-19T08:14:29Z")

</div>

Nextcloud version: 13/15 beta (two instances)  
Operating system and version: Debian 9.4/docker for nextcloud  
Webservers: nginx as proxy + apache on backend  
PHP version: 7.1.18

The installation is slow. It is a one user instance on a not very powerful hardware (AMD GX-412TC SOC CPU + 4GB RAM). Loading the files app takes 250 requests. Many trivial (eg. request for js file) requests taking 250ms (on local network, according to FF), some requests take 3 seconds waiting time. Logs from apache confirm it is not a network issue - apache has only slightly lower times (eg. 10ms less). I also looked into the mysql logs and found nothing interesting - queries finish in several ms.

I did an xdebug profiling on periodic get notifications call which takes here about 400ms and found that 3 methods that take most of the execution time (which is then of course much longer) are:  
json\_encode - for objects taken from cache  
DIContainer/\_\_constructor  
DIContainer/query

So here comes the question:

1. Are the timings what you would consider normal for nextcloud on this hardware?
2. Any chance to improve performance either by configuration or code change?

---

<div class="post-metadata">

**Author:** ![rtznprmpftl](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rtznprmpftl/32/21836_2.png) [@rtznprmpftl](https://help.nextcloud.com/u/rtznprmpftl)\
**Post date:** [November 19, 2018, 10:07pm UTC](https://help.nextcloud.com/t/performance-issues-tuning/41482/2 "2018-11-19T22:07:43Z")

</div>

As allways, the latest MySQL Versions are often faster than the previous ones.

how is PHP configured ? as apache module or FPM/FastCGI?  
Do you use the opcache of php?  
why do you have 2 webservers? (this can increase latency)  
What kind of storage are you using?

---

<div class="post-metadata">

**Author:** ![tomasz-grobelny](https://help.nextcloud.com/user_avatar/help.nextcloud.com/tomasz-grobelny/32/14042_2.png) [@tomasz-grobelny](https://help.nextcloud.com/u/tomasz-grobelny)\
**Post date:** [November 19, 2018, 11:00pm UTC](https://help.nextcloud.com/t/performance-issues-tuning/41482/3 "2018-11-19T23:00:22Z")

</div>

I hope I use opcache. At least nextcloud does not complain that it lacks opcache 🙂 Not sure how to be absolutely certain of it.

As mentioned in this case mysql does not seem to be the issue. Although when moving/copying files mysql takes considerable number of CPU cycles.

Nginx is acting as proxy for two nextcloud instances - one for real data, one for development purposes. Again - this does not seem to add latency - timing from browser matches titming from backend apache.

Storage: local files.

---

<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 4, 2024, 8:16am UTC](https://help.nextcloud.com/t/performance-issues-tuning/41482/4 "2024-12-04T08:16:01Z")

</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:** [January 24, 2025, 8:17am UTC](https://help.nextcloud.com/t/performance-issues-tuning/41482/5 "2025-01-24T08:17:59Z")

</div>


