Tag: optimization

Butterflies and Wheels had been having some performance issues at Dreamhost, so I moved it to a Linode VPS earlier this week. I can play with a lot of things on a VPS that I can’t at Dreamhost, and I was hoping that I could at least stop the WordPress dashboard from timing out and returning errors so often. But the stock installation on the linode wasn’t doing so well either. At one point, it actually ran out of memory and killed mysqld. That’s the spike towards the left side of that graph above. That’s a graph of disk i/o, and the spike shows swap activity.

Now, Butterflies and Wheels is a pretty large site, with around 19,000 posts and 60,000 comments. But the vps has 512MB of RAM and the site doesn’t get that much traffic; there’s no way it should be running out of RAM, let alone running out of swap. So I went digging for performance tweaks.

You can see the results starting at around 16:30 on that chart. While CPU usage and network bandwidth stayed pretty much the same, disk i/o has nearly flatlined. That’s great. It means that now nearly the entire site is running in memory, and the disk isn’t being touched much at all. And where before the host had nearly no free memory most of the time, now it has around 350MB free. I could probably load the entire DB into memory now, come to think of it. That might be my next project.

I think the most effective thing I did was install Alternative PHP Cache and configure W3 Total Cache to use it instead of disk-based cache. Since that is one of the things I can do on a VPS that I couldn’t do on the shared Dreamhost plan, I’m considering the move a success. The other effective thing I did was cut down the number of modules Apache was loading, reducing its memory footprint by around 20%.

I’m sure there are still some things I can do to make the site faster, like rewriting a couple WordPress plugins I wrote for the site so that they’re less inefficient, or just deciding that the site doesn’t really need those features. But for now, I’m happy.

Update: www.elsewhere.org is still running on the shared Dreamhost plan, and when I submitted this post, I got an internal server error. This has been happening more frequently on all my dreamhost sites. Maybe I should move some of them over to this linode as well.