The importance of tuning APC for sites with a high number of Drupal modules[转载]

As we observed before, configuring APC with low memory can be a drag on performance, causing high executing times.

We saw this recently for a client with a large web site on a dedicated server that approached 2bits.com for performance tuning.

They initially had eAccelerator running on Red Hat, but when their hosting provider upgraded the server, eAccelerator refused to run, because of an API change in compatibility and they missed the error messages in Apache's error log.

After doing a full audit of the site we gave them a report with the recommendations, among whichwas to install APC, since they are on newer PHP versions.

Their hosting provider did install APC, but there was no noticeable difference.

Using the apc.php script that is bundled with APC, we were able to pinpoint the problem: poor cache hit ratio:

As you can see, fragmentation is very bad an d we only get the benefitof 16% cache hit ratio. This is because their hosting provider only installed APC, but did not check if it needs tuning or not.

This site has 99 enabled modules and 6 themes, and the default 30MB of APC is not enough.

So, we tuned APC to increase the apc.shm_size parameter to 128MB, and what a difference that made:

We now have 99% cache hit rate, and zero fragmentation.

And we are up to 308 requests per second too.

Server memory usage dropped significantly too, because each Apache process just retrieves the op-code from APC's cache rather than loading and parsing each Drupal module.

If this server was short of memory, we could reduce APC's memory further based on the actual consumption, say to 50MB or so. But it is better to wait for a while and see if the usage pattern changes before doing this kind of adjustment.

原文地址:http://2bits.com/articles/importance-tuning-apc-sites-high-number-drupal-modules.html

转载于:https://www.cnblogs.com/xpress/archive/2011/07/20/2112008.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值