Nextcloud version: 18.04
Operating system and version: Ubuntu Server 18.04
Apache version: Apache 2.4.29
PHP version: 7.2.24
PHP memory limit: 512 MB
PHP Max Execution Time: 3600
MySQL version: 5.7.30
The problem I’m facing is that the web interface is too slow to load.
The web interface usually takes 10-30 seconds to load. Depending where you live in the world, this might sound ok, but usually websites load in 1-3 seconds in Bucharest. It also seems that if there isn’t any activity for a while (an hour or so), the interface kind of ‘goes to sleep’ - sort of speak - and i need to reload the tab in order to access it again.
Of course, the server never goes into suspend mode and even if the interface is not responding, I can still access the files via sync clients (like on Android for example).
The file access is very fast, though. So when the desktop client syncs the files on my drive or phone, it’s very fast. It seems the problem is with the web interface alone.
I don’t think it’s anything to do with my internet connection.
I live in Bucharest, Romania and we have some of the fastest internet in the world. When I download something online, I normally have speeds of 10-20 MB/s. I don’t think my ISP throttles my connection - as I’ve said, the file access is very fast. And my ISP even lets me setup my own dynamic dns and open whatever port I want on the router.
I also think my system should be fast enough.
The server is dedicated to Nextcloud only, and it’s connected via ethernet cable to the router.
The server runs on a HP Z200 workstation with an intel Xeon X3470 3GHz 4 core processor, 8GBs DDR3 RAM and 3 x 250 GB Seagate HDD ST3250312CS.
I am the only user on my Nextcloud and I usually don’t perform any heavy tasks. On average, the CPU shows 1% usage and RAM about 1.5 GB. I also have 250 GB of free hard disk space available.
Also, this issue is not with Nextcloud 18. I’ve been using Nextcloud for almost 2 years now, and it’s always been like this.
Also also 90% of the time I access the cloud from within Bucharest, so I’m not far away from the server.
I followed the instructions on this web page, and I did notice a slight increase in speed, but still not enough, and not always:
https://docs.nextcloud.com/server/18/admin_manual/installation/server_tuning.html?highlight=slow
I configured memcache this way, acording to the guide above. I hope it’s correct:
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
I have enabled OP Cache as well. These are my settings:
opcache.enable=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=256
opcache.save_comments=1
opcache.revalidate_freq=1
I’ve also disabled the swap partition, and I’m only using RAM right now. I understand it had the potential to make things slower.
So, with all these things said, what can I do to make the web interface load faster and not ‘fall asleep’ again?
I know of course, there is no competition between my server and something like Google Drive, but all things above considered, I really think I should be able to have the same speeds as any commercial application and any other website I access, really. What do you guys think?