You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
opcache.interned_strings_buffer either has no effect or opcache_get_status() / phpinfo() is wrong #11715
I just tried this and got a different, but equally weird result.
I got 193752 used, 12388696 free. Sum that up and you get 12582448, which is just under 12MiB, less than the 16 I set it at 🤔
i.e. to compute the end, instead of starting from the start of the struct, we start at the interned string table start. This makes more sense to me. And this yields the right result on my computer. But I'm not sure, I didn't look too deep into it yet as I'm out of time for today.
Well, sorry to add to the confusion, but I actually had it set to 256 before (which I then realised was much too high), but even with that it still was stuck on the 6mb from my screenshot..
I think I figured it out and will try to create a PR soon.
There's two issues I think: the end calculation is wrong, and the memory usage/free reporting is using the wrong values.
I think if I'm right, it makes sense you're seeing that 6MB behaviour.
Activity
ndossche commentedon Jul 16, 2023
I just tried this and got a different, but equally weird result.
I got 193752 used, 12388696 free. Sum that up and you get 12582448, which is just under 12MiB, less than the 16 I set it at 🤔
EDIT: I don't understand this code:
php-src/ext/opcache/ZendAccelerator.c
Lines 2904 to 2906 in cbd903d
I would've expected this instead:
i.e. to compute the end, instead of starting from the start of the struct, we start at the interned string table start. This makes more sense to me. And this yields the right result on my computer. But I'm not sure, I didn't look too deep into it yet as I'm out of time for today.
EDIT 2: Wait but then this line is also wrong:
php-src/ext/opcache/ZendAccelerator.c
Line 2864 in cbd903d
I'm confused
gndk commentedon Jul 17, 2023
Glad you could confirm!
Well, sorry to add to the confusion, but I actually had it set to
256before (which I then realised was much too high), but even with that it still was stuck on the 6mb from my screenshot..ndossche commentedon Jul 17, 2023
I think I figured it out and will try to create a PR soon.
There's two issues I think: the end calculation is wrong, and the memory usage/free reporting is using the wrong values.
I think if I'm right, it makes sense you're seeing that 6MB behaviour.
Fix phpGH-11715: opcache.interned_strings_buffer either has no effect…
Fix GH-11715: opcache.interned_strings_buffer either has no effect or…
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'