]> source.dussan.org Git - nextcloud-server.git/commitdiff
do not display the buffer_size info if the size is already set to a certain threshold 32968/head
authorszaimen <szaimen@e.mail.de>
Thu, 16 Jun 2022 15:53:23 +0000 (17:53 +0200)
committerszaimen <szaimen@e.mail.de>
Tue, 21 Jun 2022 17:08:51 +0000 (19:08 +0200)
Signed-off-by: szaimen <szaimen@e.mail.de>
Co-Authored-By: MichaIng <micha@dietpi.com>
apps/settings/lib/Controller/CheckSetupController.php

index b9f176f97c5d9bce8db4505eaed4734ed8f0c8f7..f52c10cf58005b6c51a4dd266b999ac1560c2c5f 100644 (file)
@@ -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')]);
                        }