Replies: 1 comment 2 replies
-
没看明白你想问什么。。。 另外,这种情况至少要贴一下配置,和框架版本等信息 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
同样的硬件、软件(linux,nginx,php版本都相同),为什么启动后单个php进程内存会相差一倍还多。唯一不同就是图1空闲内存要更多。大家觉得会是什么原因

机器A
机器B

上面top命令对比,hyperf框架启动后,单个进程A机器比B机器内存(查看RES列)要多一倍。
硬件软件对比:


A机器
B机器


php -m 对比加载模块无差异。

php -i 对比看起来也是无差异。
phpinfo.A.txt 是A机器的php -i输出,phpinfo.B.txt 是B机器的php -i输出,
代码一样。我只初略使用du统计了大小,然后做了对比,但实际上它们发的就是同样的代码,没有采用更多对比手段。只是runtime目录大小不一样。

最后它们处理的请求是类似相同的,总共3台机器,落在上面的请求是平均分配的,其他2台机器,内存长期保持在100M以内,这个A机器hyperf进程启动时就达到了160M,运行第2天查看RES平均保持在220M。
Hyperf 版本:1.1
Beta Was this translation helpful? Give feedback.
All reactions