Harvard Law serves some pretty high usage blogs, WP Super Cache and W3 Total Cache weren’t sufficient for their needs, and so Dan wrote a plugin to serve cached files with Nginx. The cool thing is that it (seems to) serve these cached pages without touching WordPress at all. I’m going to play with this on the next slice we set up it; if it works as advertised, then this is the caching solution we need for the rare possibility that one of the sites gets hammered with traffic.
Tag Archive for 'site performance'
A few of the links I referred to when optimizing MySQL settings on one of the VPS’:
- Behold WordPress, Destroyer of CPUs – Jeff Atwood rants about WordPress’ resource use; Matt Mullenweg responds with a list of suggested MySQL settings.
- WordPress Optimization Bible – Another set of MySQL settings to refer to. It also suggests enabling eAccelerator, which apparently works nicely with W3 Total Cache.
- One MySQL Configuration Tip That Can Dramatically Improve MySQL Performance – Suggests adding max_write_lock_count = 1
Per last night’s outage, here’s how you suspend a cPanel account from the command line:
/scripts/suspendacct 'username'
If the cause of the usage spike is unknown, however, it won’t necessarily let you diagnose it.
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.
Munin is a “networked resource monitoring tool that can help analyze resource trends and ‘what just happened to kill our performance?’ problems.” According to Max, you can install children on multiple servers and have them report back to aggregated data on a parent. It’s useful for monitoring site performance because you can configure notifications if the site load goes above a certain number, etc. This would be worth looking through at some point in the near future.
One of the time-consuming parts of an archive transfer currently occurs when we migrate a database with a large number of authors and attempt to add each author as a user. Personally, this is my preference because it means we keep the integrity of the data as true as possible (the other option is to assign the post to the default user and then store the author data as a custom field). The import slows down, however, as the number of users in the database increases largely, I think, because WordPress isn’t optimized to handle a large number of users, let alone content from a large number of users.
As such, I think it might be worthwhile to make it standard operating procedure to import authors as custom fields and then have a secondary script that checks the custom field for author information and then creates the user if the author doesn’t exist or assigns the post to the author if the user does exist.
Related to the time required to migrate archives, I wonder if we should go back to importing the content directly into the database and bypassing the creation of WordPress eXtended RSS files. If we did this, we could likely automate more of the process. Thoughts?
Recent Comments