Different memory usage on different server with the same PHP website

南楼画角 提交于 2020-02-02 15:23:02

问题


I have a PHP website build with Zend Framework 1.11. And I got different memory usage on the following two servers:

A: MacOS + Apache/2.2.20 + PHP 5.3.6

B: Scientific Linux 64 + Apache/2.2.15 + PHP 5.3.3

For a exactly same page and condition, it cost 14MB on server A, but only 4MB on server B (calculate by xdebug).

here is the mainly difference step:

A:
11288560 Zend_Application->run( )
B:
2740744 Zend_Application->run( )

Can anyone tell me what's the problem? And is there any way I can analyse the memory's detail usage?


回答1:


Possible reasons for this are:

Different PHP versions can use more or less memory, although in this case it's unlikely given the subtle difference between the two versions.

More likely, it's that the system with higher usage has more mods enabled in the php config.



来源:https://stackoverflow.com/questions/8223205/different-memory-usage-on-different-server-with-the-same-php-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!