Merge pull request #32902 from nextcloud/enh/noid/opcache-buffer-size-limit

do not display the buffer_size info if the size is already set to a c…
pull/32941/head
Simon L 2022-06-21 13:26:30 +07:00 committed by GitHub
commit fb4353b64c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

@ -525,7 +525,11 @@ Raw output
if (
empty($status['interned_strings_usage']['free_memory']) ||
($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9)
(
($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9) &&
// Do not recommend to raise the interned strings buffer size above a quarter of the total OPcache size
($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < $this->iniGetWrapper->getNumeric('opcache.memory_consumption') / 4)
)
) {
$recommendations[] = $this->l10n->t('The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply <code>opcache.interned_strings_buffer</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?: 'currently')]);
}