WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Xcache clarification (4 posts)

  1. Joost Schuur
    Member
    Posted 3 years ago #

    This is more of a question to clarify my own curiosity than a support one.

    If Xcache is an opcode caching mechanism, how does this help serve static content out of memory? If I keep my page cache set to 'Opcode: Xcache', am I in fact still dynamically generating pages every time, simply with the benefit of the opcode being pre-cached already? Or is there some other feature of Xcache that you're taking advantage of, where it does memcache-like caching of the output of whole URLs e.g.?

    I was intrigued by your recent comment that single server sites might want to try advanced file based caching after all.

    I'm running W3 Total Cache on nginx with Xcache set for a 128 meg cache size for a small blog right now. At 64 megs, the Xcache admin panel would still show the PHP cache max out after less than half an hour.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Opcode caches require PHP to be invoked to cache compiled scripts and access stored objects. When you enable opcode as the storage engine for page caching, the entire uncompressed and gzip compressed versions of a given page are stored in the opcode cache and returned if they have not expired.

    Different web servers have different levels of peak performance when working with PHP. Nginx or Litespeed are typically much faster than Apache for example when running PHP. Mileage varies, but your web server is (by default) optimized for reading from disk rather than memory and use of memory caching is geared towards alleviating specific bottlenecks, typically related to execution time for PHP rather than total response time for static objects.

  3. Joost Schuur
    Member
    Posted 3 years ago #

    So in a nutshell, while Xcache can not only cache compiled script opcode, but also the output, thus bypassing even executing the opcode, there is a slight overhead in invoking PHP?

    Sounds like I'll give advanced disk based cache a try then for my site.

  4. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    You can't bypass exucuting opcode, that's what happens when you have it installed and PHP is invoked. Instead of creating a page, if that file already exists in opcode (memory), it is returned instead of executing compiled scripts. Invoking PHP is slower than just returning a file from disk (in general). Nginx is not officially supported with latest functionality now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic