[wp-hackers] opcode caching + page caching plugin

Mike Little wordpress at zed1.com
Sun Jul 29 21:40:21 UTC 2012


On 29 July 2012 16:47, Steve Taylor <steve at sltaylor.co.uk> wrote:

> Hi,
>
> Our server admin has installed APC, mostly for the Drupal sites he
> runs. The thing is, most of the WP sites we have there have the Quick
> Cache plugin running.
>
> Is it worth having opcode caching as well as page caching? I'm
> guessing the only gain is that the admin would be snappier as well as
> the front-end. If that's not such a concern, and the sites aren't
> known to be especially high-traffic, should we just ask for no APC on
> our WP sites?
>
>

As Jeff said "it is always worthwhile using an opcode cache". Here's a
snapshot of the APC stats from a site I run
https://www.evernote.com/shard/s9/sh/7c732905-d62e-42c6-a473-b4e824f655b8/a4d5e81e74a1a731ec415a52f6f9a240
The server has only been up a little under 20 hours and is currently not at
all busy. But the cache hit to miss ratio is already at 18 million to 18
hundred or 100,000:1 Although this is a big fat box (8 cores, 8 Gig of RAM)
that APC opcode cache makes a huge difference during busy times. During
those busy times, I think I saw the ratio hit 10 million to 1! As it
happens a high percentage (>80%) of users are logged in when the site is
busy so a page cache doesn't help as much as I'd like.

Although using a static page cache, most of your pages should be served
without using PHP, you may be surprised at how often the code gets to run
anyway.

Every 404, every request from a logged in user (front end or back). And
more significantly, if your page expiry is set to 1 hour, then your popular
pages will still get refreshed every hour.

Every time someone comments (if it doesn't go into moderation) or
publishes/updates a comment, post or page,  the cache for that post/page
(and a good few more pages -- think archives) gets invalidated.

Also the biggest cache avoiding behaviour on your site is probably the web
crawlers that constantly hit your old pages that weren't cached, but then
get cached, only to expire long before then next hit on them.

As mentioned by others, once you have APC in the mix, you can use it for
other purposes all of which should contribute to reducing the overall load
on your server.

Hope that helps,

Mike
-- 
Mike Little
http://zed1.com/


More information about the wp-hackers mailing list