performance problems, performance tuning is not only required by the O M Department, but also solved this performance problem by the department. It may occur in products, programs (*. php), business needs, or O M environments. However, most of the
value defined in ini will not be overwritten, but the new settings will be appended to the original value.
The value defined by php_admin_value or php_admin_flag cannot be overwritten by ini_set () in PHP code.
FAQ
Q: Can php-fpm be used with ZendOptimize?
A: Yes.
Q: Can php-fpm
What are CGI, FastCGI, PHP-CGI, PHP-FPM, and Spawn-FCGI? What is CGI?
CGI is a Common Gateway Interface. it is a tool for the HTTP server to "talk" with programs on your or other machines, the program must run on the network server.
CGI can be written in any language as long as it has standard input, output, and environment variables. Such as
? Fastcgi is used to improve CGI program performance.
To improve the performance, what is the problem with the CGI program performance? "The PHP parser parses the php. ini file and initializes the execution environment. The standard CGI performs these steps for each request!
configuration based on the situation, such as nobody and Apache.
Comparison between PHP-FPM and spawn-CGI
PHP-FPM is very convenient to use, configuration is in the PHP-FPM.ini file, and start, restart can be done from PHP/sbin
This article mainly introduces the nginx+php-fpm of the optimization skills, has a certain reference value, now share to everyone, the need for friends can refer to
Summary of NGINX+PHP-FPM optimization techniques
here is a piece of article found from the Internet, serious practice once again, there are a lot of
What are CGI, FastCGI, PHP-CGI, PHP-FPM, and Spawn-FCGI ?, Fastcgiphp-cgi
What is CGI?
CGI is a Common Gateway Interface. It is a tool for the HTTP server to "talk" with programs on your or other machines, the program must run on the network server.
CGI can be written in any language as long as it has standard input, output, and environment variables. Such as
CGI, FastCGI, PHP-CGI, PHP-FPM, and Spawn-FCGI modes
CGI is a Common Gateway Interface. it is a tool for the HTTP server to "talk" with programs on your or other machines, the program must run on the network server.
CGI can be written in any language as long as it has standard input, output, and environment variables. Such as
php_admin_flag cannot be overwritten by ini_set () in PHP code.
FAQ
Q: Can php-fpm be used with ZendOptimize?
A: Yes.
Q: Can php-fpm be used with ZendPlatform, xcache, eAccelerator, APC, and other optimizers?A: Yes. The php-
-G user group) to run, Ubuntu can be used under Www-data, other configurations, such as nobody, Apache, etc. php-fpm and spawn-cgi comparison test The PHP-FPM is very convenient to use, the configuration is in the Php-fpm.ini file, and the start, restart can be done from
Processes, the default value is 5 (for PHP only)-P, which specifies the PID file path of the generated process-U and-G FastCGI (-u user-G user group) to run, WWW-data can be used in Ubuntu. Other configurations, such as nobody and Apache, can be used as needed.
Comparison between PHP-FPM and spawn-CGI
PHP-
this system-level configuration file. Refer to this blog: Php-fpm TcpSocket vs UnixSocket)Sudo echo 'Net. core. somaxconn = 2048 '>/etc/sysctl. confSudo sysctl-pStep 5: Restart the nginx and php-fpm services (it is best to restart php-
user-G user group) to run, Ubuntu can be used under Www-data, other configurations, such as nobody, Apache, etc.PHP-FPM and spawn-cgi comparison testThe PHP-FPM is very convenient to use, the configuration is in the Php-fpm.ini file, and the start, restart can be done from the PHP
a Development Environment-QA project testing-Launch the O M Project-Monitoring for project monitoring-To develop a specific application, the Operation Department, product department, Development Department, O M department, QA (test), and monitoring department are required.Performance problems exist in the same project (business), not only the O M department needs performance optimization, but the Department solves this
several workers according to the configuration and so on, of course, the idle worker too much, will also stop some, this improves the performance, also saves the resources. This is FastCGI's management of the process.
What is that php-fpm? is a realization of the FASTCGI program, by the PHP official received.
generated by the fastcgi, which defaults to 5 (PHP only)-p Specifies the PID file path of the resulting processWhat identity is used by-u and-G fastcgi (-u user-G user group) to run, Ubuntu can be used under Www-data, other configurations, such as nobody, Apache, etc. PHP-FPM and spawn-cgi comparison testThe PHP-
, other configuration according to the situation, such as nobody, Apache, etc.11.PHP-FPM and spawn-cgi comparison test:The PHP-FPM is very convenient to use, the configuration is in the Php-fpm.ini file, and the start, restart can be done from the
135:child 29715, script '/local/www/stable/www/ Catalogue.php ' (pool default) executing too slow (5.018002 sec), logging
As you can see in the example, the script runs for more than 5 seconds and is likely due to a slow MySQL response (top backtrace).
FAQ
Can q:php-fpm be used with zendoptimize?A: It's perfectly possible.
Can q:php-fpm be used with optimizations such as Zendplatform, XCache, E
Code code as follows:
Fastcgi_param Script_filename/scripts$fastcgi_script_name;
I changed the path and changed it to the bottom.
Copy Code code as follows:
Fastcgi_param script_filename $document _root$fastcgi_script_name;
http://localhost/index.php
The version information of PHP can appear.You can also refer to the following configuration method
PHP-
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.