Commit d2a583a3 authored by Daniel's avatar Daniel

Update overlay/root/scripts/nc_tuning.sh

parent e8e699ef
......@@ -17,25 +17,24 @@ occ config:system:set opcache.revalidate_freq --value=1
# setup op cache
# https://docs.nextcloud.com/server/15/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
conf_update_enable ${file_php_conf} "opcache.enable" " = 1"
conf_update_enable ${file_php_conf} "opcache.enable_cli" " = 1"
conf_update_enable ${file_php_conf} "opcache.interned_strings_buffer" " = 8"
conf_update_enable ${file_php_conf} "opcache.max_accelerated_files" " = 10000"
conf_update_enable ${file_php_conf} "opcache.memory_consumption" " = 128"
conf_update_enable ${file_php_conf} "opcache.save_comments" " = 1"
conf_update_enable ${file_php_conf} "opcache.revalidate_freq" " = 1"
conf_update_enable ${file_php_conf} "opcache.enable.*=" "1"
conf_update_enable ${file_php_conf} "opcache.enable_cli.*=" "1"
conf_update_enable ${file_php_conf} "opcache.interned_strings_buffer.*=" "8"
conf_update_enable ${file_php_conf} "opcache.max_accelerated_files.*=" "10000"
conf_update_enable ${file_php_conf} "opcache.memory_consumption.*=" "128"
conf_update_enable ${file_php_conf} "opcache.save_comments.*=" "1"
conf_update_enable ${file_php_conf} "opcache.revalidate_freq.*=" "1"
echo "tuning: fpm"
# php-fpm
# https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#tune-php-fpm
file_php_fpm_d_www="${dir_php_fpm_d}/www.conf"
conf_update $file_php_fpm_d_www "pm =" "dynamic"
conf_update $file_php_fpm_d_www "pm.max_children =" 120
conf_update $file_php_fpm_d_www "pm.start_servers =" 12
conf_update $file_php_fpm_d_www "pm.min_spare_servers =" 6
conf_update $file_php_fpm_d_www "pm.max_spare_servers =" 18
conf_update $file_php_fpm_d_www "pm.*=" "dynamic"
conf_update $file_php_fpm_d_www "pm.max_children.*=" 120
conf_update $file_php_fpm_d_www "pm.start_servers.*=" 12
conf_update $file_php_fpm_d_www "pm.min_spare_servers.*=" 6
conf_update $file_php_fpm_d_www "pm.max_spare_servers.*=" 18
echo "tuning: big files"
......@@ -44,11 +43,11 @@ echo "tuning: big files"
# https://docs.nextcloud.com/server/15/admin_manual/configuration_files/big_file_upload_configuration.html#nginx
###
# change php.ini
conf_update_enable ${file_php_conf} "memory_limit =" " 8G"
conf_update_enable ${file_php_conf} "post_max_size =" " 8G"
conf_update_enable ${file_php_conf} "max_input_time =" " 3600"
conf_update_enable ${file_php_conf} "max_execution_time =" " 3600"
conf_update_enable ${file_php_conf} "output_buffering =" " 0"
conf_update_enable ${file_php_conf} "upload_tmp_dir =" " /var/big_temp_file/"
conf_update_enable ${file_php_conf} "memory_limit.*=" "8G"
conf_update_enable ${file_php_conf} "post_max_size.*=" "8G"
conf_update_enable ${file_php_conf} "max_input_time.*=" "3600"
conf_update_enable ${file_php_conf} "max_execution_time.*=" "3600"
conf_update_enable ${file_php_conf} "output_buffering.*=" "0"
conf_update_enable ${file_php_conf} "upload_tmp_dir.*=" "/var/big_temp_file/"
mkdir -p /var/big_temp_file
chown $WWW_USER /var/big_temp_file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment