Does anyone know of (or have) any scripts / processes they use for testing performance under load – especially of WordPress specific behaviours, like posting many comments nearly simultaneously, while under heavy simulated traffic.
I typically use apachebench to test general performance (and to make sure caching is working), but I can’t see a way of testing comment and posting performance without scripting it myself.
Any ideas?
You can use a tool like loadimpact.com to generate load, include following user scripts, for a huge number of users.
However, as with anything like this, it doesn’t come free.
We’ve just used it, so far, for simple load testing of user views as that’s been our biggest issue with sites. We wrote an article about it and how to get scale at http://interconnectit.com/1254/make-wordpress-scale-on-a-budget/
Have fun and let us know how you get on.
Dave
do ps u c -u northcen | egrep ".php$" | awk '{print $0}'; done
In a bash shell, where northcen is the user you want to find. Find the user with top or other scipts. This will show you real-time user activity.
Check error logs in the WordPress install, and on the server.
Check for database errors, backup and repair.
As for paid services, there are many to choose from. It’s necessary only if you experience downtime, slowness and have high-value server uptime.
My team uses a tool from Gomez Networks for load testing WordPress. We wrote scripts using their desktop application that performed basic actions like clicking a link to a blog post, posting a comment, etc… http://www.gomeznetworks.com/
The major drawback to Gomez is that it’s expensive. You purchase units of Virtual User hours, and you can set up some extremely complex tests that simulate real world traffic. We had some pretty big issues early on with Gomez not being able to reroute domains through specific IP addresses. We have STAGING and QA environments that require hosts file modifications on a user’s machine in order to access them, and a Gomez support tech had to pull some kind of magic to make that work in our scripts.
Alternatively, if you work at a large corporation, you may want to look at LoadRunner: http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=loadrunner.
And if you work at a small shop, check out WebLoad: http://www.webload.org/
I don’t think you’re going to find a tool specifically for load testing WordPress, unfortunately. It should be relatively easy to script out some basic blog interactions, like writing a post, posting a comment, moderating comments, searching, reading an RSS feed, etc…
Dave
Just thought I’d throw in something I’ve been thinking about myself as a way of doing this: