I have freshly installed Wordpress, Nginx with PHP-FPM, W3 Total Cache (plugin), memcached and APCu on PHP 5.5.

I will run a benchmark on my local mac against the aforementioned AWS server using Apache Bench (ab), I get a consistent 240 Requests Per Second (RPS) with test.com poisoned to this server, or around 40 million hits per day according to blitz.io. Keep in mind this is with the default Wordpress theme.

This performance is great and outperforms almost every (not all) blog post out there regarding performance. I have spent a lot of time and research getting to this point, but now I have a couple questions regarding APCu and Memcached.

Once we go to another heavier theme (have tried several), performance drops and I cannot tell whether memcached is even functioning.

  1. Do I need both memcached AND APCu?
  2. We are having some database performance issues. How can I tell how well memcached is functioning (what rate cache is purged at, hit and miss rate, etc)
  • 1
    There's one extremely slim theme out there: Toscho-s-Mini-Theme. Give that one a try to see if basic stuff is failing or if you just have a crap theme. Hint: Without the ability to reproduce your setup and without knowing what theme, this question can't get answered. Also: While WordPress server stuff is on topic, handling memcache/d is not. And "do I need X" probably is better rephrased to some more clear and answerable question. Thanks.
    – kaiser
    Mar 26, 2015 at 1:53

1 Answer 1


APCu > Memecachedd when doing caching on only one server. Memcached should be used to have object caching in multi server enviroment while on a single server the overhead of the communication and task switching involved with using it is just pointless when compared to the not complicated direct approach to memory that APCu takes.

As for the expiry time of a cached entry, this is something that is set on the wordpress side of things. W3TC has a configuration option and if you use the wordpress caching API you can setup the expiry yourself. Of course setting expiry time doesn't mean that the caching facility will actually keep it that long and from your description it sounds like your entries are being purged before the timeout and this might indicate that you either do not have enough memory for cache or that you don't have a consistent way to calculate cache keys.

Both caching utilities have their own monitoring utilities which are not complex and do not provide a great insight but my experience is that if you need to inspect things on that level you probably don't use enough cache memory.

And the whole object caching related discussion is pointless if yous W3TC works properly as there should be very little hits on APCu/memcached or the DB.

  • As I understand, APCu does not do Opcode caching (caching of PHP), just object-caching (key-value store, etc)? If this is the case, could it be that these heavier themes that are dragging me down are using dynamically generating PHP pages instead of being cached? W3TC does not have options (that I am aware of) for Opcode caching, just Object Caching.
    – user69633
    Mar 26, 2015 at 15:35
  • APCu is key value caching facility part of what was included in the APC before, so yes it is unrelated to opcode caching. W3TC should cache pages no matter what theme you use, so there might be miscofiguration of it on your part. Side note, the only way to get something high performance is to hand code it, there are very little themes and plugins with high enough code quality to be used as they are in high performance sites (not blaming anyone here, people want cheap and easy to use and the developers develop what people want). Mar 26, 2015 at 15:49
  • @user69633 Please do not leave the same comment 2 times. Duplicate content is not kool.
    – kaiser
    Mar 27, 2015 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.