ApacheBench Vs. Siege

I want to like Apache-bench more than I do. Although very simple to use with excellent reporting and widespread support, I keep abandoning it and find myself load testing with Siege. The main reason for this is the use of a url file. With siege, I can quickly and easily hit a file of urls at random, thus getting a more complete test of my app.

siege -c 100 -t 10m -i -f links.txt
(with the links file containing as many urls as I need)

At first glance, there wasn’t an easy way to do that in Apache-bench. Then I ran into an article describing how to do just that. (and it is easy, no less!)

“ab -n 100 -c 10 > test1.txt &
ab -n 100 -c 10 > test2.txt &”

( quoted from article above, published on this site. )

I was totally excited to find a solution to the multiple url issue and ready to give Apache-bench another shot. Unfortunately, the results are reported separately and would need to be aggregated by hand, as far as I can tell. Does any one use Apache-bench for multiple urls and have a solution for the reporting issue? How do you evaluate load data for larger scale load tests?

Print Friendly
This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to ApacheBench Vs. Siege

  1. #!/bin/bash
    echo -e "Batch Apache-Benchmarking on n${URL}"
    for URI in ${URIS[@]};
    echo "uri: ${URI}"
    ab -n 100 -c 5 -A xwander:xwander-awesome "${URL}${URI}"
    sleep ${SLEEP}
    echo "================================================================\n"

    just run the script and write the output to a file
    then i use meld to compare the results from two files, to see before and after a certain feature or something was added.

  2. incidentally, the script isn’t completely written by me, i got it in a search when going through google

  3. Shem says:

    check this out:
    haven’t tried this yet but seems exactly what you need.
    the problem it’s not randomly selected, but there is a path there that might fix that.

  4. Amos Shapira says:

    I saw this trick of running multiple ab’s in parallel mentioned in a few places, but from looking at it (without testing it) I don’t like it since it means that the multiple ab processes load the client more than a single multi-threaded process.

    It’s a shame that the multi-url patch for ab isn’t integrated yet. The trouble of compiling ab from apache source isn’t worth it.

    Thanks for the pointer to siege. I’ll try that.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>