Change how JIT is disabled by default View as Markdown

Implemented (PHP 8.4)
Authors
Daniil Gentili daniil@daniil.it
Date
2023-11-15
Source
wiki.php.net/rfc/jit_config_defaults

Vote

Change how JIT is disabled by default? closed
Yes
17
No
0
17 voters
ashnazg Yes 2023-12-07 18:40
brzuchal Yes 2023-12-03 15:20
crell Yes 2023-12-03 15:54
derick Yes 2023-12-04 10:42
devnexen Yes 2023-12-20 19:33
galvao Yes 2023-12-04 16:33
geekcom Yes 2023-12-13 19:56
kguest Yes 2023-12-06 16:25
kocsismate Yes 2023-12-20 10:01
levim Yes 2023-12-03 17:24
mauricio Yes 2023-12-18 20:40
nicolasgrekas Yes 2023-12-05 17:18
ocramius Yes 2023-12-03 13:17
sebastian Yes 2023-12-03 16:35
sergey Yes 2023-12-11 07:38
stas Yes 2023-12-03 21:38
weierophinney Yes 2023-12-03 13:50

Discussions on the mailing list

Change default method of disabling JIT for PHP 8.4
by Daniil Gentili · 8 messages
[RFC] [Discussion] Change how JIT is disabled by default
by Daniil Gentili · 7 messages
[VOTE] [RFC] Change how JIT is disabled by default
by Daniil Gentili · 1 message

RFC text

Copied from wiki.php.net, last synchronized Oct 13, 2026 11:50 UTC

Introduction

This RFC proposes to change how JIT is disabled by default.

Proposal

Currently, JIT is disabled by default using the opcache.jit_buffer_size=0 default, instead of opcache.jit=disable.

For example, here are the defaults for these two configuration entries:

  opcache.jit=tracing
  opcache.jit_buffer_size=0

This effectively disables JIT not because jit=disable, but rather because the buffer size is set to 0.

This RFC proposes to change these defaults to:

  opcache.jit=disable
  opcache.jit_buffer_size=64m

The chosen JIT buffer size default is 64 mb, a reasonable default, given that any smaller multiple of 2 causes the buffer to fill up when running moderately sized projects like Psalm or PHPStan.

Another possible option for the default is 128 mb, which is incidentally also the maximum allowed JIT buffer size on the aarch64 architecture.

Backward Incompatible Changes

This RFC does not change the default behavior, JIT was and still is disabled by default, however now it is now disabled by default using the opcache.jit setting, not the opcache.jit_buffer_size setting.

This may affect users who enabled JIT by only setting a different opcache.jit_buffer_size, without specifying a JIT mode with opcache.jit.

To enable JIT, users will also be required to populate the opcache.jit config value.

Proposed PHP Version(s)

Next PHP 8.4.

RFC Impact

To SAPIs

See Backwards Incompatible Changes section.

Proposed Voting Choices

2/3 required to accept. Voting started on 2023-12-03 and will end on 2023-12-18 00:00 GMT.

Vote: Change how JIT is disabled by default? — Yes: 17 · No: 0 (closed)

Patches and Tests

Pull request: https://github.com/php/php-src/pull/12678

References

Reference internals discussion: https://externals.io/message/121359