Performance issues/tuning

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

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?
1 Like

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?

I hope I use opcache. At least nextcloud does not complain that it lacks opcache :slight_smile: 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.