refactor: Light editing of server tuning guide - #13684
Conversation
Mostly just typos, minor formatting matters, etc. Minor rewording in a couple spots. Other notable changes: - Renamed *Using MariaDB/MySQL instead of SQLite* section to *Replacing SQLite* and expanded it to incorporate PostgreSQL as a coequal option - Added *Tuning your database* section which was really a place to move the MariaDB tuning bit that was in the previous section. Also added a PostgreSQL relevant link there for consistency. Signed-off-by: Josh <josh.t.richards@gmail.com>
| opcache.validate_timestamps = 0 | ||
|
|
||
| Any Server/app upgrades or changes to ``config.php`` will then require restarting PHP (or otherwise manually clearing the cache or invalidating this particular script). | ||
| Any server or app upgrades, or changes to ``config.php``, will then require restarting PHP (or otherwise manually clearing the cache or invalidating this particular script). |
There was a problem hiding this comment.
Nextcloud and app upgrades trigger a full OPcache invalidation in the meantime. So this should apply only for cases where config.php is edited manually, config changes, app- or NC upgrades are done via CLI instead of web UI.
But this is probably something to address in a dedicated PR, to make the point clearer that the web UI and CLI use different OPcache instances, without encouraging readers too lightly to touch these settings. But anything done via web UI should never require a manual PHP restart/OPcache invalidation. Only changes done via CLI or to PHP files directly will do so, depending on (re)validation settings.
| ^^^^^^^^ | ||
|
|
||
| Nextcloud strictly requires code comments to be preserved in opcode, which is the default. But in case PHP settings are changed on your system, you may need set the following: | ||
| .. NOTE: This is more a troubleshooting item than a tuning one IMO |
There was a problem hiding this comment.
Agreed. I guess it was added here when OPcache was not enabled at all by default in PHP, so the section contains all its relevant settings. Now it is enabled OOTB with comments enabled. But before moving this to troubleshooting, we should find out the typical symptoms and errors messages if it is disabled.
|
|
||
| Single Nextcloud instances have shown to use less than 2 MiB of the configured JIT buffer size, so that 8 MiB is sufficient by a large margin. The overall OPcache usage however raises by a larger amount, so that ``opcache.memory_consumption`` might need to be raised in some cases. The Nextcloud admin panel will then show a related warning. | ||
| JIT buffer usage can be monitored with `opcache-gui <https://github.com/amnuts/opcache-gui>`_ as well. | ||
| Most Nextcloud instances use less than 2 MiB of the configured JIT buffer size, so 8 MiB is generally sufficient. |
There was a problem hiding this comment.
Side note: In the meantime I found out that it depends on whether tracing JIT (or some profiling based trigger) is used, or whether scripts are just compiled unconditionally. This is the 3rd digit in opcache.jit = 1255: 5 being tracing (also default), and 0 means that everything is compiled directly on script load, in which case the JIT buffer usage can be about the same size as the regular opcode cache usage. With tracing JIT, the opcache.jit_buffer_size seems to remain at a little above 1 MiB, most likely only containing some meta/profiling data, while the conditionally compiled scripts/functions seems to be allocated from opcache.memory_consumption instead.
But something to address in a dedicated PR once I (or someone else) found time and mood to talk with some PHP developers about this, getting some clarification.
There was a problem hiding this comment.
Sounds good. I still haven't had an opportunity to get into the JIT stuff myself at all directly - other than what you've written/commented in the past. :)
| SQLite then it is possible to convert to MySQL or MariaDB using the steps provided | ||
| in :doc:`../configuration_database/db_conversion`. | ||
| If your installation is already running on | ||
| SQLite, you can convert to MySQL or MariaDB using the steps provided in |
There was a problem hiding this comment.
| SQLite, you can convert to MySQL or MariaDB using the steps provided in | |
| SQLite, you can convert to one of the suggested databases using the steps provided in |
| :doc:`../configuration_database/db_conversion`. | ||
|
|
||
| See the section :doc:`../configuration_database/linux_database_configuration` for instructions | ||
| on configuring Nextcloud for MySQL or MariaDB. |
There was a problem hiding this comment.
| on configuring Nextcloud for MySQL or MariaDB. | |
| on configuring Nextcloud for supported databases. |
☑️ Resolves
Note this was specifically only a minor refactor of the Server Tuning page. Bigger changes will have to wait.
Mostly just typos, minor formatting matters, etc.
Minor rewording in a couple spots.
Other notable changes:
🖼️ Screenshots