Running WordPress – Testing Blog Performance
Using BrowserMob
If you’ve ever run a WordPress blog, you know that one of the most powerful features are the plugins that enable a whole host of functions. Since WordPress is so popular, it’s usually a safe bet that someone else has wanted to do the same thing with their blog as you want to do and they have written a plugin to do it. I will admit that when I first set up this WordPress installation (which is running on my own domain hosting account at Dreamhost) I went hog wild with the plugins, not paying a lot of attention to the effect that they could all have on performance.
This blog has grown modestly since I started it last summer. Currently I average only about 30 unique visitors a day and about 30 to 40 page views — I’ve served 1150 unique visitors and 2000 page views in the last 30 days. But I noticed a sudden decrease in performance earlier this week and couldn’t understand why. I was having both resource issues on the server (PHP was consuming too much processor capacity and my host automatically killing the process occasionally) and an overall slowness on the pages. How would I track down what was going on?
I’ll spare you the details, but the ultimate troubleshooting tool came in the form of BrowserMob website monitoring which I had enabled for free about a month ago. To reduce the PHP resource load I first purged my site of all the plugins I had enabled that I didn’t really think I absolutely needed. I kept only the anti-SPAM plugins and a couple of light display plugins. (I also cleaned up some other PHP-heavy installations that were running on other parts of my domain.) That seems to have eliminated the PHP resource problem for now. But the site was still slow loading.
The free version of BrowserMob allows you to check the performance of a web page every two hours for free. I looked at the BrowserMob graph for my site for a couple of days and saw that several times it had timed out, meaning that it took more than 30 seconds to load completely. The error provides detail about which parts of the page are taking the longest to load. Here’s an example from before I optimized the PHP by removing plugins:

Blog Load Times
What these reports eventually lead me to was that reducing the base PHP load by removing unwanted plugins dramatically increased the speed that the page loaded, but there were still some 30 second time-outs and a few plugins that were slowing things down considerably, even after the base page loaded. My investigation lead me to my AddToAny plugin as the main culprit. It seems that their servers had slowed which was in turn dragging down my page load times. So I removed the plugin and the proof is in the following graph of average daily load times after :

The red circles indicate that on that day one or more of the 12 daily tests took more than 30 seconds to complete. Since removing the plugin everything has gone back to a relatively quick load.
I mostly wanted to throw this out there for people to see the power of free tools like BrowserMob. You should look at their site because they offer a very rich and configurable service for a decent price. If you’re willingto pay they have a scripting engine that can test your website as deeply as you’d like, with scripts simulating whatever user actions you’d like. Check them out if you run your own site.







Recent Comments