Using cron to perform background jobs¶
See Defining background jobs for a description and the benefits.
Caching improves performance by storing data, code, and other objects in memory. Memory cache configuration for the Nextcloud server must be installed and configured. See Configuring memory caching.
Using MariaDB/MySQL instead of SQLite¶
MySQL or MariaDB are preferred because of the performance limitations of SQLite with highly concurrent applications, like Nextcloud.
See the section Database configuration for how to configure Nextcloud for MySQL or MariaDB. If your installation is already running on SQLite then it is possible to convert to MySQL or MariaDB using the steps provided in Converting database type.
Using Redis-based transactional file locking¶
File locking is enabled by default, using the database locking backend. This places a significant load on your database. See the section Transactional file locking for how to configure Nextcloud to use Redis-based Transactional File Locking.
SSL / encryption app¶
SSL (HTTPS) and file encryption/decryption can be offloaded to a processor’s AES-NI extension. This can both speed up these operations while lowering processing overhead. This requires a processor with the AES-NI instruction set.
Here are some examples how to check if your CPU / environment supports the AES-NI extension:
- For each CPU core present:
grep flags /proc/cpuinfoor as a summary for all cores:
grep -m 1 ^flags /proc/cpuinfoIf the result contains any
aes, the extension is present.
- Search eg. on the Intel web if the processor used supports the extension
Intel Processor Feature Filter You may set a filter by
"AES New Instructions"to get a reduced result set.
- For versions of openssl >= 1.0.1, AES-NI does not work via an engine and
will not show up in the
openssl enginecommand. It is active by default on the supported hardware. You can check the openssl version via
openssl version -a
- If your processor supports AES-NI but it does not show up eg via grep or coreinfo, it is maybe disabled in the BIOS.
- If your environment runs virtualized, check the virtualization vendor for support.
Enable HTTP2 for faster loading¶
Enable PHP OPcache¶
The OPcache improves the performance of PHP applications by caching precompiled bytecode. We recommend at least following settings:
opcache.enable=1 opcache.enable_cli=1 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=10000 opcache.memory_consumption=128 opcache.save_comments=1 opcache.revalidate_freq=1