阿里 centos,php7
strace分析php-fpm 发现每一步时间都偏长
框架不同,一个Yii一个Tp5,是框架问题么?
问题机器,cpu偏高,单个phpfpm进程达5%
11:03:44.762409 times({tms_utime=471134, tms_stime=33854, tms_cutime=0, tms_cstime=0}) = 712987044 <0.000036>
11:03:44.762504 read(3, "\1\1\0\1\0\10\0\0", 8) = 8 <0.000037>
11:03:44.762596 read(3, "\0\1\0\0\0\0\0\0", 8) = 8 <0.000035>
11:03:44.762685 read(3, "\1\4\0\1\5\0\0\0", 8) = 8 <0.000044>
11:03:44.764982 open("/data/www/myyiiproject/vendor/yiisoft/yii2/Yii.php", O_RDONLY) = 4 <0.000044>
11:03:44.765083 fstat(4, {st_mode=S_IFREG|0644, st_size=682, ...}) = 0 <0.000035>
11:03:44.765173 fstat(4, {st_mode=S_IFREG|0644, st_size=682, ...}) = 0 <0.000034>
11:03:44.765260 fstat(4, {st_mode=S_IFREG|0644, st_size=682, ...}) = 0 <0.000035>
11:03:44.765348 mmap(NULL, 682, PROT_READ, MAP_SHARED, 4, 0) = 0x7f9390298000 <0.000045>
11:03:44.765528 munmap(0x7f9390298000, 682) = 0 <0.000038>
正常机器,不到1%的cpu
22:59:33.460625 poll([{fd=4, events=POLLIN}], 1, 5000) = 1 ([{fd=4, revents=POLLIN}]) <0.000023>
22:59:33.460743 times({tms_utime=2048, tms_stime=723, tms_cutime=0, tms_cstime=0}) = 1071255298 <0.000019>
22:59:33.460794 read(4, "\1\1\0\1\0\10\0\0", 8) = 8 <0.000019>
22:59:33.460843 read(4, "\0\1\0\0\0\0\0\0", 8) = 8 <0.000018>
22:59:33.460890 read(4, "\1\4\0\1\3\350\0\0", 8) = 8 <0.000022>
22:59:33.462372 open("/data/www/mytpproject/thinkphp/start.php", O_RDONLY) = 5 <0.000029>
22:59:33.462438 fstat(5, {st_mode=S_IFREG|0644, st_size=745, ...}) = 0 <0.000018>
22:59:33.462490 fstat(5, {st_mode=S_IFREG|0644, st_size=745, ...}) = 0 <0.000018>
22:59:33.462538 fstat(5, {st_mode=S_IFREG|0644, st_size=745, ...}) = 0 <0.000017>
22:59:33.462598 mmap(NULL, 745, PROT_READ, MAP_SHARED, 5, 0) = 0x7f14035b7000 <0.000021>
22:59:33.462659 munmap(0x7f14035b7000, 745) = 0 <0.000020>
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。