开发者

Will simply installing and enabling APC on PHP speed up my code?

I have been looking into caching and other solutions to speed up my server. One thing I have noticed is that APC seems to be mentioned again and again as a good solution. Of course, I understand there are tweaks we can implement using apc_store, apc_fetch etc...

What I am wondering is, if I install and enable APC on PHP on my server will it just start working its magic? (Perhaps I need to do apc_compile_file? )

Of course I can tweak settings, etc, but I think with 1gb of RAM and default settings it should start working 开发者_Go百科immediately!?!?


APC will speed up your code because it's not only key-value cache, it's opcode-cacher too.
1gb of RAM it's good, but APC has default size of cache = 32Mb. You can change this setting in your php.ini or apc.ini:

apc.shm_size = 128M

Choose size of cache by your requirements.
To see, how much of RAM is used, run apc.php - you can find this script in sources of APC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜