From 6d0d38ae5818e2687a5943bea6b9932a94b1d227 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 16 Jun 2022 17:53:23 +0200 Subject: [PATCH] do not display the buffer_size info if the size is already set to a certain threshold Signed-off-by: szaimen Co-Authored-By: MichaIng --- apps/settings/lib/Controller/CheckSetupController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index b9f176f97c5d9..f52c10cf58005 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -525,7 +525,11 @@ protected function getOpcacheSetupRecommendations(): array { 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 opcache.interned_strings_buffer to your PHP configuration with a value higher than %s.', [($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?: 'currently')]); }