Giter VIP home page Giter VIP logo

Comments (4)

jessuppi avatar jessuppi commented on June 11, 2024

Thanks @NathanAdhitya

opcache.enable=1 ;; ss = 1
opcache.enable_cli=1 ;; ss = 1

These are both hardcode enabled in SlickStack by default in the php.ini

https://github.com/littlebizzy/slickstack/blob/master/modules/php-fpm/8.1/php-ini.txt

However I'm not sure where this opcache.jit_buffer_size=256M option comes from because I didn't see it in the default php.ini files on the Ubuntu 22.04 boxes that I reviewed during 2022, so that's strange.

They also mention opcode.jit flags but not sure what that key/value is...

...okay actually, I just found this: https://php.watch/versions/8.4/opcache-jit-ini-default-changes

Prior to PHP 8.4, the default INI configuration values for PHP were:

opcache.jit=tracing
opcache.jit_buffer_size=0

So perhaps these options are "hidden" in PHP 8.1 which is what SlickStack currently uses (the Ubuntu 22.04 default). He goes on to say the following:

In PHP 8.4, the default values for the two configuration options are changed as follows. JIT continues to be disabled by default in PHP 8.4. The only difference is that the default values for INI values have changed.

opcache.jit=disable
opcache.jit_buffer_size=64M

Note that even with the default value changes, JIT is disabled by default.

from slickstack.

jessuppi avatar jessuppi commented on June 11, 2024

Unless I made a mistake and forgot to includes those entries in our php.ini boilerplate for PHP 8.1, I think probably at this point we should wait until PHP 8.3 (Ubuntu 24.04) before we add those options to SlickStack.

Ref: https://medium.com/@edouard.courty/make-your-php-8-apps-twice-as-fast-opcache-jit-8d3542276595
Ref: https://stitcher.io/blog/php-8-jit-setup
Ref: https://stackoverflow.com/questions/75609964/choosing-the-best-opcache-jit-buffer-size-value-in-php8-jit

Looks very exciting though...

from slickstack.

jessuppi avatar jessuppi commented on June 11, 2024

https://slickstack.io/forum/topic/how-to-enable-php-opcache-jit-cuz-opcache-jit-is-missing-in-php-ini

from slickstack.

jessuppi avatar jessuppi commented on June 11, 2024

A bit messy, I guess we needed a new boilerplate for /etc/php/8.3/mods-available/opcache.ini

New: https://github.com/littlebizzy/slickstack/blob/master/modules/php-fpm/8.3/opcache-ini.txt

Hopefully we can combine more of the opcache settings from php.ini into opcache.ini to keep it cleaner, but need to make sure it causes no issues first.

For now, JIT should be supported with 2 new options in ss-config below:

OPCACHE_JIT_CRTO="1255"
OPCACHE_JIT_BUFFER_SIZE=""

As seen above, the buffer size is blank by default (the same as PHP core) which effectively disables JIT. To enable it simply choose a buffer size like 64M or 100M or larger if your server has a lot of RAM...

Testing and feedback desired, will close this for now, thanks!

from slickstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.