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.

Read More
  • 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?

enter image description here

Related posts

Leave a Reply

1 comment

  1. 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/