One of the sites we have on Slicehost has MySQL regularly using 50% to 150% of CPU, even though we have page and query caching using memcached. As such, I did a bit of research this morning in regards to optimization steps we can take. Keep in mind that this post was written at various times over several hours.
The first post I read, a rant by Jeff Atwood, lead to suggested MySQL setting configurations from Matt Mullenweg. Based on the conversation there, I looked over a few posts related to MySQL optimization including a conversation on Stack Overflow, explanation on a lightweight configuration on Debian, and a lengthy WordPress optimization tutorial. I also came across a forum thread on WordPress.org that indicates high CPU usage may actually have to do with pretty permalinks.
The steps I took today were to implement a few of Matt’s suggested memory settings. I also ran a Perl MySQL tuner script that suggested I disable InnoDB, which I did. The most proactive steps we can take, I think, are to better configure MySQL to cache queries, and reduce the number of queries made by the theme. The changes I made today, though, anecdotally have dropped the CPU usage by a third to a half.
0 Responses to “Research on MySQL performance with WordPress on Slicehost”
Leave a Reply