WP-Cache Somehow Ineffective?
Posted December 19th, 2006 @ 01:30pm by Erik J. Barzeski
Using Daniel Jalkut's modifications to WP-Cache, I unfortunately found that my results were nowhere near as good as his:
<!-- Dynamic Page Served (once) in 0.191 seconds --> <!-- Cached page served by WP-Cache in 0.198077 seconds -->
Troubleshooting was a two-step process. First, I disabled the two dynamic portions of this site: the random images in the header and sidebar. I cleared the cache, loaded some pages, and checked the results. No improvement.
Next I disabled all the plugins (even admin-area only plugins) except WP-Cache. Still no improvement.
Cached pages are being served, but very slowly. As the example above indicates - slower than actually fetching and building the page the first time! What's up with that? So far as I know, everything is properly installed. Why is this taking so long? The contents of my wp-content/cache
folder appear fine.
Any suggestions or ideas?
Posted 19 Dec 2006 at 2:06pm #
One possible source of the phenomenon could be that your disk access is slower than your DB access. I've heard of situations like this, particularly where disks are NFS mounted to the host that does the actual serving.
At least your dynamic times look pretty fast to start with!
Posted 19 Dec 2006 at 7:50pm #
It is as likely as Daniel describes. Matt Mullenweg in [wp-hackers] 5 minutes to a faster blog wrote:
"Some hosts like Dreamhost, Powweb, MediaTemple grid, and others mount all user files via NFS, which generally will mean going directly to the DB is often faster than using the file-based caches. (I could be wrong, but this is one of the reasons we turned off caching by default.)"
Posted 19 Dec 2006 at 7:58pm #
[quote comment="32213"]"Some hosts like … MediaTemple grid, and others…"[/quote]
FWIW, the site is currently hosted on a MediaTemple (dv) plan due very soon for an upgrade to (dv)3. Still, this is interesting information.
I'll probably leave WP-Cache installed and enabled because, if nothing else, processor and memory usage is probably lower serving static files from the disk than dynamically generated files.