Over the past six months I have increased the server capacity for this blog, and for my other sites, three times. The latest Media Temple upgrade happened last week but there were still moments even after the upgrade when this blog was spiking the server. When a server meets its capacity strange things happen and the “user experience” begins to slow down for everyone and that’s a Bad Thing.
Since I don’t want to spend $2,500.00 USD a year on upgrading my hosting plan again, I have made some changes here and there that you may have already noticed. Some of these changes were suggested by my web server host Media Temple while I implemented others to see how removing features would relate to increased speed. Most of these changes are WordPress 1.5.2 specific but some of the ideas expressed below might be directly applicable to any blog software or Content Management System you are running.
REMOVED FEATURES Using PHP to send mail can clog things up and this blog was processing a lot of “email” via PHP instead of a traditional mail server. Here are some of those email burdens:
1. Contact Page: I removed this feature because kiddies were using it to send me junk. If you want to contact me via this blog you may leave a comment and I will reply to your email address.
2. Subscribe to Comments: My web host suggested this was the major “feature” of this blog that was slowing everything down because email had to be sent to all subscribers via PHP and that takes a lot of server effort to make happen for a popular post. Bad people can also choke your server by subscribing to all your posts from lots of different email addresses — that drowns your server in email requests that don’t ever go anywhere. Here are some of the other Plugins I removed because they required lots of database queries and that also adds stress on your server if you have a popular blog:
3. Related Posts: I loved seeing how a post today reflected five posts from the past but I can live without seeing that information because calling up five other random posts for every post view adds cycles to the load time and I want everything here to load as fast as possible.
4. Latest Comments: I also loved this Plugin, but to call up the commenter and adding other information about the post also puts a stress load on your server that wasn’t doing me much of a good thing — especially since every other commenter was… “Mr. David W. Boles, MFA.” I don’t need a Plugin to tell me how often I comment.
5. Noteworthy: This was a fun Plugin to use but, in the end, it didn’t add much content or provide a strong enough frame to warrant its continued use.
MODIFICATIONS Here are some other changes I made to reduce sever load.
6. I lowered the default index page posts from the last 7 posts to the last 3. I liked seeing a week’s worth of posts on the main page but 3 will always load faster than 7 so — 3 wins.
7. My web host also suggested I turn off Trackbacks and Pingbacks to save server stress. I have done that to see if things speed up here. My web host also suggested I only allow comments from registered users. I may implement that in the future because it will certainly cut the Spam processing down to zero. For now, since all comments are moderated due to the current WordPress comment danger, we will leave things alone.
8. I lowered the “RSS feed request” from the last 30 posts to the last seven. That change will prevent Nasty People from overloading the server by placing tons of phony “RSS Subscribe” requests to stall my server.
STAYING FOR NOW Here are some of the features that add a bit of a toll to the server but, for now anyway, they’re staying.
9. Rotating Image Header: I like the look and feel of the header images. Loading up a new image takes time and server effort, though, so one day I may need to just pick one of the images and leave the header image static.
10. K2: I like the design of K2 as a WordPress template and I like the AJAX comments processing where the page shifts and loads as you place a new comment. That kind of rich feature adds to the PHP processing time but, for now anyway, it’s worth it to me to keep.
11. Sending a full RSS feed: I don’t like to read truncated RSS feeds where you have to click on the article in your RSS feed reader and actually visit the site to read the entire blog post. I will continue to serve full text feeds of all posts and comments here so you can continue to read this blog as you wish.
TO COME When I finally upgrade WordPress to Version 2 — and I will do that as soon as K2 comes out of beta — I will employ other changes here that will also speed up the responsiveness of this blog on its current hosting plan.
12. My philosophy is to be as bare boned as possible without being totally ugly even though I prefer speed over pretty. With these changes in place the average load time for the main index page has dropped from 73 database queries in 2.87 seconds to 46 database queries in 0.80 seconds — so you can see the speed increase is already obvious and edible — and those faster times do not consider the added massive reduction in PHP mailing stress that was relieved behind-the-scenes.