1

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?

1
  • I think this is one of those questions that won't generate a definitive response. Is it possible to turn this into a community wiki page?
    – anu
    Commented Jan 10, 2011 at 17:16

4 Answers 4

2

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

1
  • Thanks - I've used loadimpact to do load testing before - although for my purposes at the moment, apachebench is a reasonable load tester (obviously got smaller traffic volumes than loadimpact can test), but I'm particularly interested in testing how the system is affected when there's a fair amount of traffic (eg 5,000 page views an hour) and comment bursts (100 comments or so in 5 minutes), as it's under these specific conditions that I'm seeing performance degradation.
    – anu
    Commented Jan 10, 2011 at 17:21
2
  1. Check your daily process log. Or execute a script that watches highest process consuming CPU.
  2. Run P3 plugin profiler. However, be aware the CPU hogs don't always show up in here.
  3. Identify users with malicious or high-load processes. Then:

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.

0

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

0

Just thought I'd throw in something I've been thinking about myself as a way of doing this:

  • apachebench to simulate general viewing traffic
  • a bit of PHP to add n comments per minute using WordPress (ie not directly inserting into the table). I'm also wondering if watir or selenium can't be put into action here instead.
  • munin (or similar) to do monitoring / reporting (although I'm not sure how granular this would be)
1
  • I'm going to accept my own answer here, as I think it's most suitable for my (cheap) needs!
    – anu
    Commented Jan 27, 2011 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.