简体   繁体   English

如何防止APC缓存碎片

[英]How to prevent APC cache fragmentation

I installed APC on my Ubuntu server which is hosting one big Wordpress site. 我在托管一个大型Wordpress网站的Ubuntu服务器上安装了APC。 There are about 50k posts (comments are disallowed) and 30k page views per day. 每天大约有5万个帖子(不允许发表评论)和3万个页面浏览量。 APC considerably increased the speed of the site. APC大大提高了站点的速度。 However, I can't overcome the fragmentation problem. 但是,我无法克服碎片化问题。 After 20 hours, fragmentation is more than 52%, and it's still rising. 20小时后,碎片超过52%,并且仍在上升。

Some recommendations on Stackoverflow didn't help. 有关Stackoverflow的一些建议没有帮助。

  • I installed W3 Total Cache plugin, but then deactivated it. 我安装了W3 Total Cache插件,但随后将其停用。 With W3TC, the fragmentation was increasing even quicker. 使用W3TC,碎片化的速度甚至更快。
  • I tried increasing shared memory size up to 1GB. 我尝试将共享内存大小增加到1GB。
  • I set ttl to 7200. 我将ttl设置为7200。
  • I turned off stat. 我关闭了统计信息。

What else should I try? 我还应该尝试什么? Hit ratio is 100%. 命中率是100%。 Should I really worry for fragmentation? 我真的应该担心碎片化吗?

在此处输入图片说明

Actually your fragmentation doesn't look that bad. 实际上,您的碎片看起来并不那么糟糕。 I've seen a lot worse. 我看到了很多糟糕的事情。

My suggestion is to only use APC for an opcode cache and let it just cache the php files. 我的建议是仅将APC用于操作码缓存,并使其仅缓存php文件。 Use memcached as your WordPress object cache and supplement it with batcache. 使用memcached作为WordPress对象缓存,并用batcache进行补充。 I used to be a big supporter of W3TC but it's too bloated and buggy to use in an enterprise or very high scale environment. 我曾经是W3TC的大力支持者,但是它太肿且无法在企业或非常大规模的环境中使用。

http://wordpress.org/extend/plugins/memcached/ http://wordpress.org/extend/plugins/memcached/
http://wordpress.org/extend/plugins/batcache/ http://wordpress.org/extend/plugins/batcache/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM