changeset 169:4efaba4fbe94 puppet-3.6

Expand PHP OpCache config in line with NextCloud recommendations
author IBBoard <dev@ibboard.co.uk>
date Fri, 01 Sep 2017 11:36:16 +0100
parents b13e0de66b54
children c1854fae7af1
files modules/website/files/opcache.ini modules/website/manifests/php.pp
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/website/files/opcache.ini	Fri Sep 01 11:36:16 2017 +0100
@@ -0,0 +1,10 @@
+zend_extension=/usr/lib64/php/modules/opcache.so
+
+//Recommended settings based on https://docs.nextcloud.com/server/12/go.php?to=admin-php-opcache
+opcache.enable=1
+opcache.enable_cli=1
+opcache.interned_strings_buffer=8
+opcache.max_accelerated_files=10000
+opcache.memory_consumption=128
+opcache.save_comments=1
+opcache.revalidate_freq=1
\ No newline at end of file
--- a/modules/website/manifests/php.pp	Fri Sep 01 11:29:55 2017 +0100
+++ b/modules/website/manifests/php.pp	Fri Sep 01 11:36:16 2017 +0100
@@ -42,8 +42,7 @@
     }
     file { '/etc/php.d/opcache.ini':
       ensure => present,
-      content => 'zend_extension=/usr/lib64/php/modules/opcache.so
-opcache.memory_consumption=64',
+      source => 'puppet:///modules/website/opcache.ini',
     }
   }
 }