3

I've been looking for some guidelines regarding the optimal value of opcache.jit_buffer_size. The proposed values are up to 256M (e.g. https://php.watch/versions/8.0/JIT#jit-opcache.jit_buffer_size) or even 500M (https://medium.com/@edouard.courty/make-your-php-8-apps-twice-as-fast-opcache-jit-8d3542276595). But it seems (to me) they're simply chosen just arbitrarily.

However, I couldn't find much explanation of how this value should be selected. The article "JIT in depth" (https://php.watch/articles/jit-in-depth#jit-ideal) gives a few clues.

The RFC https://wiki.php.net/rfc/jit does not help, either.

I suppose the answer is: Do some benchmarks in your environment and pick up the best buffer size.

Does anyone have some thoughts on this topic? Or maybe knows a good reference?

jacek.ciach
  • 904
  • 11
  • 20
  • ...do you have an actual reason to want to change this value? – Dai Mar 01 '23 at 23:22
  • 1
    @dai The default value of `opcache.jit_buffer_size` is 0. In order to enable JIT, the buffer size must be > 0. So I'd like to know how I should select the appropriate non-zero value. – jacek.ciach Mar 01 '23 at 23:30
  • 1
    Ah, okay - I assumed there would be a sensible-default, weird. – Dai Mar 01 '23 at 23:54

0 Answers0