Home  >  Article  >  Backend Development  >  请教CPU、负载过高的排查思路

请教CPU、负载过高的排查思路

WBOY
WBOYOriginal
2016-06-06 20:38:071837browse

最近php-fpm一直占满CPU,后来通过增加修改配置增加进程数问题得以暂时解决。
但是对于这种突发起来的“症状”无从下手,没有经验去排查问题的根源。
求教各位前辈,指点下思路!

回复内容:

最近php-fpm一直占满CPU,后来通过增加修改配置增加进程数问题得以暂时解决。
但是对于这种突发起来的“症状”无从下手,没有经验去排查问题的根源。
求教各位前辈,指点下思路!

在所有远程调用接口,耗时较长的操作 记录执行时间写log
分析耗时较长的请求

从程序下手吧 用下XDebug查下有没有关键代码占用时间特别高.

从以下几个方面入手:

分析系统瓶颈
分析内存瓶颈
分析IO瓶颈
分析进程调用
优化程序代码

看看这篇文章吧:
http://linuxtools-rst.readthedocs.org/zh_CN/latest/advance/03_optimization.html

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn