mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-02 17:59:36 +07:00
Merge pull request #6238 from nextcloud/nc-doc-6046
Remove configuration examples
This commit is contained in:
@@ -42,19 +42,7 @@ configure Nextcloud for MySQL or MariaDB. If your installation is already runnin
|
||||
SQLite then it is possible to convert to MySQL or MariaDB using the steps provided
|
||||
in :doc:`../configuration_database/db_conversion`.
|
||||
|
||||
In smaller installations you might not want to set up a separate cache. However
|
||||
you can still tune your database. The following example is suited for a database
|
||||
smaller than 1GB. MySQL will consume up to 1GB of RAM for caching. Please make
|
||||
sure that your system has sufficient free RAM after the change, so that it does
|
||||
not start to use your swap partition, when it receives a burst of requests. In
|
||||
the given example your ``/etc/mysql/conf.d/mysql.cnf`` might contain the
|
||||
following lines. (beware that this is the block for mysqld not mysql)
|
||||
|
||||
.. code:: ini
|
||||
|
||||
[mysqld]
|
||||
innodb_buffer_pool_size=1G
|
||||
innodb_io_capacity=4000
|
||||
For more details and help tuning your database, check `this article at MariaDB <https://mariadb.com/kb/en/optimization-and-tuning/>`_.
|
||||
|
||||
Using Redis-based transactional file locking
|
||||
--------------------------------------------
|
||||
@@ -64,10 +52,10 @@ places a significant load on your database. See the section
|
||||
:doc:`../configuration_files/files_locking_transactional` for how to
|
||||
configure Nextcloud to use Redis-based Transactional File Locking.
|
||||
|
||||
SSL / encryption app
|
||||
TLS / encryption app
|
||||
--------------------
|
||||
|
||||
SSL (HTTPS) and file encryption/decryption can be offloaded to a processor's
|
||||
TLS (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
|
||||
<https://wikipedia.org/wiki/AES_instruction_set>`_.
|
||||
@@ -95,35 +83,21 @@ AES-NI extension:
|
||||
* If your environment runs virtualized, check the virtualization vendor for
|
||||
support.
|
||||
|
||||
Enable HTTP2 for faster loading
|
||||
Enable HTTP/2 for faster loading
|
||||
-------------------------------
|
||||
|
||||
HTTP2 has `huge speed improvements <https://www.troyhunt.com/i-wanna-go-fast-https-massive-speed-advantage/>`_ over HTTP with multiple request. Most `browsers already support HTTP2 over SSL (HTTPS) <https://caniuse.com/#feat=http2>`_. So refer to your server manual for guides on how to use HTTP2.
|
||||
|
||||
You can check if your application already uses HTTP2 or not by running the simple curl command
|
||||
|
||||
..code:: sh
|
||||
curl -I https://mywebsite.com/
|
||||
HTTP/2 has `huge speed improvements <https://www.troyhunt.com/i-wanna-go-fast-https-massive-speed-advantage/>`_ over HTTP with multiple request. Most `browsers already support HTTP/2 over TLS (HTTPS) <https://caniuse.com/#feat=http2>`_. Refer to your web server manual for guides on how to enable HTTP/2.
|
||||
|
||||
Tune PHP-FPM
|
||||
------------
|
||||
|
||||
If you are using a default installation of php-fpm you might have noticed
|
||||
If you are using a default installation of PHP-FPM you might have noticed
|
||||
excessive load times on the web interface or even sync issues. This is due
|
||||
to the fact that each simultaneous request of an element is handled by a
|
||||
separate PHP-FPM process. So even on a small installation you should allow
|
||||
more processes to run. For example on a machine with 4GB of RAM and 1GB of
|
||||
MySQL cache following values in your ``www.conf`` file should work:
|
||||
more processes to run in parallel to handle the requests.
|
||||
|
||||
.. code:: ini
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 120
|
||||
pm.start_servers = 12
|
||||
pm.min_spare_servers = 6
|
||||
pm.max_spare_servers = 18
|
||||
|
||||
Depending on your current PHP version you should find this file e.g. under ``/etc/php/7.4/fpm/pool.d/www.conf``
|
||||
`This link <https://spot13.com/pmcalculator/>`_ can help you calculate the good values for your system.
|
||||
|
||||
Enable PHP OPcache
|
||||
------------------
|
||||
@@ -132,11 +106,11 @@ The `OPcache <https://php.net/manual/en/intro.opcache.php>`_ improves the perfor
|
||||
|
||||
.. code:: ini
|
||||
|
||||
opcache.enable=1
|
||||
opcache.interned_strings_buffer=8
|
||||
opcache.max_accelerated_files=10000
|
||||
opcache.memory_consumption=128
|
||||
opcache.save_comments=1
|
||||
opcache.revalidate_freq=1
|
||||
opcache.enable = 1
|
||||
opcache.interned_strings_buffer = 8
|
||||
opcache.max_accelerated_files = 10000
|
||||
opcache.memory_consumption = 128
|
||||
opcache.save_comments = 1
|
||||
opcache.revalidate_freq = 1
|
||||
|
||||
For more details check out the `official documentation <https://php.net/manual/en/opcache.configuration.php>`_ or `this blog post about some recommended settings <https://www.scalingphpbook.com/blog/2014/02/14/best-zend-opcache-settings.html>`_.
|
||||
|
||||
Reference in New Issue
Block a user