Assistance Required Enabling JIT on PHP 8.3

Hello,

I’m currently running PHP version 8.3 and have been attempting to enable the JIT (Just-In-Time) compilation feature. Despite configuring both the FPM and CLI php.ini files with the recommended settings, JIT remains disabled according to my phpinfo() output. My configuration is as follows:

opcache.enable=1
opcache.enable_cli=1
opcache.jit_buffer_size=1024M
opcache.jit=tracing

I have attached a screenshot from my phpinfo() output for your reference. Despite restarting the server, experimenting with different memory settings, and spending considerable time adjusting server configurations, JIT remains inactive. This situation is becoming increasingly frustrating, especially considering my efforts to resolve it through documentation and community advice, with no success.

Could you please provide guidance or assistance on how to enable JIT correctly on my setup? Any insights or additional steps I might be missing would be greatly appreciated.

Thank you for your time and assistance.

Best regards,

chris

Could you please provide guidance or assistance on how to enable JIT correctly on my setup? Any insights or additional steps I might be missing would be greatly appreciated.

I’m approaching a sensitive subject with this request? Just seeking assistance since I’m a customer.

Hello @webify,

Apologies for the late response! I tried enabling on one of my servers and this is pretty frustrating considering the instructions that are out there.

I did find a solution though…

Here are my steps:

  1. Update the php.ini file in the Server > Services section, click on ellipsis for PHP 8.3 and edit the php.ini file; uncommented the relevant opcache lines and added the buffer size line
  2. Found the opcache.ini config file, which is at /etc/php/8.3/mods-available/opcache.ini - have to SSH into server to do this
  3. Edit the file to turn jit on; opcache.jit=on
  4. Back in the server > services section, restart NGINX and PHP
  5. Back in command terminal, enter php -i and now I can see JIT is on

There were hardly any instructions I saw that referenced needing to update the opcache.ini file.

I hope that helps! Please let me know if it doesn’t but I think I captured all of the steps.

Hi amiedema,

Thanks a ton for diving into this and lending a hand. Really value the guidance.

This dev stuff can indeed test one’s patience, huh? Poured about 3 hours into trying to figure this out with no luck.
Yet, following your instructions, it clicked into place in no time.

Big thanks for the clear steps, your time, and effort.

Have a great day and keep doing awesome work.

Best,
chris

1 Like

I noticed that setting too and you’re right all the information online doesn’t mention this setting.

@webify Do you got a performance boost after enabling JIT?

@finalwebsites a tiny bit faster.
The graphic shows the improvement pretty nice. (Not mine from somewhere on the internets)
The main thing is OPCache …

1 Like

My question was about your experience with JIT and you server/Cleavr.
I know the data from the different review articles :wink: