PHP Accelerators : APC vs Zend vs XCache with Zend Framework

本文通过实验对比了APC、Zend Optimizer和XCache等PHP加速器在运行包含大量组件的Zend Framework应用程序时的表现。结果显示,在相同的测试环境下,APC提供了最高的请求处理能力。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

转自: http://blog.digitalstruct.com/2007/12/23/php-accelerators-apc-vs-zend-vs-xcache-with-zend-framework/

 

Tonight I wanted to see how the Zend Framework would run against an application that I have put in quite a bit of components into. I figured with the amount of objects that have been instanciated that there was likely going to be a larger performance hit overall. These results may surprise you with what really made a difference as far as PHP Accelerators.

Zend Framework : Release 1.0.3

  • Zend_Cache
  • Zend_Config
  • Zend_Config_Xml
  • Zend_Db
  • Zend_Db_Table
  • Zend_Registry
  • Zend_Loader
  • Zend_Controller_Front
  • Zend_Auth
  • Zend_Acl
  • Zend_Acl_Role
  • Zend_Acl_Resource
  • Zend_Session
  • Zend_Session_Namespace

Testing Environment

  • PHP 5.2.5
  • Apache 2.2.6

Test Results

Pure PHP

Concurrency Level:      10
Time taken for tests: 60.655071 seconds
Complete requests: 298
Failed requests: 0
Write errors: 0
Total transferred: 643149 bytes
HTML transferred: 516971 bytes
Requests per second: 4.91 [#/sec] (mean)
Time per request: 2035.405 [ms] (mean)
Time per request: 203.541 [ms] (mean, across all concurrent requests)
Transfer rate: 10.35 [Kbytes/sec] received

APC

Concurrency Level:      10
Time taken for tests: 60.106697 seconds
Complete requests: 914
Failed requests: 0
Write errors: 0
Total transferred: 1962675 bytes
HTML transferred: 1582035 bytes
Requests per second: 15.21 [#/sec] (mean)
Time per request: 657.623 [ms] (mean)
Time per request: 65.762 [ms] (mean, across all concurrent requests)
Transfer rate: 31.88 [Kbytes/sec] received

Zend Optimizer

Concurrency Level:      10
Time taken for tests: 60.302711 seconds
Complete requests: 262
Failed requests: 0
Write errors: 0
Total transferred: 564135 bytes
HTML transferred: 454727 bytes
Requests per second: 4.34 [#/sec] (mean)
Time per request: 2301.630 [ms] (mean)
Time per request: 230.163 [ms] (mean, across all concurrent requests)
Transfer rate: 9.12 [Kbytes/sec] received

XCache

Concurrency Level:      10
Time taken for tests: 60.261114 seconds
Complete requests: 292
Failed requests: 0
Write errors: 0
Total transferred: 628485 bytes
HTML transferred: 506597 bytes
Requests per second: 4.85 [#/sec] (mean)
Time per request: 2063.737 [ms] (mean)
Time per request: 206.374 [ms] (mean, across all concurrent requests)
Transfer rate: 10.17 [Kbytes/sec] received

Conclusions

What I find quite interesting about this, is that APC was the only one to provide a much higher amount of requests while all the others slowed the requests down. I believe this may be related to utilizing the Zend_Loader functionality which also slows some items down for anything attempting to optimize and cache. I believe after I change that I am going to run these tests again and see if there is any large speed changes. I will post more about this more than likely in a week or so.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值