Wordpress performance - W3 Total Cache and memcached/APCu

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)

Topic apc nginx plugins Wordpress performance

Category Web


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.