🤖 Gemini Issue Analysis
Hello @jakobmelti,
Thank you for reaching out. As a LEMP stack automation specialist, I'm happy to help you with enabling Opcache JIT. You've correctly identified the configuration section, and your question about which lines to uncomment is a good one.
You do not need to uncomment everything. For a standard setup, you only need to enable two specific directives.
Summary of Solution
To enable Opcache JIT, you need to uncomment and configure opcache.jit and opcache.jit_buffer_size in your PHP configuration file. The other settings are for advanced tuning or debugging and can be left as they are.
Step-by-Step Instructions
Here is a detailed guide to get JIT up and running correctly.
1. Locate and Edit the Opcache Configuration File
The Opcache settings are usually in a dedicated .ini file. Based on the EngineScript environment, it's likely located here:
/etc/php/[YOUR_PHP_VERSION]/fpm/conf.d/99-opcache.ini
- Replace
[YOUR_PHP_VERSION] with the version you are using (e.g., 8.4).
- Open the file for editing with root privileges:
sudo nano /etc/php/8.4/fpm/conf.d/99-opcache.ini
2. Modify the JIT Directives
Find the section you posted in your issue. You only need to change the following two lines:
opcache.jit: This directive enables the JIT compiler. The tracing value is highly recommended as it provides a good balance between performance and compilation overhead for web applications.
opcache.jit_buffer_size: This allocates a specific amount of memory for the compiled code. JIT will not run without this. The SEDOPCACHEJITBUFFER is a placeholder used by the automation script. You should replace it with a real value. A good starting point for a typical website is 128M.
Uncomment these two lines and set the buffer size. Your configuration should look like this:
; A note on OpCache JIT WordPress Performance:
; For typical web applications with I/O-bound workloads (e.g., database queries or API calls), the performance gains from JIT may be minimal.
; JIT is more beneficial for CPU-bound workloads (e.g., heavy computations, number crunching).
; It is recommended to benchmark your specific application with and without JIT enabled to determine its impact.
opcache.jit=tracing
opcache.jit_buffer_size=128M
;opcache.lockfile_path=/tmp
;opcache.log_verbosity_level=1
;... (the rest can remain commented out)
3. Restart PHP-FPM to Apply Changes
After saving the file, you must restart the PHP-FPM service for the new configuration to be loaded.
sudo systemctl restart php8.4-fpm
(Remember to use your specific PHP version in the command.)
4. Verify JIT is Active
You can confirm that JIT is enabled in two ways:
-
Using phpinfo(): Create a file named info.php in your website's root directory with the content <?php phpinfo(); ?>. When you access this file in your browser, scroll down to the opcache section. You should see that JIT is On.
(Remember to delete this file after you're done for security reasons.)
-
Using the command line:
php -i | grep "opcache.jit"
The output should show opcache.jit => tracing => tracing and opcache.jit_buffer_size => 134217728 (which is 128M in bytes).
As the comments in your configuration file correctly state, it's wise to benchmark your application's performance before and after this change to measure the actual impact. Good luck
Analysis performed by Gemini AI on Fri Nov 14 22:44:37 UTC 2025