Today, when I was doing the test, I suddenly got a card, and I looked at it with top.
PHP takes up more than 70% CPU, the following steps:
1. Strace-o output.txt-t-tt-e-c trace=all-p PID
Result: checked the following. has been executing the read, write operation SQL statement
2. ll/proc/25066/fd/
The result: It's all sockets, it doesn't feel right.
3. Strace-t-tt-c-P PID
When interrupted with Ctrl + C, the result is: Read, write occupies the most time,
Here I'm kinda sure it's a SQL problem, put a few PHP persistent queue processes off the CPU occupancy rate immediately down
In fact, it is still possible to view the next php-fpm slow_log slow log but I looked under our configuration actually turned off.
In summary, the most used above is the use of Strace, specific usage reference: http://www.cnblogs.com/ggjucheng/archive/2012/01/08/2316692.html
PHP takes up a few ideas of CPU high