Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Explictly enable JIT in PHP 8.4 #1455

Merged
merged 3 commits into from
Feb 16, 2025
Merged

Docs: Explictly enable JIT in PHP 8.4 #1455

merged 3 commits into from
Feb 16, 2025

Conversation

melroy89
Copy link
Member

@melroy89 melroy89 commented Feb 15, 2025

  • Enable the opcache.jit option explicitly, before it was implict set to tracing but since PHP 8.4 or above this option will be set to "disable". While JIT was disabled by default in the past as well, you could just enable it by setting "opcache.jit_buffer_size", well that is no more.
  • Adding a space before & after the = sign

I use the advance user option:

opcache.jit string|int

    For typical usage, this option accepts one of four string values:

        disable: Completely disabled, cannot be enabled at runtime.
        off: Disabled, but can be enabled at runtime.
        tracing/on: Use tracing JIT. Enabled by default and recommended for most users.
        function: Use function JIT.

    For advanced usage, this option accepts a 4-digit integer CRTO, where the digits mean:

    C (CPU-specific optimization flags)

            0: Disable CPU-specific optimization.
            1: Enable use of AVX, if the CPU supports it.

    R (register allocation)

            0: Don't perform register allocation.
            1: Perform block-local register allocation.
            2: Perform global register allocation.

    T (trigger)

            0: Compile all functions on script load.
            1: Compile functions on first execution.
            2: Profile functions on first request and compile the hottest functions afterwards.
            3: Profile on the fly and compile hot functions.
            4: Currently unused.
            5: Use tracing JIT. Profile on the fly and compile traces for hot code segments.

    O (optimization level)

            0: No JIT.
            1: Minimal JIT (call standard VM handlers).
            2: Inline VM handlers.
            3: Use type inference.
            4: Use call graph.
            5: Optimize whole script.

See also: https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html

And see also: https://php.watch/versions/8.4/opcache-jit-ini-default-changes

@melroy89 melroy89 added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 15, 2025
@melroy89 melroy89 enabled auto-merge (squash) February 15, 2025 18:43
@melroy89 melroy89 merged commit 5a18b74 into main Feb 16, 2025
7 checks passed
@melroy89 melroy89 deleted the explicit_enable_jit branch February 16, 2025 23:14
@melroy89 melroy89 added this to the v1.8.1 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants