Performance Considerations


This document introduces some common considerations and tips on improving performance of ownCloud. Speed of ownCloud is important - nobody likes to wait and often, what is just slow for a small amount of data will become unusable with a large amount of data. Please keep these tips in mind when developing for ownCloud and consider reviewing your app to make it faster.

Tips welcome: More tips and ideas on performance are very welcome!

Database performance

The database plays an important role in ownCloud performance. The general rule is: database queries are very bad and should be avoided if possible. The reasons for that are:



  • Scalability. If you have a big ownCloud cluster setup you usually have several ownCloud/Web servers in parallel and a central database and a central storage. This means that everything that happens on the ownCloud/PHP side can parallelize and can be scaled. Stuff that is happening in the database and in the storage is critical because it only exists once and can’t be scaled so easily.

We can reduce the load on the database by:

  1. Making sure that every query uses an index.

  2. Reducing the overall number of queries.




  1. Slow query log.


log_slow_queries = 1
log_slow_queries = /var/log/mysql/mysql-slow.log


  1. log all queries.


log_slow_queries = 1
log_slow_queries = /var/log/mysql/mysql-slow.log
  1. log queries without an index.


log_slow_queries = 1
log_slow_queries = /var/log/mysql/mysql-slow.log

Measuring performance



Getting help

If you need help with performance or other issues please ask on our mailing list or on our IRC channel #owncloud-dev on