My Performance Woes

For some unknown reason, the performance of this website over the past 2-3 weeks has been terrible. While writing posts, I would routinely see a warning that said I was disconnected from the server while taking forever to reconnect. Navigating the back-end of the site was a major pain as each page seemed to take forever to load. I also saw Internal 500 Server errors as well as MySQL database timeouts. While trying to diagnose what the problem was, I used the YSlow FireFox Extension with Firebug and saw GET requests taking 3-20 seconds to load.

Fed up with the performance, I created a trouble ticket with HostGator. I’ve never had a problem with this company in the two years I’ve used them and the support has been stellar. You can read their response to me in its entirety here but the gist of their response was that certain plugins were creating such a load on the server that they were the source of my problems. They specifically mentioned these plugins:

All related posts plugins (WordPress Related Posts, YARPP) can cause significantly high load in most cases.

WPRobot3 and other auto-posters can also cause high load issues, and should be disabled if they are causing issues

StatPress and other wordpress statistics software should also be disabled, as these too can consume too much CPU in certain cases. Use Google Analytics instead for statistics as well as Awstats which already comes by default on your account.

WP Post Views is also a plugin that you’ll want to avoid as it causes significant resource usage.

All In One SEO Pack has also been found to cause issues in many cases and we generally recommend using Greg’s High Performance SEO Pack in its place.

Any other plugins that are not vital to your WordPress should be disabled.

I knew at some point, YARPP was going to give me problems because of the resources it uses to create the relationships between posts. The weird thing is that my WordPress install has performed fine for a several weeks without a problem. All of the issues occurred suddenly. I wonder if YARPP reached the point where it was hitting the performance limits. Another plugin I’ve had problems with over the years is W3 Total Cache. Caching plugins have caused me so many problems that I’ve finally decided not to use them. In my opinion, using various techniques and optimizations, this site doesn’t need to use either to be fast. I only used one or the other because of the majority of WordPress literature that says you have to.

So while I didn’t put a lot of thought and credibility into their response, I decided to go through my list of installed plugins and make the hard call on whether I needed them or not. It turns out I was able to axe about 6 plugins from my install. Those 6 did include W3 Total Cache and YARPP. I also took this opportunity to go inside of the database to drop and empty tables that were no longer necessary. While performing these tasks, I came across a few tables from plugins I had uninstalled about two years ago. This will be a subject for another post. After completing the spring cleanup, I’m happy to report that the site both on the front and back-ends is much more responsive. I’ve yet to run into a timeout or MySQL error. I can’t figure out which part of the clean-up process offered me the most benefit but I’d put money on the removal of both W3 and YARPP.

After announcing the results on Twitter, most people weren’t surprised to hear about YARPP possibly causing issues. It’s a shame because using Woopra to watch website traffic in real-time, I was able to see a bunch of people clicking on related posts through the YARPP widget. I’m now on the hunt for a service that can provide the horsepower to display related posts similar to how I use Swiftype for search. The first service I’m going to try is called nRelate. Look for a review in the near future.

Just Switch Hosts:

Why is it that at the first sign of trouble with a webhost, the first thing people tell you to do is move away to a different one? Have they not experienced what it’s like to move between webhosting companies? It’s not fun, at all. I use it as the nuclear option because the experience is so painful. This is a good time to reference an article I wrote in 2010, 14 Things To Consider When Choosing A Webhost For Your WordPress Powered Site. While there is a lot of great information in that post, the biggest take away is this:

Always type into Google “Name Of Webhosting Company Sucks” to get a grasp on the issues that have been reported with that particular webhost. When webhosting companies screw up, people are very vocal about it and will stop at nothing to complain to all who will listen. Unfortunately, the side effect to this research is that you’ll find out every webhosting company in existence, sucks.

It doesn’t matter which webhosting company I choose, someone out there will tell me how terrible they are and to switch to a different host. Talk about the ultimate feedback loop.