Speeding Things Up a Little

The main reason I relocated The Pink Sylphide away from DreamHost was due to how slow the site ran when I tried working with more than three posts at once. Actually, even working on one post would slow things down a bit.

I moved The Pink Sylphide to Linode, and things improved. I could successfully modify one post, even two, and at times three, and even four posts before things slowed down. However, loading more than 10 pages (whether posts to edit or listing posts in the admin area) would slow the site down. Loading 20 pages dropped the site to a slow crawl for a long time. Trying for 30 pages would leave the server gasping for air, struggling to survive, in massive need of a reboot because there’s not enough strength to simply restart the web server.

I tried many different methods for tweaking Apache and WordPress, but nothing did much of anything. While switching from the “In Series” plugin to the “Organize Series” plugin today, and foolishly deciding to update all my posts to reflect this change, I found myself in a position where my workflow called often for over 25 posts to be open and ready to edit at the same time. And my first try all buy killed the Apache web server.

Enter nginx, a lightweight HTTP server. This is the software WordPress.com uses as a load balancer:

We have been using Nginx for Gravatar for a few months and have been impressed by its performance, so moving WordPress.com over was the obvious next step.

Being the computer geek I am, I decided to jump right in. I’m the person who recently switched my desktop from Linux (Fedora Core) to BSD (Free BSD) because I felt I hadn’t learned anything significant in Linux recently, and wanted to learn something new. Switching from Apache to nginx seemed right up my ally.

There were some minor problems along the way, but everything is done and (hopefully) settled now. I’ve been able to easily open over 30 posts for editing without noticing any difficulty on the server, something I could never do with Apache. Now I’m only limited by how slow the Javascript in the post interfaces is when opening over 20 posts in separate tabs in Opera. Maybe I’ll re-try Firefox for writing posts, now that Firefox 3 seems to be usable these days. That, and the switch from Linux to BSD should mean it won’t keep crashing on me constantly, a problem I was never able to resolve since Firefox 2.

I wouldn’t recommend switching to nginx to anyone who hasn’t set up Apache or another web server by hand, filling out config files in a text editor, setting up virtual hosts manually. However, if you are a person who’s done these things, and want to find a lighter weight server for your web site, nginx is worth a look.

Comments are closed.