Skip to content

refactor: Light editing of server tuning guide - #13684

Merged
joshtrichards merged 2 commits into
masterfrom
jtr/refactor/install-tuning
Sep 22, 2025
Merged

joshtrichards merged 2 commits into
masterfrom
jtr/refactor/install-tuning

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Sep 18, 2025 •

Copy link
Copy Markdown
Member

☑️ 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:

  • 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 comment that was in the previous section. Also added a PostgreSQL relevant link there for consistency.

🖼️ Screenshots

image

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>
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).

@MichaIng MichaIng Sep 18, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@MichaIng MichaIng Sep 18, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
on configuring Nextcloud for MySQL or MariaDB.
on configuring Nextcloud for supported databases.

@joshtrichards
joshtrichards merged commit f8ae032 into master Sep 22, 2025
11 checks passed
@joshtrichards
joshtrichards deleted the jtr/refactor/install-tuning branch September 22, 2025 05:31
@skjnldsv skjnldsv modified the milestones: Nextcloud 33, Nextcloud 32 Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants