具有相同PHP网站的不同服务器上的不同内存使用情况 [英] Different memory usage on different server with the same PHP website

查看:45
本文介绍了具有相同PHP网站的不同服务器上的不同内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Zend Framework 1.11构建的PHP网站.而且我在以下两个服务器上使用了不同的内存:

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

A: MacOS + Apache/2.2.20 + PHP 5.3.6

B:科学版Linux 64 + Apache/2.2.15 + PHP 5.3.3

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

对于完全相同的页面和条件,服务器A上的成本为14MB,而服务器B上的成本仅为4MB(由xdebug计算).

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

这是主要的区别步骤:

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?

推荐答案

可能的原因是:

不同的PHP版本 可以使用更多或更少的内存,尽管在这种情况下,考虑到两个版本之间的细微差别,这不太可能.

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

更有可能的是,使用率更高的系统在php配置中启用了更多mod.

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

这篇关于具有相同PHP网站的不同服务器上的不同内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆