Remote database server much slower Nextcloud performance

Hi, just wondering why Nextcloud with an external MariaDB database server is much slower than with a local database server. The whole UI is slow. It is usable but way back slower then if the database is on localhost.

We optimized remote MariaDB with usual settings without success. Other Applications like Drupal, Wordpress a.s.o. work smoothly in our infrastructure with remote databases. It is only Nextcloud.

Is this a known issue? Do we have to live with it? Or does someone has a hint what to tune further? Local Redis is there.

Any idea?

Local is always faster than remote beacase the traffic needs to go a shorter distance.

It’s not Nextcloud related at all.

We always consider a certain amount of performance degredation by using remote database. But with Nextcloud it is having a real impact for the UX. Maybe Nextcloud’s SQL is not as much optimized as it could be or it is not possible. Sadly, now we have to switch to local database. Thank you anyway for your response!

1 Like

Well, I’m only the VM dev. :wink:

But I have a hard time thinking you could optimize the server core code for remote DB, I mean they are the same in any case. Tuning happens on the server itself, or the actual database.

Also there are large companies with millions of users that use Nextcloud, and I don’t think their DB is particularly slow, remote or not. :slight_smile:

I run the db on a separate server, no problems regarding performance with 100+ users. You could run mysqltuner on the db server to see what can be optimized. This can help speed up things significantly.

1 Like

Finally we utilised PostgreSQL - for best performance. Thanks for your thoughts!