sysstat.x86_64Perform:$sar-P All 1 100Note:-P all means monitoring all cores;1 indicates the acquisition every 1 seconds;100 means acquisition 100 times;5. Turn on slow logSlowlog = log/$pool. Log.slowRequest_slowlog_timeout = 2Note:The above is to open php-fpm slow log, Time threshold value of 2 seconds;Perform:Grep-v "^$" Php.slow.log | Cut-d ""-F 3,2 | Sort |uniq-c | SORT-K1,1NR | Head-n 50Note:Sort: So
. Log.slow parameter.; The log file for slow requests; Default Value:not set; Note:slowlog is mandatory if request_slowlog_timeout is set; Slowlog = log/$pool. Log.slowPHP-FPM Slow Log example, the slow log will record the process number, the script name, which file which line of code which function execution time is too long.[27-may-2016 13:20:37] Notice:child 16683 stopped for tracing[27-may-2016 13:20:37] notice:about to trace 16683[27-may-2016 13:
timeout; b read timeout; c write timeout);2.2. Parallelization of the serial request;A) use of curl_multi_* ();b) Use the swoole extension.
3. compress the PHP interface output:Using gzip compressionBenefits: Facilitates faster reception of data by client side;Cons: Extra CPU overhead
4. Cache Duplicate content: multiple requests, the content is not changed under the circumstances;
5.smarty Tuning and time
I heard that nginx has better concurrent performance than apache, and I want to test it. I have installed nginx and php-fpm and tested it with AB. The results show that nginx has better performance than apache in requesting static files. However, if you access the PHP file,
Tuning of PHP-FPM parameters under large concurrent high loadMainly for PHP parameter tuning under LinuxAdjust file descriptor limits# ulimit-n 1000000# vi/etc/security/limits.conf# Setting Shell Limits for File descriptors* Soft Nofile 1000000* Hard Nofile 1000000Prevents f
This article describes the PHP performance analysis of php-fpm slow execution log slow logs usage. Share to everyone for your reference, specific as follows:
As we all know, MySQL has slow query log, and we can tell that those SQL statements have performance problems based
start since:375# Run-time accepted Conn:7# The number of requests accepted by the current process pool Listen queue:0# Request Wait queue, if not for0, which means that the FPM process is insufficient and requires the addition of the Max Listen queue:0# Maximum number of wait queues listen queue len:1024x768# SOCKET Waiting Queue Length idle processes:4# Idle Process number Active processes:1# Active Processes Total Processes:5# total number of proce
LNMP use socket to connect Nginx optimize PHP-FPM performance
There are 2 ways to connect fastcgi nginx: TCP and UNIX domain sockets
What is a UNIX domain socket. --Wikipedia
A Unix domain socket or an IPC socket is a terminal that enables data communication between two or more processes on the same operating system. Compared to pipelines, Unix domain soc
Php Performance Analysis-Usage Analysis of php-fpm slow execution log slow log, php-fpmslow
This article describes the usage of php-fpm slow execution log slow log in
template is added in the same way as above, not in the following.8.3 Select the corresponding template on the appropriate host or group associationTo associate a template with a host or groupNine, the actual monitoring effect displayViewing the monitoring effect can be viewed monitoring-->latest data, filtering out the corresponding host and application name for viewing, the latest collection of the item's monitoring results, any monitoring to the data item will display the data, there is a gra
Php-fpm.conf has two critical parameters: one is "Max_children" and the other is "request_terminate_timeout".
The value of my two settings is "40″, one is" 900″, but this value is not universal, but it needs to be calculated by itself.
The method of calculation is as follows:
If your server performance is good enough and your broadband resources are sufficient, PHP
This article describes how to configure and pay attention to performance optimization through php-fpm. if you need it, refer to the following introduction:
PHP-FPM is a PHP FastCGI manager, the general Nginx above the run
This article introduces to you through the PHP-FPM implementation of performance optimization configuration method and considerations, the need for small partners can refer to the following
Brief introduction:
PHP-FPM is a PHP Fa
also the loopback address.In addition, in nginx's default configuration, the matching rules for the PHP file in the uri request are still old. Previously, security problems caused by NGINX and PHP configuration occurred, although it is not an error of nginx, nginx can also provide more rigorous examples, but it still does not.
Fortunately, in UBUNTU 12.4, nginx's default configuration has been greatly impr
1. the larger the worker_processes, the better (the higher the performance after a certain number is not obvious) 2. worker_cpu_affinity all CPUs share worker_processes, which is better than every worker_processes for cross-cpu allocation. php execution is not considered. The test result shows that the number of worker_processes is twice the number of cpu cores, and the
As we all know, mysql has slowquerylog. based on slow query logs, we can know that SQL statements have performance problems. As a good partner of mysql, php also has this function. If you use php-fpm to manage php, you can enable it using the following options:
As we all kno
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.