title: APC -> APCu / OPCache, performance poor
body: <p>I have an <code>m3.xlarge</code> EC2 instance that I updated to <code>PHP 5.5.11</code> today.</p>
  
  <p>With this update, it overwrote <code>php55-pecl-apc</code> with <code>php55-pecl-apcu</code>.</p>
  
  <p>After reading and experimenting, my understanding is that <code>APC</code> has been replaced with <code>OPCache</code>, except for a key value store which can be brought back with <code>APCu</code>.</p>
  
  <p>After tweaking my config to something that looks reasonable, using Wordpress while logged in is now terribly slow, at least 300-900ms worse (the front end is cached via varnish, and works perfect... but when you're using the admin it is deliberately not cached, and slow as sin).</p>
  
  <p>I did a series of benchmarks as I upgraded, across a small sample size for each step. It degraded worse and worse as I went on.</p>
  
  <ul>
  <li>APC (before upgrade) <code>--&gt;</code></li>
  <li>OPCache + no APCu <code>--&gt;</code></li>
  <li>OPCache + APCu + WP Plugin for APCu</li>
  </ul>
  
  <p>Right now I'm just hanging out with OPCache, and no APCu.</p>
  
  <ol>
  <li>How can I achieve the same performance? I loved the admin interface, I loved how fast it was. I honestly don't see how this is an improvement at all, it's quite depressing really... unless there is some super library out there that I'm not aware of. It's certainly not what I have though, or maybe it's not configured well.</li>
  <li>Assuming the answer to #1 is 'you configured it like balls', then would you mind taking a look at this and seeing if this is reasonable? </li>
  </ol>
  
  <p>For my setup I'm using latest wordpress, a few large plugins but I can't take them off because they're important. Luckily varnish takes care of most of the work. I have 4 cores, 16GB memory, ~10k files in my website root. I also have no real hardcore apps or anything other than wordpress, it's a fairly vanilla setup. I think that's it for stuff that might help.</p>
  
  <p>Config:</p>
  
  <pre><code>zend_extension=opcache.so
  opcache.enable=1
  opcache.enable_cli=0
  opcache.memory_consumption=128
  opcache.interned_strings_buffer=8
  opcache.max_accelerated_files=10000
  opcache.max_wasted_percentage=5
  opcache.use_cwd=1
  opcache.validate_timestamps=1
  opcache.revalidate_freq=0
  opcache.revalidate_path=0
  opcache.save_comments=0
  opcache.load_comments=0
  opcache.fast_shutdown=1
  opcache.enable_file_override=0
  opcache.optimization_level=0xffffffff
  opcache.inherited_hack=1
  opcache.dups_fix=0
  opcache.blacklist_filename=/etc/php-5.5.d/opcache*.blacklist
  opcache.max_file_size=2M
  opcache.consistency_checks=1
  opcache.force_restart_timeout=180
  opcache.error_log=/var/log/php-fpm/5.5/opcache.log
  opcache.log_verbosity_level=1
  opcache.preferred_memory_model=
  opcache.protect_memory=0
  </code></pre>