dongme8388 2014-07-15 13:55
浏览 77
已采纳

PHP APC配置,并检查性能

I am having a little issue on checking APC in my VPS host, which is a CentOs 6.5 on a 32bit system, running php-fpm, Nginx and Mysql. To optimize memory, I installed php-apc and configured it according to to this tutorial

Basically, I only changed the things that made the least sense (As this was my first time using caching, and optimization ever, so I left the rest)

So, these are the configurations I changed in /etc/php.d/apc.ini.

extension = apc.so
apc.enabled=1
apc.shm_size=128M
apc.ttl=3600
apc.user_ttl=7200
apc.gc_ttl=3600
apc.max_file_size=1M
apc.stat=1

Now, after starting php, I wanted to know if all is working, and that caching is activated and working, but I am not sure how this is done.

I checked the phpinfo()'s output, and I can see that apc is loaded but other than that, I don't know how to check if it is working at all. According to the php manual I am able to understand apc.enabled = 1 means, apc is working ??

Is there a command or some output to even debug or check on performance of apc ?

  • 写回答

1条回答 默认 最新

  • douba8819 2014-07-30 16:49
    关注

    apc_cache_info will give you output detailing how the cache is currently configured, hit/miss statistics, and also list the contents of the cache.

    There is also a useful information page provided with the APC PECL package. You can find this on your system by issuing

    locate apc.php
    

    in your unix shell (eg bash). You may need to copy the resulting file to a location in your webserver's root, so you can get to it with a browser.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行