简体   繁体   中英

How to prevent APC cache fragmentation

I installed APC on my Ubuntu server which is hosting one big Wordpress site. There are about 50k posts (comments are disallowed) and 30k page views per day. APC considerably increased the speed of the site. However, I can't overcome the fragmentation problem. After 20 hours, fragmentation is more than 52%, and it's still rising.

Some recommendations on Stackoverflow didn't help.

  • I installed W3 Total Cache plugin, but then deactivated it. With W3TC, the fragmentation was increasing even quicker.
  • I tried increasing shared memory size up to 1GB.
  • I set ttl to 7200.
  • I turned off stat.

What else should I try? Hit ratio is 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. Use memcached as your WordPress object cache and supplement it with 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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