At noon, I configured monitoring on a kvm, but I obviously felt that the machine card couldn't stand it, So I simply checked it.
1. View server Nic traffic
Sar-nDEV210
We can see that the network card traffic is not very large, and the NIC problems are eliminated.
2. View CPU
Top
It can be seen that the CPU usage is not much, but many php-cgi processes are found.
3. view system memory
Free-m
I don't know. I was shocked. The system memory was used up and swap memory was used up. But what programs occupied the memory.
Ps-ef | grep php
View all processes in the current system and filter out php-related processes.
According to statistics, there are nearly 200 php-related processes. How can we reduce these processes?
The answer is yes. In the php-cgi configuration file, you can customize the number of php processes.
Vim/usr/local/php-5.2.17/etc/php-fpm.conf
Search for the max_children field and change the following number to the number of processes to be defined.
By default, there are 256 cards. I changed it to 10 cards.
Pkill php to end all php Processes
/Usr/local/php-5.2.17/sbin/php-fpm start php
View the process
Obviously reduced.
Finally, check the system memory.
When the problem is solved, the system obviously does not feel stuck.