Questions about OPcache interned strings buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi guys,

I have two questions regarding the OPcache interned strings bugger, I
hope this mailing list is the right place to ask them, else feel free to
redirect me to a more fitting place.

1. What is the logic behind the assigned strings buffer size and the
actually usable size? When using powers of 2, it seems to be exactly 75%
of it being usable, but for values between powers of 2, the usable
buffer size seems to increase by exactly what was added to the setting,
so that the used percentage increases until the next power of 2 is
reached. So basically it is possible that an increase of the settings
value leads to a decrease of the actually usable strings buffer. I'm
just wondering about what the remaining <=25% are used for, whether
using a power of 2 is preferable, or the opposite to have a batter
ratio. To avoid confusion it may be reasonable to add the <=25% always
to the usage statistics output, so that setting and statistics match.
Also Asked on stackoverflow:
https://stackoverflow.com/questions/67853338/opcache-interned-strings-buffer-size-lower-than-opcache-interned-strings-buffer

2. I have a PHP8.1 instance where I can increase the interned strings
buffer size as much as I want, it is always nearly fully used based on
the statistics. Currently it's 256 MiB assigned, 100% used with 512 MiB
overall OPcache size ~90% used. This doesn't look reasonable, as the
interned strings buffer is also meant to reduce the actual OPcache usage
(? bundling strings), so it looks wrong that it is used with more MiB
than the remaining OPcache. Or is it somehow expected that every smaller
and larger fraction is a string is stored in the interned strings buffer
as long as it is available, so that it basically always fills up? If so,
how can one estimate a good size for ones individual instance?

Best regards,

Micha




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux