PHP 8 introduces two JIT compilation engines. Tracing JIT, the most promising of the two, shows about 3 times better performance on synthetic benchmarks and 1.5–2 times improvement on some specific long-running applications. Typical application performance is on par with PHP 7.4. You see, that Wordpress which can be compared to XenForo in its application structure - only shows 5% performance gains using the "Tracing JIT". In PHP 8.4 there are further improvements for JIT planned.
1 Check if JIT is already enabled
Bash:
#php -i | grep -q 'opcache.jit_buffer_size => [^0]' && echo "JIT is enabled" || echo "JIT is disabled"
2 Add to php.ini
You can find the location of your php.ini in admin.php?tools/phpinfo under "Loaded Configuration File"In this php.ini append this:
PHP:
opcache.jit=tracing
opcache.jit_buffer_size=64M
Now restart both PHP and nginx, in Ubuntu 24.04 it is
Bash:
#systemctl restart php8.3-fpm nginx