在WampServer上使用APC不会提高性能 [英] No performance gain with APC on WampServer

查看:109
本文介绍了在WampServer上使用APC不会提高性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows工作站上工作,我在该工作站上使用 WampServer 作为我的开发平台,编写可在Linux上运行的PHP应用程序.

I'm working on a Windows workstation, on which I use WampServer as my development platform, to write PHP applications which are then run on Linux.

我很习惯在Linux上 APC 对我来说是必须的.但是,当我在Windows上使用它时,没有性能提升总是让我感到惊讶.

I'm pretty used to APC on Linux, which is blazing fast and a must have for me. However, I'm always surprised to get no performance gain when I use it on Windows.

例如,在严重依赖Zend Framework的应用程序上,这导致生成时间接近每页1秒.这大部分时间都花在解析PHP文件上(我通过基准测试include()进行了验证).相同的应用程序在MacOS上的Linux上运行速度可以提高10倍.

This leads to generation times close to 1 second per page, on applications relying heavily on the Zend Framework for example. Most of this time is spent parsing PHP files (I verified that by benchmarking include()s). The very same application can run 10x faster on Linux on MacOS.

扩展名已正确加载:

> var_export(extension_loaded('apc'));
true

这是我的配置:

[APC] 
apc.enabled = 1 
apc.cache_by_default = 1 
apc.enable_cli = 0 
apc.shm_segments = 1 
apc.shm_size = 64M
apc.max_file_size = 1M 
apc.stat=1 

有人有类似的经历并且有一些技巧要分享吗?

Did anyone have a similar experience and has a few tips to share?

编辑:更多信息:我将apc.php文件从APC源归档复制到了Web目录中.在那里,我可以看到APC缓存正在运行,报告了90%的命中与未命中.尽管如此,速度并没有增加.在不使用APC的情况下,使用包含框架中的几十个文件需要花费半秒钟的时间.在Linux上的等效机器上,速度要快10倍.

Edit: more information: I copied the apc.php file from the APC source archive to my web directory. There, I can see that the APC cache is at work, reporting more than 90% hits vs misses. Still, the speed does not increase though. It takes half a second to include a few dozen files from the framework, with or without APC. And on an equivalent machine on Linux, it's 10x faster.

推荐答案

到目前为止,我还没有找到解决此问题的方法,所以我最终尝试了

I haven't found a solution to this problem so far, so I ended up trying Zend Server CE, and I can now notice the expected performance improvement when APC is enabled.

这不是解决问题的方法,而是一种解决方法,但是使用一个月后,我对开发机器上的Zend Server感到非常满意.

Not really a solution to my question, rather a workaround, but after one month of use, I'm pretty happy with Zend Server on my development machine.

这篇关于在WampServer上使用APC不会提高性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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