Of WordPress Caches and Fast PHPs

Example of a Plug-In Framework
Image via Wikipedia

Improving the speed of this and my two other sites has always been a major issue for me. Ever since I’ve switched to WordPress I’ve never been fully satisfied with the loading time and it seems I’ve been trying since forever to improve it.  My main methods were through the use of caching plugins such a WP-Cache and later on WP-Supercache and through manual performance tweaking. For a while it seemed to have worked to a degree until again my performance started dropping without any apparent reason.

It was at this point that I jumped to the VPS offering in a desperate attempt to get a site which loads in this century. Again, for a while things looked to be working well but now and then I would get horrible site b0rks which would take me hours to troubleshoot and resolve. The latest one was the reason I discovered that WP-Supercache didn’t play nice with VPS and thus I had to find something else, or live with it in a state of half-on.

To my delight, it seems that now there are new caching plugins available which I can try. I already mentioned Hyper Cache last time and today I discovered DB Cache (h/t  diTii.com) which seems particularly promising, especially because it works not by caching the fully loaded page, but rather by caching the Database queries themselves. This is an interesting take on caching since it now can improve performance for web crawlers as well as normal users. It also provides an extra benefit to me since I’m proving a gallery through the wordpress interface, and that means that the database queries for that are also cached.

So I ditched Super Cache from all my blogs and installed DB Cache on the Division by Zer0 and the Wesnoth Journals and Hyper Cache on the ACP. It’s of course always difficult to figure out how much difference a caching plugin has done to your site. As of now, I can’t say I notice a significant difference on loading times with DB Cache, however I did notice that the number of SQL queries that are made each time the page loads have dropped from >60 to about 15 which means that there some difference.

I  have also noticed anotther thing. In the past it could take a few seconds before my site even started loading (I guess while it was running the SQL queries) but after that it would be displayed very quickly (especially if it had been supercached) whereas now, the site starts loading very quickly but it takes more time to actually finish loading the content, in effect loading in parts (first the header, then the content etc) but in a way that is much more exaggerated than before.

Another thing I also decided to do is to finally activate Fast CGI for PHP. I hadn’t done this before as it wouldn’t have made much difference when Supercache was in use but now that the code is executed every time, it seems like a good idea. There’s also the added bonus that for VPS, the Xcache opcoder is available which further improves php performance when on high load. I do not think it will make much of a difference as my problem is not one of traffic but it may come in handy for those rare reddit moments.

As of now, the performance seems comparable to SuperCache times and I am hoping that this time I will not have any more random Internal Server Errors. Unfortunately my WordPress admin panel is still quite slower than I’d like with loading times randing frmo 5 to 15 seconds or more on occasion. I honestly don’t know what I can do to fix that but at least the admin panel is not something that is used very often.

Next step will be to see if Hyper Cache is better than DB Cache and if they can both play well together for a combined improvement.

So what do you think of the current speed?

Reblog this post [with Zemanta]

About this entry