Hello,
I would like to submit an RFC and PR to change a few INI defaults for
opcache, changing how JIT is disabled by default.
Currently, JIT is disabled by default using the
|opcache.jit_buffer_size=0| default, instead of |opcache.jit=0|.
I.e. here are the defaults for these two configuration entries:
- opcache.jit=tracing
- opcache.jit_buffer_size=0
This effectively disables JIT not because jit=0
, but rather because
the buffer size is set to 0.
I would like to change these defaults to:
- opcache.jit=off
- opcache.jit_buffer_size=64m (taken from
https://github.com/php/php-src/pull/12425/files, any smaller multiple of
2 causes the buffer to fill up when running moderately sized projects
like Psalm or PHPStan).
What do you think?
Kind regards,
Daniil Gentili.
Hello Daniil,
I like this proposition. I never understood why the JIT is disabled by the
ini setting buffer_size
rather than other simple 'switch' like setting.
Kind regards,
Jorg
Am 17.10.2023 um 19:46 schrieb Daniil Gentili daniil@daniil.it:
I would like to submit an RFC and PR to change a few INI defaults for opcache, changing how JIT is disabled by default.
Currently, JIT is disabled by default using the |opcache.jit_buffer_size=0| default, instead of |opcache.jit=0|.
I would like to change these defaults to:
- opcache.jit=off
- opcache.jit_buffer_size=64m (taken from https://github.com/php/php-src/pull/12425/files, any smaller multiple of 2 causes the buffer to fill up when running moderately sized projects like Psalm or PHPStan).
I understand your point but it might unexpectedly switch behavior for people just setting jit_buffer_size and expecting this to turn JIT on.
While (in the light of a new upcoming JIT) this might not be a big deal it is also not clear if it is worth it.
Maybe the settings can be overhauled once the new JIT is introduced (which might have different settings anyway).
Regards,
- Chris
Hi,
This is precisely why I'm planning to submit the RFC to make the change
in PHP 8.4, which is when the new JIT will be introduced.
Regards,
Daniil.
Am 17.10.2023 um 19:46 schrieb Daniil Gentili daniil@daniil.it:
I would like to submit an RFC and PR to change a few INI defaults for opcache, changing how JIT is disabled by default.
Currently, JIT is disabled by default using the |opcache.jit_buffer_size=0| default, instead of |opcache.jit=0|.
I would like to change these defaults to:
- opcache.jit=off
- opcache.jit_buffer_size=64m (taken from https://github.com/php/php-src/pull/12425/files, any smaller multiple of 2 causes the buffer to fill up when running moderately sized projects like Psalm or PHPStan).
I understand your point but it might unexpectedly switch behavior for people just setting jit_buffer_size and expecting this to turn JIT on.
While (in the light of a new upcoming JIT) this might not be a big deal it is also not clear if it is worth it.
Maybe the settings can be overhauled once the new JIT is introduced (which might have different settings anyway).Regards,
- Chris
Am 18.10.2023 um 10:42 schrieb Daniil Gentili daniil@daniil.it:
This is precisely why I'm planning to submit the RFC to make the change in PHP 8.4, which is when the new JIT will be introduced.
Ah, I missed that part, my bad. I'd suggest mentioning this in the RFC.
I also went back Dmitry's RFC and saw that no change on default ini settings is planned from his side.
Regards,
- Chris
Hello,
I would like to submit an RFC and PR to change a few INI defaults for
opcache, changing how JIT is disabled by default.Currently, JIT is disabled by default using the
|opcache.jit_buffer_size=0| default, instead of |opcache.jit=0|.I.e. here are the defaults for these two configuration entries:
- opcache.jit=tracing
- opcache.jit_buffer_size=0
This effectively disables JIT not because
jit=0
, but rather because
the buffer size is set to 0.I would like to change these defaults to:
- opcache.jit=off
- opcache.jit_buffer_size=64m (taken from
https://github.com/php/php-src/pull/12425/files, any smaller multiple of
2 causes the buffer to fill up when running moderately sized projects
like Psalm or PHPStan).What do you think?
Actually, now opcache.jit=0/off/no/false doesn't disable JIT completely. It
makes PHP start requests with JIT disabled, but this may be changed during
the request.
JIT may be disabled completely by opcache.jit=disable
Thanks. Dmitry.
Kind regards,
Daniil Gentili.
Hi all, I've created the actual RFC:
https://wiki.php.net/rfc/jit_config_defaults
Regards,
Daniil Gentili.
Hi all, I've created the actual RFC:
https://wiki.php.net/rfc/jit_config_defaultsRegards,
Daniil Gentili.
Seems like an obvious usability win to me. +1
--Larry Garfield