rfc:jit_config_defaults

This is an old revision of the document!


PHP RFC: Change how JIT is disabled by default

  • Date: 2023-15-11
  • Author: Daniil Gentili daniil@daniil.it
  • Status: Under Discussion

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.

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

Change how JIT is disabled by default?
Real name Yes No
ashnazg (ashnazg)  
brzuchal (brzuchal)  
crell (crell)  
derick (derick)  
devnexen (devnexen)  
galvao (galvao)  
geekcom (geekcom)  
kguest (kguest)  
kocsismate (kocsismate)  
levim (levim)  
mauricio (mauricio)  
nicolasgrekas (nicolasgrekas)  
ocramius (ocramius)  
sebastian (sebastian)  
sergey (sergey)  
stas (stas)  
weierophinney (weierophinney)  
Final result: 17 0
This poll has been closed.

Patches and Tests

Pull request:

References

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

rfc/jit_config_defaults.1700066855.txt.gz · Last modified: 2023/11/15 16:47 by danog