Ver Fonte

Less children (#4368)

Try to solve the update bench with php 7.3 and check performance too
Joan Miquel há 6 anos atrás
pai
commit
1ac5a717c3

+ 1 - 1
frameworks/PHP/kumbiaphp/deploy/conf/php-fpm.conf

@@ -238,7 +238,7 @@ pm = static
 ; forget to tweak pm.* to fit your needs.
 ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
 ; Note: This value is mandatory.
-pm.max_children = 1024
+pm.max_children = 512
 
 ; The number of child processes created on startup.
 ; Note: Used only when pm is set to 'dynamic'

+ 1 - 1
frameworks/PHP/kumbiaphp/deploy/nginx.conf

@@ -39,7 +39,7 @@ http {
 
     upstream fastcgi_backend {
         server unix:/var/run/php/php7.3-fpm.sock;
-        keepalive 40;
+        keepalive 20;
     }
 
     server {

+ 1 - 1
frameworks/PHP/kumbiaphp/kumbiaphp-raw.dockerfile

@@ -14,7 +14,7 @@ WORKDIR /kumbiaphp
 
 RUN git clone -b v1.0.0-rc.2 --single-branch --depth 1 -q https://github.com/KumbiaPHP/KumbiaPHP.git vendor/Kumbia
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+#RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
 
 CMD service php7.3-fpm start && \
     nginx -c /kumbiaphp/deploy/nginx.conf -g "daemon off;"

+ 1 - 1
frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile

@@ -15,7 +15,7 @@ WORKDIR /kumbiaphp
 RUN git clone -b v1.0.0-rc.2 --single-branch --depth 1 https://github.com/KumbiaPHP/KumbiaPHP.git vendor/Kumbia
 RUN git clone -b v0.4.0 --single-branch --depth 1 https://github.com/KumbiaPHP/ActiveRecord.git vendor/Kumbia/ActiveRecord
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+#RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
 
 CMD service php7.3-fpm start && \
     nginx -c /kumbiaphp/deploy/nginx.conf -g "daemon off;"

+ 1 - 1
frameworks/PHP/php/deploy/conf/php-fpm.conf

@@ -238,7 +238,7 @@ pm = static
 ; forget to tweak pm.* to fit your needs.
 ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
 ; Note: This value is mandatory.
-pm.max_children = 1024
+pm.max_children = 512
 
 ; The number of child processes created on startup.
 ; Note: Used only when pm is set to 'dynamic'

+ 1 - 1
frameworks/PHP/php/deploy/nginx5.conf

@@ -40,7 +40,7 @@ http {
 
     upstream fastcgi_backend {
         server unix:/var/run/php/php5.6-fpm.sock;
-        keepalive 50;
+        keepalive 20;
     }
 
     server {

+ 1 - 1
frameworks/PHP/php/deploy/nginx7.conf

@@ -40,7 +40,7 @@ http {
 
     upstream fastcgi_backend {
         server unix:/var/run/php/php7.3-fpm.sock;
-        keepalive 50;
+        keepalive 20;
     }
 
     server {

+ 1 - 1
frameworks/PHP/php/php-pgsql-raw.dockerfile

@@ -16,7 +16,7 @@ RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" dbraw.php
 RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" fortune.php
 RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" updateraw.php
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+#RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
 
 RUN chmod -R 777 /php
 

+ 1 - 1
frameworks/PHP/php/php-php5-raw.dockerfile

@@ -13,7 +13,7 @@ RUN sed -i "s|listen = /run/php/php7.3-fpm.sock|listen = /run/php/php5.6-fpm.soc
 ADD ./ /php
 WORKDIR /php
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/5.6/fpm/php-fpm.conf ; fi;
+#RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/5.6/fpm/php-fpm.conf ; fi;
 
 RUN chmod -R 777 /php
 

+ 1 - 1
frameworks/PHP/php/php-php5.dockerfile

@@ -15,7 +15,7 @@ RUN sed -i "s|listen = /run/php/php7.3-fpm.sock|listen = /run/php/php5.6-fpm.soc
 ADD ./ /php
 WORKDIR /php
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/5.6/fpm/php-fpm.conf ; fi;
+#RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/5.6/fpm/php-fpm.conf ; fi;
 
 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 

+ 1 - 1
frameworks/PHP/php/php-raw7-tcp.dockerfile

@@ -15,7 +15,7 @@ WORKDIR /php
 RUN sed -i "s|listen = /run/php/php7.3-fpm.sock|listen = 127.0.0.1:9001|g" /etc/php/7.3/fpm/php-fpm.conf
 RUN sed -i "s|server unix:/var/run/php/php7.3-fpm.sock;|server 127.0.0.1:9001;|g" deploy/nginx7.conf
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+#RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
 
 RUN chmod -R 777 /php
 

+ 1 - 1
frameworks/PHP/php/php-raw7.dockerfile

@@ -12,7 +12,7 @@ COPY deploy/conf/* /etc/php/7.3/fpm/
 ADD ./ /php
 WORKDIR /php
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+#RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
 
 RUN chmod -R 777 /php
 

+ 1 - 1
frameworks/PHP/php/php.dockerfile

@@ -14,7 +14,7 @@ COPY deploy/conf/* /etc/php/7.3/fpm/
 ADD ./ /php
 WORKDIR /php
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+#RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
 
 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet